Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Issue 22613002: Allow ImageBitmaps derived from HTMLImageElements to be evicted from RAM. (Closed)

Created:
7 years, 4 months ago by arbesfeld
Modified:
7 years, 4 months ago
CC:
blink-reviews, aandrey+blink_chromium.org, dglazkov+blink, Rik, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Allow ImageBitmaps derived from HTMLImageElements to be evicted from RAM. Since we were pre-cropping the HTMLImageElement before drawing, the CachedImage::didDraw(Image) command exited early because the Image argument was different from the image referenced in the CachedImage. This has been fixed by not pre-cropping the image and allowing drawBitmapRectToRect to handle the cropping. TEST=manual BUG=259947, 166658 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155805

Patch Set 1 #

Patch Set 2 : Add test. #

Total comments: 3

Patch Set 3 : Add test cases. #

Total comments: 2

Patch Set 4 : Add comment explaining bitmap offset. #

Patch Set 5 : Make destructor virtual. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -9 lines) Patch
M Source/core/core.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/page/ImageBitmap.h View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M Source/core/page/ImageBitmap.cpp View 1 2 3 7 chunks +13 lines, -6 lines 0 comments Download
A Source/core/page/ImageBitmapTest.cpp View 1 2 1 chunk +74 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
arbesfeld
7 years, 4 months ago (2013-08-07 18:53:09 UTC) #1
Justin Novosad
Seems like you should be able to write a unit test for this.
7 years, 4 months ago (2013-08-07 19:00:12 UTC) #2
arbesfeld
Done.
7 years, 4 months ago (2013-08-07 21:49:12 UTC) #3
Justin Novosad
On 2013/08/07 21:49:12, arbesfeld wrote: > Done. There was a similarity blunder. Re-upload with --similarity ...
7 years, 4 months ago (2013-08-08 13:04:35 UTC) #4
Justin Novosad
https://codereview.chromium.org/22613002/diff/5001/Source/core/page/ImageBitmapTest.cpp File Source/core/page/ImageBitmapTest.cpp (right): https://codereview.chromium.org/22613002/diff/5001/Source/core/page/ImageBitmapTest.cpp#newcode46 Source/core/page/ImageBitmapTest.cpp:46: // Verifies that the cached image help by an ...
7 years, 4 months ago (2013-08-08 13:18:27 UTC) #5
arbesfeld
On 2013/08/08 13:18:27, junov wrote: > https://codereview.chromium.org/22613002/diff/5001/Source/core/page/ImageBitmapTest.cpp > File Source/core/page/ImageBitmapTest.cpp (right): > > https://codereview.chromium.org/22613002/diff/5001/Source/core/page/ImageBitmapTest.cpp#newcode46 > ...
7 years, 4 months ago (2013-08-08 14:23:48 UTC) #6
Justin Novosad
On 2013/08/08 14:23:48, arbesfeld wrote: > Done. The case of "crop rect outside of image ...
7 years, 4 months ago (2013-08-08 15:22:48 UTC) #7
Stephen White
LGTM. Nits/questions are at your discretion. https://codereview.chromium.org/22613002/diff/12001/Source/core/page/ImageBitmap.cpp File Source/core/page/ImageBitmap.cpp (right): https://codereview.chromium.org/22613002/diff/12001/Source/core/page/ImageBitmap.cpp#newcode51 Source/core/page/ImageBitmap.cpp:51: , m_bitmapOffset(IntPoint()) Out ...
7 years, 4 months ago (2013-08-08 15:32:11 UTC) #8
arbesfeld
On 2013/08/08 15:32:11, Stephen White wrote: > LGTM. Nits/questions are at your discretion. > > ...
7 years, 4 months ago (2013-08-08 15:41:12 UTC) #9
Justin Novosad
On 2013/08/08 15:32:11, Stephen White wrote: > Out of curiosity, why don't we set a ...
7 years, 4 months ago (2013-08-08 15:45:27 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arbesfeld@chromium.org/22613002/18007
7 years, 4 months ago (2013-08-08 15:47:24 UTC) #11
Stephen White
On 2013/08/08 15:45:27, junov wrote: > On 2013/08/08 15:32:11, Stephen White wrote: > > > ...
7 years, 4 months ago (2013-08-08 16:05:57 UTC) #12
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 4 months ago (2013-08-08 18:10:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arbesfeld@chromium.org/22613002/42001
7 years, 4 months ago (2013-08-08 18:37:31 UTC) #14
commit-bot: I haz the power
7 years, 4 months ago (2013-08-09 00:04:23 UTC) #15
Message was sent while issue was closed.
Change committed as 155805

Powered by Google App Engine
This is Rietveld 408576698