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

Issue 181063022: cc: Trigger GPU rasterization based on a per-layer hint (Closed)

Created:
6 years, 9 months ago by ajuma
Modified:
6 years, 9 months ago
CC:
chromium-reviews, chrome-speed-team+watch_google.com, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, Vangelis Kokkevis
Visibility:
Public.

Description

cc: Trigger GPU rasterization based on a per-layer hint This adds a GPU rasterization hint to PictureLayer and PictureLayerImpl. This also replaces the existing --enable-gpu-rasterization and --disable-gpu-rasterization flags with a new --rasterization-site flag that can be given values 'cpu', 'gpu', and 'hybrid'. When running with "--rasterization-site=hybrid", only layers with a GPU rasterization hint are rasterized on the GPU. BUG=329722

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Fix compile error #

Patch Set 3 : Use a single switch with string values #

Total comments: 2

Patch Set 4 : Rebased #

Patch Set 5 : Avoid incompatible flags #

Patch Set 6 : Rebased #

Total comments: 3

Patch Set 7 : Rebased #

Patch Set 8 : Move flags to RenderThreadImpl #

Total comments: 6

Patch Set 9 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+482 lines, -185 lines) Patch
M android_webview/lib/main/aw_main_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M cc/base/switches.h View 1 2 3 4 5 6 7 3 chunks +0 lines, -13 lines 0 comments Download
M cc/base/switches.cc View 1 2 3 4 5 6 7 4 chunks +2 lines, -80 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/layer.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/picture_layer.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M cc/layers/picture_layer.cc View 1 2 3 3 chunks +11 lines, -0 lines 0 comments Download
M cc/layers/picture_layer_impl.h View 3 chunks +4 lines, -8 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 8 chunks +26 lines, -13 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 chunks +71 lines, -10 lines 0 comments Download
A cc/test/gpu_rasterization_settings.h View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
A cc/test/hybrid_rasterization_settings.h View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 1 chunk +113 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +13 lines, -4 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 4 chunks +20 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/login/chrome_restart_request.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -6 lines 0 comments Download
M content/browser/gpu/compositor_util.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/gpu/compositor_util.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 6 chunks +11 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 7 chunks +26 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -6 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 2 chunks +23 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +36 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/test/gpu/gpu_tests/gpu_rasterization.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tools/perf/benchmarks/smoothness.py View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M webkit/renderer/compositor_bindings/web_layer_impl.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M webkit/renderer/compositor_bindings/web_layer_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -9 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
ajuma
The Blink-side CL that actually sets GPU rasterization hints (based on will-change) is http://crrev.com/183103007.
6 years, 9 months ago (2014-03-04 21:11:25 UTC) #1
ernstm
We should use the opportunity to clean-up the naming of our flags with this patch. ...
6 years, 9 months ago (2014-03-04 21:53:51 UTC) #2
ajuma
On 2014/03/04 21:53:51, ernstm wrote: > We should use the opportunity to clean-up the naming ...
6 years, 9 months ago (2014-03-04 22:05:14 UTC) #3
vmpstr
On 2014/03/04 22:05:14, ajuma wrote: > On 2014/03/04 21:53:51, ernstm wrote: > > We should ...
6 years, 9 months ago (2014-03-04 22:07:42 UTC) #4
alokp
> (drive-by) > > I don't know if there's really any precedent, but is it ...
6 years, 9 months ago (2014-03-04 22:16:45 UTC) #5
jamesr
We can (and do) have switches with different string values. witches::kTabCaptureUpscaleQuality is one example that's ...
6 years, 9 months ago (2014-03-04 22:20:59 UTC) #6
ajuma
On 2014/03/04 22:16:45, Alok Priyadarshi wrote: > > (drive-by) > > > > I don't ...
6 years, 9 months ago (2014-03-05 00:26:13 UTC) #7
ernstm
On 2014/03/05 00:26:13, ajuma wrote: > On 2014/03/04 22:16:45, Alok Priyadarshi wrote: > > > ...
6 years, 9 months ago (2014-03-05 00:36:00 UTC) #8
ajuma
PTAL. This now uses "--rasterization-site", with values 'cpu', 'gpu' and 'hybrid'. > You should check ...
6 years, 9 months ago (2014-03-05 19:41:48 UTC) #9
Vangelis Kokkevis
https://codereview.chromium.org/181063022/diff/90001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/181063022/diff/90001/content/renderer/gpu/render_widget_compositor.cc#newcode130 content/renderer/gpu/render_widget_compositor.cc:130: if (cc::switches::IsGpuRasterizationEnabled()) Should we also check if impl-side-painting is ...
6 years, 9 months ago (2014-03-05 19:52:07 UTC) #10
ajuma
https://codereview.chromium.org/181063022/diff/90001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/181063022/diff/90001/content/renderer/gpu/render_widget_compositor.cc#newcode130 content/renderer/gpu/render_widget_compositor.cc:130: if (cc::switches::IsGpuRasterizationEnabled()) On 2014/03/05 19:52:08, Vangelis Kokkevis wrote: > ...
6 years, 9 months ago (2014-03-05 20:37:02 UTC) #11
ajuma
enne, PTAL.
6 years, 9 months ago (2014-03-06 15:27:13 UTC) #12
enne (OOO)
Looks good in general. A few small comments: https://codereview.chromium.org/181063022/diff/60001/cc/base/switches.h File cc/base/switches.h (right): https://codereview.chromium.org/181063022/diff/60001/cc/base/switches.h#newcode29 cc/base/switches.h:29: CC_EXPORT ...
6 years, 9 months ago (2014-03-06 21:28:45 UTC) #13
ajuma
https://codereview.chromium.org/181063022/diff/60001/cc/base/switches.h File cc/base/switches.h (right): https://codereview.chromium.org/181063022/diff/60001/cc/base/switches.h#newcode29 cc/base/switches.h:29: CC_EXPORT extern const char kEnableUniversalGPURasterization[]; On 2014/03/06 21:28:46, enne ...
6 years, 9 months ago (2014-03-06 21:44:27 UTC) #14
enne (OOO)
lgtm
6 years, 9 months ago (2014-03-06 21:54:04 UTC) #15
enne (OOO)
lgtm
6 years, 9 months ago (2014-03-06 21:54:07 UTC) #16
ajuma
+piman for content/ and chrome/browser/chromeos/login OWNERS.
6 years, 9 months ago (2014-03-06 21:57:18 UTC) #17
piman
https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc File cc/base/switches.cc (right): https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc#newcode178 cc/base/switches.cc:178: return false; I think all these flags and helper ...
6 years, 9 months ago (2014-03-06 22:13:52 UTC) #18
ernstm
https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc File cc/base/switches.cc (right): https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc#newcode178 cc/base/switches.cc:178: return false; > They're also not accurate since gpu ...
6 years, 9 months ago (2014-03-06 22:47:25 UTC) #19
ernstm
https://codereview.chromium.org/181063022/diff/150001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/181063022/diff/150001/content/renderer/gpu/render_widget_compositor.cc#newcode131 content/renderer/gpu/render_widget_compositor.cc:131: cmd->HasSwitch(switches::kEnableBleedingEdgeRenderingFastPaths)) --enable-bleeding-edge-rendering-fast-paths should enable hybrid rasterization not gpu rasterization.
6 years, 9 months ago (2014-03-06 22:57:50 UTC) #20
piman
On 2014/03/06 22:47:25, ernstm wrote: > https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc > File cc/base/switches.cc (right): > > https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc#newcode178 > ...
6 years, 9 months ago (2014-03-06 22:58:59 UTC) #21
ajuma
On 2014/03/06 22:57:50, ernstm wrote: > https://codereview.chromium.org/181063022/diff/150001/content/renderer/gpu/render_widget_compositor.cc > File content/renderer/gpu/render_widget_compositor.cc (right): > > https://codereview.chromium.org/181063022/diff/150001/content/renderer/gpu/render_widget_compositor.cc#newcode131 > ...
6 years, 9 months ago (2014-03-06 23:03:15 UTC) #22
ernstm
> I was planning on switching this to hybrid after the Blink CL for setting ...
6 years, 9 months ago (2014-03-06 23:15:28 UTC) #23
ernstm
On 2014/03/06 23:15:28, ernstm wrote: > > I was planning on switching this to hybrid ...
6 years, 9 months ago (2014-03-06 23:17:22 UTC) #24
ajuma
On 2014/03/06 22:13:52, piman wrote: > https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc > File cc/base/switches.cc (right): > > https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc#newcode178 > ...
6 years, 9 months ago (2014-03-07 00:26:40 UTC) #25
piman
On 2014/03/07 00:26:40, ajuma wrote: > On 2014/03/06 22:13:52, piman wrote: > > https://codereview.chromium.org/181063022/diff/150001/cc/base/switches.cc > ...
6 years, 9 months ago (2014-03-07 00:46:24 UTC) #26
ajuma
PTAL. > So... the long answer is... > 1- compositor_bindings shouldn't use IsImplSidePaintingEnabled(), instead > ...
6 years, 9 months ago (2014-03-07 19:23:53 UTC) #27
piman
LGTM+a few nits. Thanks for the cleanup! https://codereview.chromium.org/181063022/diff/220001/content/browser/gpu/compositor_util.h File content/browser/gpu/compositor_util.h (right): https://codereview.chromium.org/181063022/diff/220001/content/browser/gpu/compositor_util.h#newcode22 content/browser/gpu/compositor_util.h:22: // Returns ...
6 years, 9 months ago (2014-03-07 19:41:03 UTC) #28
ajuma
enne, does this still look good to you? https://codereview.chromium.org/181063022/diff/220001/content/browser/gpu/compositor_util.h File content/browser/gpu/compositor_util.h (right): https://codereview.chromium.org/181063022/diff/220001/content/browser/gpu/compositor_util.h#newcode22 content/browser/gpu/compositor_util.h:22: // ...
6 years, 9 months ago (2014-03-07 20:21:10 UTC) #29
nduca
lgtm i'd like the flag changes to be separated out from plumbing please. i'd also ...
6 years, 9 months ago (2014-03-07 23:17:11 UTC) #30
nduca
er, not lgtm
6 years, 9 months ago (2014-03-07 23:17:31 UTC) #31
ajuma
On 2014/03/07 23:17:11, nduca wrote: > lgtm > > i'd like the flag changes to ...
6 years, 9 months ago (2014-03-07 23:26:54 UTC) #32
ajuma
On 2014/03/07 23:26:54, ajuma wrote: > On 2014/03/07 23:17:11, nduca wrote: > > lgtm > ...
6 years, 9 months ago (2014-03-07 23:29:31 UTC) #33
ajuma
6 years, 9 months ago (2014-03-08 01:18:58 UTC) #34
Given Nat's comments, I'm going to close this CL and put the flag changes and
the plumbing in separate CLs.

The CL for flag changes is: https://codereview.chromium.org/189883009/

Powered by Google App Engine
This is Rietveld 408576698