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

Issue 916723002: cc: Add threaded GPU rasterization. (Closed)

Created:
5 years, 10 months ago by vmiura
Modified:
5 years, 10 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, piman+watch_chromium.org, sievers+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

cc: Add threaded GPU rasterization. Enable flag: --enable-threaded-gpu-rasterization This patch enables threaded rasterization in GpuTileTaskWorkerPool. There are some not yet landed/rolled dependencies: InProcessContextProvider Context Lost handling (jbauman@). Without this the feature should be considered unstable on WebViews. BUG=454500 Committed: https://crrev.com/78b692864e7745993b8be343f67968ca071e0642 Cr-Commit-Position: refs/heads/master@{#316333}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Fix initial issues. #

Patch Set 3 : Add LayerTreeSettings::gpu_rasterization_skewport_factor. #

Total comments: 2

Patch Set 4 : Update raster skewport setting. Rebase and update test context provider to match latest Skia. #

Total comments: 6

Patch Set 5 : Fix NULL -> nullptr. #

Patch Set 6 : Fix Android build. #

Patch Set 7 : Layer hoisting bug looks fixed, so removing use of SkMultiPictureDraw. #

Patch Set 8 : Removed now dead code in GpuChannelHost. #

Patch Set 9 : #

Patch Set 10 : Rebase. Split GpuRasterizationRasterizesVisibleOnly for sync/threaded GPU modes. #

Patch Set 11 : Fix SynchronousCompositor setup. #

Total comments: 5

Patch Set 12 : Other SynchronousCompositor fixes. #

Patch Set 13 : Hold context lock when GpuTTWP accesses worker context. #

Total comments: 5

Patch Set 14 : Implement ContextProviderInProcess::DetachFromThread(). #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+373 lines, -107 lines) Patch
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M cc/output/context_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/output_surface.h View 1 chunk +2 lines, -1 line 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +17 lines, -5 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/resources/gpu_rasterizer.h View 3 chunks +11 lines, -1 line 0 comments Download
M cc/resources/gpu_rasterizer.cc View 1 2 3 4 5 6 4 chunks +51 lines, -9 lines 0 comments Download
M cc/resources/gpu_tile_task_worker_pool.h View 4 chunks +4 lines, -4 lines 0 comments Download
M cc/resources/gpu_tile_task_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +53 lines, -10 lines 0 comments Download
M cc/resources/resource_provider.h View 3 chunks +12 lines, -6 lines 0 comments Download
M cc/resources/resource_provider.cc View 4 chunks +24 lines, -12 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_task_worker_pool_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -1 line 0 comments Download
M cc/resources/tile_task_worker_pool_unittest.cc View 5 chunks +9 lines, -2 lines 0 comments Download
M cc/test/failure_output_surface.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_output_surface.h View 4 chunks +15 lines, -5 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M cc/test/layer_tree_pixel_resource_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/pixel_test.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/pixel_test_output_surface.h View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/pixel_test_output_surface.cc View 1 chunk +13 lines, -2 lines 0 comments Download
M cc/test/test_context_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/test_context_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +57 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_factory_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_factory_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +7 lines, -6 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -6 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 3 chunks +16 lines, -8 lines 0 comments Download
M webkit/common/gpu/context_provider_in_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M webkit/common/gpu/context_provider_in_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 1 comment Download

Messages

