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

Issue 869433003: (not for commit) Simplified multi-threaded Ganesh with lock on Flush only. (Closed)

Created:
5 years, 11 months ago by vmiura
Modified:
5 years, 10 months ago
Reviewers:
hendrikw, vmpstr
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, Ian Vollick, nasko+codewatch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, mkwst+moarreviews-renderer_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org, Vangelis Kokkevis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

(not for commit) Simplified multi-threaded Ganesh with lock on Flush only. --enable-threaded-gpu-rasterization to turn on (default). --disable-threaded-gpu-rasterization to turn off. This must be applied on top of https://codereview.chromium.org/889063002/ "Create 2nd ContextProvider for Ganesh rasterization." BUG=

Patch Set 1 #

Patch Set 2 : Tune some Ganesh layer properties. #

Patch Set 3 : #

Patch Set 4 : Re-enable PictureLayerImpl::ShouldAdjustRasterScaleDuringScaleAnimations #

Patch Set 5 : Rebase #

Patch Set 6 : Split into two CLs. #

Patch Set 7 : Change switch to --enable-threaded-gpu-rasterization, on by default. #

Patch Set 8 : Use MultiPictureDraw to workaround hoisting issue. #

Patch Set 9 : Max 1 thread for GPU rasterization. #

Patch Set 10 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -480 lines) Patch
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 9 1 chunk +5 lines, -3 lines 0 comments Download
M cc/layers/tiled_layer_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -7 lines 0 comments Download
M cc/output/context_provider.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 5 14 chunks +41 lines, -103 lines 0 comments Download
M cc/output/overlay_unittest.cc View 1 2 3 4 5 9 3 chunks +7 lines, -10 lines 0 comments Download
M cc/output/renderer_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/output/software_renderer_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -7 lines 0 comments Download
M cc/resources/gpu_rasterizer.h View 1 2 3 4 5 6 3 chunks +8 lines, -7 lines 0 comments Download
M cc/resources/gpu_rasterizer.cc View 1 2 3 4 5 6 3 chunks +12 lines, -10 lines 0 comments Download
M cc/resources/gpu_tile_task_worker_pool.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M cc/resources/gpu_tile_task_worker_pool.cc View 1 2 3 4 5 6 7 9 7 chunks +87 lines, -8 lines 0 comments Download
M cc/resources/picture_layer_tiling_perftest.cc View 1 2 3 4 5 1 chunk +4 lines, -7 lines 0 comments Download
M cc/resources/picture_layer_tiling_set_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -8 lines 0 comments Download
M cc/resources/prioritized_resource_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -7 lines 0 comments Download
M cc/resources/resource_provider.h View 1 2 3 4 5 5 chunks +9 lines, -5 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 chunks +32 lines, -22 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 24 chunks +76 lines, -196 lines 0 comments Download
M cc/resources/resource_update_controller_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -7 lines 0 comments Download
M cc/resources/scoped_resource_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -8 lines 0 comments Download
M cc/resources/tile_task_worker_pool_perftest.cc View 1 2 3 4 5 3 chunks +6 lines, -5 lines 0 comments Download
M cc/resources/tile_task_worker_pool_unittest.cc View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M cc/resources/video_resource_updater_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -8 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/surfaces/surface_aggregator_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -7 lines 0 comments Download
M cc/test/fake_tile_manager.cc View 1 2 3 4 2 chunks +3 lines, -8 lines 0 comments Download
M cc/test/pixel_test.cc View 1 2 3 4 5 9 2 chunks +8 lines, -16 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_context.cc View 1 2 3 4 5 6 9 1 chunk +3 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/gpu/compositor_util.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/gpu/compositor_util.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 9 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.cc View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M content/renderer/gpu/compositor_dependencies.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 9 2 chunks +7 lines, -0 lines 0 comments Download
M content/test/fake_compositor_dependencies.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/test/fake_compositor_dependencies.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper.h View 3 chunks +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper.cc View 1 2 3 4 4 chunks +24 lines, -2 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface.h View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
vmiura
5 years, 10 months ago (2015-01-31 00:42:38 UTC) #2
This is not commit ready but I'd appreciate it if you can take a look.

The changes are actually pretty simple (once we have the two contexts set up,
which I split into the other patch).

In gpu_tile_task_worker_pool.cc
RasterBufferImpl::Playback() creates the SkSurface, plays back the picture into
it and releases the SkSurface.

GpuTileTaskWorkerPool::ScheduleTasks() runs ShallowFlushCHROMIUM() on the CC's
context just before scheduling tasks to TGR.  This will make sure the Worker's
context sees any new Resource GL handles.

GpuTileTaskWorkerPool::CheckForCompletedTasks() runs SafeFlush() on the Worker's
context to make sure the CC's context sees updates from any completed tasks.

In terms of settings when in GPU raster with --enable-tile-prepare:

- Same old Ganesh size tiles
- Memory policy of CUTOFF_ALLOW_NICE_TO_HAVE so only NOW + SOON tiles are
rendered.  This bounds how much the worker thread floods the GPU.  It may be
nice if we could switch to CUTOFF_ALLOW_EVERYTHING on a frame that is otherwise
otherwise idle.
- Skewport distance is 0.2 seconds (seems to work well, haven't spent much time
trying other values).

Powered by Google App Engine
This is Rietveld 408576698