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

Issue 2141793002: Improving canvas 2D performance by switching graphics rendering pipeline. (Closed)

Created:
4 years, 5 months ago by sebastienlc
Modified:
4 years, 5 months ago
CC:
achuith+watch_chromium.org, ajuma+watch-canvas_chromium.org, ajuma+watch_chromium.org, asvitkine+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, davemoore+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, dzhioev+watch_chromium.org, f(malita), haraken, jam, jbroman, kinuko+watch, nasko+codewatch_chromium.org, oshima+watch_chromium.org, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improving canvas 2D performance by switching graphics rendering pipeline. 1. Functionality to switch from the accelerated (GPU) graphics pipeline to the recording graphics pipeline. 2. Simple heuristic to determine when the pipeline switch would increase performance based on how the canvas was used previously. 3. Automatically switch pipeline to increase performance based on the heuristic if the enable-canvas-2d-dynamic-pipeline-mode-switching flag is enabled. BUG=606687, 606686, 606685 TBR=grt@chromium.org Committed: https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e Cr-Commit-Position: refs/heads/master@{#406585}

Patch Set 1 #

Total comments: 28

Patch Set 2 : Addressing comments #

Total comments: 16

Patch Set 3 : Addressing comments #

Patch Set 4 : Style and comment typo #

Patch Set 5 : Added flag to histograms.xml enum LoginCustomFlags. #

Total comments: 4

Patch Set 6 : Use canvas2dFixedRenderingModeEnabled flag to disable feature in some tests and fix async issue. #

Total comments: 2

Patch Set 7 : Changed comments #

Patch Set 8 : Minor change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -2 lines) Patch
M chrome/app/generated_resources.grd View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/chrome_restart_request.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/child/runtime_features.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 5 6 7 2 chunks +28 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h View 1 2 3 4 5 6 1 chunk +41 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.h View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 2 3 4 5 3 chunks +34 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebRuntimeFeatures.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebRuntimeFeatures.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (41 generated)
sebastienlc
4 years, 5 months ago (2016-07-11 21:54:56 UTC) #3
sebastienlc
4 years, 5 months ago (2016-07-11 22:05:59 UTC) #10
Justin Novosad
Looks great overall https://codereview.chromium.org/2141793002/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2141793002/diff/1/chrome/app/generated_resources.grd#newcode5441 chrome/app/generated_resources.grd:5441: + <message name="IDS_FLAGS_ENABLE_2D_CANVAS_DYNAMIC_PIPELINE_MODE_NAME" desc="Enable canvas 2D ...
4 years, 5 months ago (2016-07-12 19:31:24 UTC) #11
Justin Novosad
Need to specify a bug in the description
4 years, 5 months ago (2016-07-12 19:32:05 UTC) #12
sebastienlc
https://codereview.chromium.org/2141793002/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2141793002/diff/1/chrome/app/generated_resources.grd#newcode5441 chrome/app/generated_resources.grd:5441: + <message name="IDS_FLAGS_ENABLE_2D_CANVAS_DYNAMIC_PIPELINE_MODE_NAME" desc="Enable canvas 2D dynamic pipeline switching ...
4 years, 5 months ago (2016-07-13 19:51:03 UTC) #14
Justin Novosad
Need to add owners content/ and chrome/ https://codereview.chromium.org/2141793002/diff/20001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2141793002/diff/20001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode332 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:332: Platform::current()->currentThread()->getWebTaskRunner()->postTask( Add ...
4 years, 5 months ago (2016-07-14 18:07:10 UTC) #15
Stephen White
https://codereview.chromium.org/2141793002/diff/20001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/2141793002/diff/20001/content/public/common/content_switches.cc#newcode367 content/public/common/content_switches.cc:367: "enable-canvas-2d-dynamic-rendering-mode"; As discussed, please add "switching" to these flags ...
4 years, 5 months ago (2016-07-14 18:53:05 UTC) #16
sebastienlc
https://codereview.chromium.org/2141793002/diff/20001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/2141793002/diff/20001/content/public/common/content_switches.cc#newcode367 content/public/common/content_switches.cc:367: "enable-canvas-2d-dynamic-rendering-mode"; On 2016/07/14 18:53:04, Stephen White wrote: > As ...
4 years, 5 months ago (2016-07-14 22:26:53 UTC) #20
jochen (gone - plz use gerrit)
(I'm waiting for junov/senorblanco to finish their reviews)
4 years, 5 months ago (2016-07-15 14:35:39 UTC) #31
Justin Novosad
lgtm with documentation nit. https://codereview.chromium.org/2141793002/diff/90021/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h File third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h (right): https://codereview.chromium.org/2141793002/diff/90021/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h#newcode88 third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h:88: // https://docs.google.com/a/google.com/document/d/11pfwfyTb6cxLiNbhpVzO5Bx_s9_dPzljYmUS9OJ6FPk/edit?usp=sharing Not ideal to ...
4 years, 5 months ago (2016-07-18 14:22:43 UTC) #40
sebastienlc
https://codereview.chromium.org/2141793002/diff/90021/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h File third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h (right): https://codereview.chromium.org/2141793002/diff/90021/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h#newcode88 third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h:88: // https://docs.google.com/a/google.com/document/d/11pfwfyTb6cxLiNbhpVzO5Bx_s9_dPzljYmUS9OJ6FPk/edit?usp=sharing On 2016/07/18 14:22:43, Justin Novosad wrote: > ...
4 years, 5 months ago (2016-07-18 20:43:07 UTC) #46
jwd
Histograms LGTM. Are there any plans/methods for determining the effectiveness of the heuristic and different ...
4 years, 5 months ago (2016-07-19 14:48:43 UTC) #48
Justin Novosad
On 2016/07/19 14:48:43, jwd wrote: > Histograms LGTM. > > Are there any plans/methods for ...
4 years, 5 months ago (2016-07-19 15:45:35 UTC) #49
Stephen White
https://codereview.chromium.org/2141793002/diff/80001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2141793002/diff/80001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode324 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:324: if (RuntimeEnabledFeatures::enableCanvas2dDynamicRenderingModeSwitchingEnabled()) { Nit: perhaps this check should be ...
4 years, 5 months ago (2016-07-19 15:47:42 UTC) #50
sebastienlc
On 2016/07/19 14:48:43, jwd wrote: > Histograms LGTM. > > Are there any plans/methods for ...
4 years, 5 months ago (2016-07-19 17:12:06 UTC) #51
sebastienlc
https://codereview.chromium.org/2141793002/diff/80001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/2141793002/diff/80001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode324 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:324: if (RuntimeEnabledFeatures::enableCanvas2dDynamicRenderingModeSwitchingEnabled()) { On 2016/07/19 15:47:41, Stephen White wrote: ...
4 years, 5 months ago (2016-07-19 18:59:24 UTC) #52
jwd
On 2016/07/19 15:45:35, Justin Novosad wrote: > On 2016/07/19 14:48:43, jwd wrote: > > Histograms ...
4 years, 5 months ago (2016-07-19 19:02:37 UTC) #53
jwd
On 2016/07/19 15:45:35, Justin Novosad wrote: > On 2016/07/19 14:48:43, jwd wrote: > > Histograms ...
4 years, 5 months ago (2016-07-19 19:02:42 UTC) #54
Stephen White
LGTM
4 years, 5 months ago (2016-07-19 19:04:07 UTC) #55
jochen (gone - plz use gerrit)
lgtm
4 years, 5 months ago (2016-07-20 10:56:37 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2141793002/130001
4 years, 5 months ago (2016-07-20 15:00:56 UTC) #60
commit-bot: I haz the power
Committed patchset #8 (id:130001)
4 years, 5 months ago (2016-07-20 16:48:29 UTC) #62
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-20 16:48:36 UTC) #63
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 16:50:18 UTC) #65
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e
Cr-Commit-Position: refs/heads/master@{#406585}

Powered by Google App Engine
This is Rietveld 408576698