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

Issue 413313002: Treat calls to CanvasRenderingContext2D.clearRect as operations that clear the canvas (Closed)

Created:
6 years, 5 months ago by Justin Novosad
Modified:
6 years, 4 months ago
CC:
blink-reviews, jamesr, krit, jbroman, danakj, Rik, Stephen Chennney, pdr., rwlbuis, Sergey, Hongbo Min
Project:
blink
Visibility:
Public.

Description

Treat calls to CanvasRenderingContext2D.clearRect as operations that clear the canvas Currently RecordingImageBufferSurface determines whether the canvas was cleared by tracking opaque draws. For this purpose we need all draw operations that completely overwrite the destination pixels to be treated as opaque even though the resulting pixels may not be opaque (alpha = 1). To solve this problem we introduce an alternate mode of operation in OpaqueRegionSkia, which was renamed to RegionTracker, to reflect its new more generic vocation. BUG=397205 TEST=blink platform unit test RecordingImageBufferSurface.clearRect Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179074

Patch Set 1 #

Total comments: 2

Patch Set 2 : applied review comments #

Patch Set 3 : rebase #

Patch Set 4 : fix compile errors in unit tests #

Patch Set 5 : regionTrackingEnabled #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -658 lines) Patch
M Source/platform/blink_platform.gypi View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.h View 1 2 3 4 4 chunks +11 lines, -5 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.cpp View 1 2 3 4 16 chunks +40 lines, -31 lines 0 comments Download
M Source/platform/graphics/GraphicsContextRecorder.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/GraphicsContextTest.cpp View 1 2 3 17 chunks +17 lines, -17 lines 0 comments Download
M Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/RecordingImageBufferSurface.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp View 3 chunks +16 lines, -0 lines 0 comments Download
A + Source/platform/graphics/RegionTracker.h View 1 3 chunks +24 lines, -11 lines 0 comments Download
A + Source/platform/graphics/RegionTracker.cpp View 1 14 chunks +56 lines, -34 lines 0 comments Download
M Source/platform/graphics/skia/OpaqueRegionSkia.h View 1 1 chunk +0 lines, -104 lines 0 comments Download
M Source/platform/graphics/skia/OpaqueRegionSkia.cpp View 1 1 chunk +0 lines, -448 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Justin Novosad
PTAL
6 years, 5 months ago (2014-07-24 21:07:39 UTC) #1
Stephen White
https://codereview.chromium.org/413313002/diff/1/Source/platform/graphics/GraphicsContext.h File Source/platform/graphics/GraphicsContext.h (right): https://codereview.chromium.org/413313002/diff/1/Source/platform/graphics/GraphicsContext.h#newcode227 Source/platform/graphics/GraphicsContext.h:227: void setTreatOverwriteAsOpaque(bool value) { m_opaqueRegion.setTreatOverwriteAsOpaque(value); } As discussed, let's ...
6 years, 5 months ago (2014-07-25 19:29:07 UTC) #2
Justin Novosad
Done. New Patch. +jamesr for Source/web/ OWNER
6 years, 4 months ago (2014-07-28 19:21:43 UTC) #3
jamesr
/web/ lgtm
6 years, 4 months ago (2014-07-28 19:29:56 UTC) #4
Stephen White
LGTM, assuming the bots are happy Optional: add a "regionTrackingEnabled()" accessor, just so that the ...
6 years, 4 months ago (2014-07-28 20:32:17 UTC) #5
Justin Novosad
The CQ bit was checked by junov@chromium.org
6 years, 4 months ago (2014-07-28 20:59:58 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junov@chromium.org/413313002/80001
6 years, 4 months ago (2014-07-28 21:00:55 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-07-28 22:11:09 UTC) #8
commit-bot: I haz the power
6 years, 4 months ago (2014-07-29 00:15:14 UTC) #9
Message was sent while issue was closed.
Change committed as 179074

Powered by Google App Engine
This is Rietveld 408576698