Total messages: 43 (11 generated)
vmiura
PTAL. Almost have the pieces to turn on the threaded raster. vmpstr@chromium.org, hendrikw@chromium.org: CC, GpuRasterWorkerPool, ...
5 years, 10 months ago (2015-02-11 03:05:19 UTC) #2
enne (OOO)
cc and cc unit tests look fine % vmpstr and hendrikw https://codereview.chromium.org/916723002/diff/1/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): ...
5 years, 10 months ago (2015-02-11 18:19:52 UTC) #5
vmpstr
Is threaded gpu rasterization better than synchronous gpu rasterization in all cases? If so, then ...
5 years, 10 months ago (2015-02-11 19:00:52 UTC) #6
vmiura
> Is threaded gpu rasterization better than synchronous gpu > rasterization in all cases? If ...
5 years, 10 months ago (2015-02-11 20:13:18 UTC) #7
enne (OOO)
https://codereview.chromium.org/916723002/diff/1/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/916723002/diff/1/cc/layers/picture_layer_impl.cc#newcode1142 cc/layers/picture_layer_impl.cc:1142: settings.threaded_gpu_rasterization_enabled ? 0.2f : 0.0f; On 2015/02/11 20:13:18, vmiura ...
5 years, 10 months ago (2015-02-11 20:45:16 UTC) #8
vmiura
PTAL https://codereview.chromium.org/916723002/diff/1/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/916723002/diff/1/cc/layers/picture_layer_impl.cc#newcode1142 cc/layers/picture_layer_impl.cc:1142: settings.threaded_gpu_rasterization_enabled ? 0.2f : 0.0f; On 2015/02/11 20:45:15, ...
5 years, 10 months ago (2015-02-11 22:12:50 UTC) #9
enne (OOO)
https://codereview.chromium.org/916723002/diff/40001/cc/trees/layer_tree_settings.cc File cc/trees/layer_tree_settings.cc (right): https://codereview.chromium.org/916723002/diff/40001/cc/trees/layer_tree_settings.cc#newcode33 cc/trees/layer_tree_settings.cc:33: gpu_rasterization_skewport_factor(0.0f), The reason I wanted this change in the ...
5 years, 10 months ago (2015-02-11 22:23:38 UTC) #10
vmpstr
On 2015/02/11 20:13:18, vmiura wrote: > > Is threaded gpu rasterization better than synchronous gpu ...
5 years, 10 months ago (2015-02-11 22:27:25 UTC) #11
vmiura
https://codereview.chromium.org/916723002/diff/40001/cc/trees/layer_tree_settings.cc File cc/trees/layer_tree_settings.cc (right): https://codereview.chromium.org/916723002/diff/40001/cc/trees/layer_tree_settings.cc#newcode33 cc/trees/layer_tree_settings.cc:33: gpu_rasterization_skewport_factor(0.0f), On 2015/02/11 22:23:38, enne wrote: > The reason ...
5 years, 10 months ago (2015-02-11 23:32:43 UTC) #12
enne (OOO)
Thanks! lgtm
5 years, 10 months ago (2015-02-11 23:33:40 UTC) #13
jbauman
OutputSurface/ContextProvider lgtm
5 years, 10 months ago (2015-02-11 23:46:09 UTC) #14
vmpstr
Thanks for filing the crbug, lgtm with some nits https://codereview.chromium.org/916723002/diff/60001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/916723002/diff/60001/cc/resources/gpu_rasterizer.cc#newcode124 cc/resources/gpu_rasterizer.cc:124: ...
5 years, 10 months ago (2015-02-11 23:53:38 UTC) #15
vmiura
https://codereview.chromium.org/916723002/diff/60001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/916723002/diff/60001/cc/resources/gpu_rasterizer.cc#newcode124 cc/resources/gpu_rasterizer.cc:124: multi_picture_draw.add(write_lock->sk_surface()->getCanvas(), On 2015/02/11 23:53:37, vmpstr wrote: > Do we ...
5 years, 10 months ago (2015-02-12 00:00:12 UTC) #16
vmiura
https://codereview.chromium.org/916723002/diff/60001/cc/test/failure_output_surface.cc File cc/test/failure_output_surface.cc (right): https://codereview.chromium.org/916723002/diff/60001/cc/test/failure_output_surface.cc#newcode10 cc/test/failure_output_surface.cc:10: : FakeOutputSurface(static_cast<ContextProvider*>(nullptr), is_delegating) { On 2015/02/11 23:53:37, vmpstr wrote: ...
5 years, 10 months ago (2015-02-12 00:12:03 UTC) #18
vmiura
5 years, 10 months ago (2015-02-12 00:12:06 UTC) #19
vmpstr
On 2015/02/12 00:00:12, vmiura wrote: > https://codereview.chromium.org/916723002/diff/60001/cc/resources/gpu_rasterizer.cc > File cc/resources/gpu_rasterizer.cc (right): > > https://codereview.chromium.org/916723002/diff/60001/cc/resources/gpu_rasterizer.cc#newcode124 > ...
5 years, 10 months ago (2015-02-12 00:21:06 UTC) #20
no sievers
content/renderer lgtm
5 years, 10 months ago (2015-02-12 00:45:04 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/916723002/180001
5 years, 10 months ago (2015-02-12 23:32:42 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/24524)
5 years, 10 months ago (2015-02-13 01:23:11 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/916723002/180001
5 years, 10 months ago (2015-02-13 01:31:29 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: android_rel_tests_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_rel_tests_recipe/builds/1274)
5 years, 10 months ago (2015-02-13 03:11:18 UTC) #30
vmiura
I need someone to look at the newest SynchronousCompositor changes. Looks like sievers is OOO. ...
5 years, 10 months ago (2015-02-13 03:16:43 UTC) #32
boliu
https://codereview.chromium.org/916723002/diff/200001/content/browser/android/in_process/synchronous_compositor_factory_impl.cc File content/browser/android/in_process/synchronous_compositor_factory_impl.cc (right): https://codereview.chromium.org/916723002/diff/200001/content/browser/android/in_process/synchronous_compositor_factory_impl.cc#newcode84 content/browser/android/in_process/synchronous_compositor_factory_impl.cc:84: true /* share_resources */, This is causing video context ...
5 years, 10 months ago (2015-02-13 18:04:05 UTC) #33
vmiura
PTAL https://codereview.chromium.org/916723002/diff/200001/content/browser/android/in_process/synchronous_compositor_factory_impl.cc File content/browser/android/in_process/synchronous_compositor_factory_impl.cc (right): https://codereview.chromium.org/916723002/diff/200001/content/browser/android/in_process/synchronous_compositor_factory_impl.cc#newcode84 content/browser/android/in_process/synchronous_compositor_factory_impl.cc:84: true /* share_resources */, On 2015/02/13 18:04:05, boliu ...
5 years, 10 months ago (2015-02-13 19:52:35 UTC) #34
boliu
A note about context loss handling in webview. Webview never handled context loss, and would ...
5 years, 10 months ago (2015-02-13 20:25:53 UTC) #35
vmiura
https://codereview.chromium.org/916723002/diff/240001/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/916723002/diff/240001/cc/output/output_surface.cc#newcode149 cc/output/output_surface.cc:149: success = worker_context_provider->BindToCurrentThread(); On 2015/02/13 20:25:52, boliu wrote: > ...
5 years, 10 months ago (2015-02-13 21:28:32 UTC) #36
vmiura
Done, PTAL. https://codereview.chromium.org/916723002/diff/260001/webkit/common/gpu/context_provider_in_process.cc File webkit/common/gpu/context_provider_in_process.cc (right): https://codereview.chromium.org/916723002/diff/260001/webkit/common/gpu/context_provider_in_process.cc#newcode112 webkit/common/gpu/context_provider_in_process.cc:112: void ContextProviderInProcess::DetachFromThread() { Added this.
5 years, 10 months ago (2015-02-13 22:06:43 UTC) #37
danakj
webkit/ LGTM
5 years, 10 months ago (2015-02-13 22:11:20 UTC) #38
boliu
in_process and general webview bits lgtm
5 years, 10 months ago (2015-02-13 22:17:45 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/916723002/260001
5 years, 10 months ago (2015-02-13 22:30:59 UTC) #41
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 10 months ago (2015-02-14 00:01:40 UTC) #42
commit-bot: I haz the power
5 years, 10 months ago (2015-02-14 00:02:28 UTC) #43
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/78b692864e7745993b8be343f67968ca071e0642
Cr-Commit-Position: refs/heads/master@{#316333}

Powered by Google App Engine
This is Rietveld 408576698