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

Issue 1297663002: Eliminate deferral overhead with canvas to canvas draws (Closed)

Created:
5 years, 4 months ago by Justin Novosad
Modified:
5 years, 4 months ago
Reviewers:
Stephen White
CC:
blink-reviews, krit, blink-reviews-html_chromium.org, drott+blinkwatch_chromium.org, dshwang, pdr+graphicswatchlist_chromium.org, jbroman, danakj, dglazkov+blink, Rik, f(malita), Stephen Chennney, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Eliminate deferral overhead with canvas to canvas draws This fixes a performance regression from r199900 which caused deferred canvas operations to be flushed all the way down to the GrContext level every time a canvas to canvas draw was performed. This was significantly slowing down uses cases the use canvases as sprite atlases. This change does more that fix the performance regression. By stoping the canvas from switching back and forth between immediate and deferred rendering, we get ~2x perf boost in cases where a GPU-accelerated canvas is used as an atlas. BUG=517504 TEST=tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=canvas_sprite&back=canvas NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200545

Patch Set 1 #

Total comments: 1

Patch Set 2 : git cl web #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -69 lines) Patch
M Source/core/html/HTMLCanvasElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/modules/canvas2d/CanvasRenderingContext2D.h View 2 chunks +2 lines, -7 lines 0 comments Download
M Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 12 chunks +25 lines, -31 lines 0 comments Download
M Source/platform/graphics/Canvas2DImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/Canvas2DLayerBridge.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/platform/graphics/Canvas2DLayerBridge.cpp View 5 chunks +24 lines, -12 lines 0 comments Download
M Source/platform/graphics/ImageBuffer.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/ImageBuffer.cpp View 1 chunk +2 lines, -4 lines 0 comments Download
M Source/platform/graphics/ImageBufferSurface.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/RecordingImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/RecordingImageBufferSurface.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/platform/graphics/UnacceleratedImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/UnacceleratedImageBufferSurface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 9 (3 generated)
Justin Novosad
PTAL
5 years, 4 months ago (2015-08-14 14:12:38 UTC) #2
Justin Novosad
On 2015/08/14 14:12:38, Justin Novosad wrote: > PTAL CanvasDeferralMode will have been short lived. LOL
5 years, 4 months ago (2015-08-14 14:15:16 UTC) #3
Stephen White
https://codereview.chromium.org/1297663002/diff/1/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1297663002/diff/1/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode1391 Source/modules/canvas2d/CanvasRenderingContext2D.cpp:1391: // FIXME: crbug.com/447218 Nit: this bug is marked as ...
5 years, 4 months ago (2015-08-14 15:10:48 UTC) #4
Stephen White
LGTM
5 years, 4 months ago (2015-08-14 15:11:01 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1297663002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1297663002/20001
5 years, 4 months ago (2015-08-14 16:06:44 UTC) #8
commit-bot: I haz the power
5 years, 4 months ago (2015-08-14 16:11:15 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200545

Powered by Google App Engine
This is Rietveld 408576698