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

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)

Created:
3 years, 11 months ago by ericrk
Modified:
3 years, 10 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, jbauman, mlamouri+watch-content_chromium.org, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move GPU raster decision making to GPU proc This change moves decision making about whether to use GPU raster from the browser process to the GPU process. This allows the decision to be made based on more detailed GPU information, which is not available to the browser. The new decision making process is as follows: The GPU process loads the GPU blacklist at startup, using more complete GPUInfo than is available to the browser. This data is combined with flags (forwarded from the browser) to generate a GpuFeatureInfo struct which contains enabled/ blacklisted/disabled values for each GPU feature (currently only populated for GPU raster). The GPU process notifies the browser of its decision by passing the GpuFeatureInfo via GpuHostMessage_Initialized. The browser uses this info solely to populate about:gpu. The GPU process notifies the renderer process of its decision via context capabilities. The renderer uses this info to make decisions on how to rasterize. In the Render process, we now recieve GPU raster information at a later point (when we create our CompositorFrameSink), so we can't store this info in LayerTreeSettings. This requires a bit of refactoring to have tests use context Capabilities rather than LayerTreeSettings to provide this information. BUG=648493 R=zmo@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2654993004 Cr-Commit-Position: refs/heads/master@{#449729} Committed: https://chromium.googlesource.com/chromium/src/+/41a1579e255266ab1f48bfd3c963aebde8579f44

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 4

Patch Set 3 : Feedback + add rest of logic back in #

Total comments: 8

Patch Set 4 : rebase #

Patch Set 5 : feedback #

Patch Set 6 : Add missing files and fix unit tests #

Patch Set 7 : rebase #

Total comments: 4

Patch Set 8 : feedback #

Total comments: 2

Patch Set 9 : fix android build #

