RESOLVED FIXED 102453
When releasing a CGImage, we should remove it from the subimage cache too.
https://bugs.webkit.org/show_bug.cgi?id=102453
Summary When releasing a CGImage, we should remove it from the subimage cache too.
Yongjun Zhang
Reported 2012-11-15 18:17:02 PST
Currently SubimageCacheWithTimer is inside GraphicsContextCG.cpp. It would be nice to move it out to a separate file and we can access the subimage cache if needed.
Attachments
Move SubimageCacheWithTimer to separate files. (18.01 KB, patch)
2012-11-15 18:27 PST, Yongjun Zhang
buildbot: commit-queue-
Fix win build break. (19.44 KB, patch)
2012-11-15 22:16 PST, Yongjun Zhang
webkit.review.bot: commit-queue-
Re-submit the patch for bots to pick up. (19.44 KB, patch)
2012-11-16 12:21 PST, Yongjun Zhang
no flags
Move subimage cache code into separate h/cpp file. (19.64 KB, patch)
2013-02-06 15:29 PST, Yongjun Zhang
ddkilzer: review-
buildbot: commit-queue-
remove the image from subimage cache when we releasing the CGImageRef (23.29 KB, patch)
2013-03-29 14:45 PDT, Yongjun Zhang
no flags
Yongjun Zhang
Comment 1 2012-11-15 18:27:56 PST
Created attachment 174586 [details] Move SubimageCacheWithTimer to separate files.
Build Bot
Comment 2 2012-11-15 21:30:12 PST
Comment on attachment 174586 [details] Move SubimageCacheWithTimer to separate files. Attachment 174586 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/14857504
Yongjun Zhang
Comment 3 2012-11-15 22:16:43 PST
Created attachment 174607 [details] Fix win build break.
WebKit Review Bot
Comment 4 2012-11-16 00:42:28 PST
Comment on attachment 174607 [details] Fix win build break. Attachment 174607 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14844802 New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Yongjun Zhang
Comment 5 2012-11-16 12:21:50 PST
Created attachment 174739 [details] Re-submit the patch for bots to pick up.
Yongjun Zhang
Comment 6 2012-11-26 09:59:29 PST
Yongjun Zhang
Comment 7 2013-02-06 15:29:59 PST
Created attachment 186934 [details] Move subimage cache code into separate h/cpp file.
Build Bot
Comment 8 2013-02-06 16:35:43 PST
Comment on attachment 186934 [details] Move subimage cache code into separate h/cpp file. Attachment 186934 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16398419 New failing tests: http/tests/cache/cached-main-resource.html
Benjamin Poulain
Comment 9 2013-02-12 00:48:33 PST
Comment on attachment 186934 [details] Move subimage cache code into separate h/cpp file. View in context: https://bugs.webkit.org/attachment.cgi?id=186934&action=review I think it is misleading to have stuff like subimage(CGImageRef, const FloatRect&) in the new files. The new files should only contain the minimum for the definition and implementation of SubimageCacheWithTimer. I would also promote SubimageCacheWithTimer to a real class with real encapsulation now that it is promoted from a tool to a header. > Source/WebCore/platform/graphics/cg/SubimageCacheWithTimer.cpp:2 > + * Copyright (C) 2013 Apple Inc. All Rights Reserved. You need to preserve the full original copyright too (or hunt who did the changes). > Source/WebCore/platform/graphics/cg/SubimageCacheWithTimer.h:2 > + * Copyright (C) 2013 Apple Inc. All Rights Reserved. Ditto for copyright.
David Kilzer (:ddkilzer)
Comment 10 2013-03-27 08:59:41 PDT
Comment on attachment 186934 [details] Move subimage cache code into separate h/cpp file. r- based on Benjamin's reply in Comment #9.
Yongjun Zhang
Comment 11 2013-03-29 14:20:11 PDT
We should also remove the image from subimage cache if we are going to release the CGImage. Change the title to reflect that.
Yongjun Zhang
Comment 12 2013-03-29 14:20:49 PDT
Yongjun Zhang
Comment 13 2013-03-29 14:45:02 PDT
Created attachment 195802 [details] remove the image from subimage cache when we releasing the CGImageRef
WebKit Review Bot
Comment 14 2013-03-29 17:50:15 PDT
Comment on attachment 195802 [details] remove the image from subimage cache when we releasing the CGImageRef Clearing flags on attachment: 195802 Committed r147265: <http://trac.webkit.org/changeset/147265>
WebKit Review Bot
Comment 15 2013-03-29 17:50:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.