Patch Set 10 : fix win clang build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+420 lines, -200 lines) Patch
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 3 chunks +4 lines, -2 lines 0 comments Download
M cc/layers/texture_layer_impl_unittest.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M cc/test/fake_compositor_frame_sink.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
D cc/test/gpu_rasterization_enabled_settings.h View 1 2 1 chunk +0 lines, -21 lines 0 comments Download
M cc/test/layer_test_common.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/layer_test_common.cc View 1 2 1 chunk +11 lines, -1 line 0 comments Download
M cc/test/test_web_graphics_context_3d.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 2 chunks +15 lines, -4 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_impl_unittest.cc View 1 2 7 chunks +16 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_synchronous.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_pixeltest_tiles.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 7 chunks +15 lines, -15 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/gpu/compositor_util.cc View 1 chunk +2 lines, -15 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl.h View 1 2 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl.cc View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl_private.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl_private.cc View 1 2 3 4 5 6 7 8 9 6 chunks +27 lines, -21 lines 0 comments Download
M content/browser/gpu/gpu_process_host.h View 1 2 3 4 5 6 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 3 chunks +11 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 3 chunks +1 line, -6 lines 0 comments Download
M content/common/gpu_host_messages.h View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M content/gpu/gpu_child_thread.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 6 5 chunks +14 lines, -11 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/gpu/in_process_gpu_thread.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M content/public/browser/gpu_data_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_features.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/public/common/content_features.cc View 1 2 3 4 5 6 1 chunk +0 lines, -11 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 3 chunks +0 lines, -3 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 3 chunks +0 lines, -12 lines 0 comments Download
M content/renderer/gpu/compositor_dependencies.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -6 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download
M content/shell/app/shell_main_delegate.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/test/fake_compositor_dependencies.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/test/fake_compositor_dependencies.cc View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M gpu/command_buffer/common/capabilities.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/context_group.h View 1 2 4 chunks +7 lines, -1 line 0 comments Download
M gpu/command_buffer/service/context_group.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/context_group_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 1 chunk +6 lines, -5 lines 0 comments Download
M gpu/command_buffer/tests/fuzzer_main.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M gpu/config/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
A gpu/config/gpu_feature_info.h View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
A gpu/config/gpu_feature_info.cc View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
A gpu/config/gpu_finch_features.h View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A gpu/config/gpu_finch_features.cc View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
M gpu/config/gpu_switches.h View 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/config/gpu_switches.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M gpu/config/gpu_util.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M gpu/config/gpu_util.cc View 1 2 3 4 5 6 7 8 3 chunks +48 lines, -0 lines 0 comments Download
M gpu/gles2_conform_support/egl/context.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M gpu/ipc/common/gpu_command_buffer_traits_multi.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/common/gpu_param_traits_macros.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M gpu/ipc/in_process_command_buffer.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M gpu/ipc/in_process_command_buffer.cc View 1 2 3 3 chunks +2 lines, -4 lines 0 comments Download
M gpu/ipc/service/gpu_channel_manager.h View 1 2 4 chunks +5 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_channel_manager.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_channel_test_common.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_init.h View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M gpu/ipc/service/gpu_init.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/gpu/gpu_main.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/gpu/gpu_service.h View 1 2 3 chunks +9 lines, -1 line 0 comments Download
M services/ui/gpu/gpu_service.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 63 (44 generated)
ericrk
Hi Mo, This is part 1 of a few dependent CLs (which I will eventually ...
3 years, 11 months ago (2017-01-25 19:53:21 UTC) #2
Zhenyao Mo
Looks like the right direction to go. https://codereview.chromium.org/2654993004/diff/20001/gpu/config/gpu_feature_status.h File gpu/config/gpu_feature_status.h (right): https://codereview.chromium.org/2654993004/diff/20001/gpu/config/gpu_feature_status.h#newcode14 gpu/config/gpu_feature_status.h:14: std::set<int> enabled_features; ...
3 years, 11 months ago (2017-01-25 22:37:09 UTC) #3
ericrk
Here's the updated CL, let me know how this looks. https://codereview.chromium.org/2654993004/diff/20001/gpu/config/gpu_feature_status.h File gpu/config/gpu_feature_status.h (right): https://codereview.chromium.org/2654993004/diff/20001/gpu/config/gpu_feature_status.h#newcode14 ...
3 years, 10 months ago (2017-01-30 15:36:07 UTC) #5
ericrk
https://codereview.chromium.org/2654993004/diff/40001/content/browser/gpu/gpu_data_manager_impl_private.cc File content/browser/gpu/gpu_data_manager_impl_private.cc (right): https://codereview.chromium.org/2654993004/diff/40001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode307 content/browser/gpu/gpu_data_manager_impl_private.cc:307: return gpu_feature_info_ We could also put an IsFeatureEnabled on ...
3 years, 10 months ago (2017-01-30 15:41:24 UTC) #6
ericrk
On 2017/01/30 15:41:24, ericrk wrote: > https://codereview.chromium.org/2654993004/diff/40001/content/browser/gpu/gpu_data_manager_impl_private.cc > File content/browser/gpu/gpu_data_manager_impl_private.cc (right): > > https://codereview.chromium.org/2654993004/diff/40001/content/browser/gpu/gpu_data_manager_impl_private.cc#newcode307 > ...
3 years, 10 months ago (2017-02-03 19:38:17 UTC) #7
Zhenyao Mo
Sorry about the delay. LGTM with one question. (I didn't look at cc though). The ...
3 years, 10 months ago (2017-02-03 23:57:32 UTC) #9
ericrk
zmo@, created a bug to track the about:gpu info. Addressed other comments. Thanks! https://codereview.chromium.org/2654993004/diff/40001/content/browser/gpu/gpu_data_manager_impl_private.cc File ...
3 years, 10 months ago (2017-02-06 19:51:38 UTC) #17
ericrk
+enne@ for cc/ - We now get the GPU raster status from context caps rather ...
3 years, 10 months ago (2017-02-06 20:01:51 UTC) #19
enne (OOO)
cc lgtm
3 years, 10 months ago (2017-02-06 20:14:53 UTC) #24
ericrk
+jbauman FYI
3 years, 10 months ago (2017-02-06 21:55:04 UTC) #30
rjkroege
services/ui lgtm https://codereview.chromium.org/2654993004/diff/180001/gpu/config/gpu_util.h File gpu/config/gpu_util.h (right): https://codereview.chromium.org/2654993004/diff/180001/gpu/config/gpu_util.h#newcode43 gpu/config/gpu_util.h:43: GPU_EXPORT GpuFeatureInfo can you say if it's ...
3 years, 10 months ago (2017-02-07 00:42:41 UTC) #35
dcheng
https://codereview.chromium.org/2654993004/diff/180001/gpu/config/gpu_feature_info.h File gpu/config/gpu_feature_info.h (right): https://codereview.chromium.org/2654993004/diff/180001/gpu/config/gpu_feature_info.h#newcode20 gpu/config/gpu_feature_info.h:20: kGpuFeatureStatusMax kGpuFeatureStatusMax = kGpuFeatureStatusUndefined How many features does this ...
3 years, 10 months ago (2017-02-07 00:58:22 UTC) #36
jochen (gone - plz use gerrit)
content/ lgtm
3 years, 10 months ago (2017-02-07 15:09:50 UTC) #37
ericrk
Thanks for the feedback. Updated. https://codereview.chromium.org/2654993004/diff/180001/gpu/config/gpu_feature_info.h File gpu/config/gpu_feature_info.h (right): https://codereview.chromium.org/2654993004/diff/180001/gpu/config/gpu_feature_info.h#newcode20 gpu/config/gpu_feature_info.h:20: kGpuFeatureStatusMax On 2017/02/07 00:58:22, ...
3 years, 10 months ago (2017-02-08 21:29:46 UTC) #40
dcheng
ipc lgtm, but I think you'll need to fix the fuzzer to understand how to ...
3 years, 10 months ago (2017-02-08 22:33:11 UTC) #43
ericrk
On 2017/02/08 22:33:11, dcheng wrote: > ipc lgtm, but I think you'll need to fix ...
3 years, 10 months ago (2017-02-10 18:41:20 UTC) #56
ericrk
https://codereview.chromium.org/2654993004/diff/200001/gpu/config/gpu_feature_info.h File gpu/config/gpu_feature_info.h (right): https://codereview.chromium.org/2654993004/diff/200001/gpu/config/gpu_feature_info.h#newcode8 gpu/config/gpu_feature_info.h:8: #include <array> On 2017/02/08 22:33:11, dcheng wrote: > Nit: ...
3 years, 10 months ago (2017-02-10 19:27:46 UTC) #57
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/2654993004/250001
3 years, 10 months ago (2017-02-10 19:28:48 UTC) #60
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 20:57:11 UTC) #63
Message was sent while issue was closed.
Committed patchset #10 (id:250001) as
https://chromium.googlesource.com/chromium/src/+/41a1579e255266ab1f48bfd3c963...

Powered by Google App Engine
This is Rietveld 408576698