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

Issue 2646243002: Use IDCompositionSurface to implement DirectCompositionSurfaceWin. (Closed)

Created:
3 years, 11 months ago by jbauman
Modified:
3 years, 9 months ago
CC:
chromium-reviews, jam, jbauman+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, cc-bugs_chromium.org, danakj+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use IDCompositionSurface to implement DirectCompositionSurfaceWin. For updates to the DirectComposition layer tree to be in sync with updates to the texture contents we need to put Chrome's backbuffer into an IDCompositionSurface instead of an IDXGISwapChain2. That way updates to the surface only happen upon commit of the visual tree. Unfortunately this adds some complication, in that Chrome must signal what region will be rendered to before actually rendering to it. All draws must have a certain offset applied to them within the output texture, though that's not yet implemented in this patch. This patch just allocates an IDCompositionSurface and renders to it. A new GL command (SetDrawRectangleCHROMIUM) must be given before drawing to the surface. BUG=678800 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;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/2646243002 Cr-Commit-Position: refs/heads/master@{#454119} Committed: https://chromium.googlesource.com/chromium/src/+/2a2ad220b1c964f4fc348a8118ae9b91c43aa50e

Patch Set 1 #

Patch Set 2 : more changes #

Patch Set 3 : more changes #

Total comments: 16

Patch Set 4 : better #

Total comments: 2

Patch Set 5 : rebase #

Total comments: 1

Patch Set 6 : post-review changes #

Patch Set 7 : rebase #

Total comments: 11

Patch Set 8 : post-review changes #

Patch Set 9 : fix build #

Patch Set 10 : fix build #

Patch Set 11 : rebase #

Patch Set 12 : rebase #

Total comments: 2

Patch Set 13 : add unittest and move implementation around #

Total comments: 4

Patch Set 14 : rebase #

Patch Set 15 : modify test #

Patch Set 16 : add mus implementation #

Patch Set 17 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+839 lines, -50 lines) Patch
M android_webview/browser/parent_output_surface.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/browser/parent_output_surface.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M cc/output/direct_renderer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M cc/output/direct_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +18 lines, -6 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +33 lines, -6 lines 0 comments Download
M cc/output/output_surface.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M cc/output/overlay_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +6 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/pixel_test_output_surface.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/pixel_test_output_surface.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/compositor/gpu_browser_compositor_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/compositor/gpu_browser_compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +17 lines, -0 lines 0 comments Download
M content/browser/compositor/offscreen_browser_compositor_output_surface.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/browser/compositor/offscreen_browser_compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/compositor/reflector_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/software_browser_compositor_output_surface.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/browser/compositor/software_browser_compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/android/synchronous_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
A gpu/GLES2/extensions/CHROMIUM/CHROMIUM_set_draw_rectangle.txt View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
M gpu/GLES2/gl2chromium_autogen.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 1 2 3 4 5 6 2 chunks +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest_autogen.h View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_autogen.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_autogen.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_autogen.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/capabilities.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +30 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_4_autogen.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/ipc/common/gpu_command_buffer_traits_multi.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/service/direct_composition_surface_win.h View 1 2 3 4 5 3 chunks +34 lines, -7 lines 0 comments Download
M gpu/ipc/service/direct_composition_surface_win.cc View 1 2 3 4 5 6 7 9 chunks +207 lines, -28 lines 0 comments Download
A gpu/ipc/service/direct_composition_surface_win_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +102 lines, -0 lines 0 comments Download
M services/ui/surfaces/display_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -0 lines 0 comments Download
M services/ui/surfaces/display_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +15 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_angle_util_win.h View 2 chunks +7 lines, -0 lines 0 comments Download
M ui/gl/gl_angle_util_win.cc View 1 2 3 4 5 6 7 1 chunk +50 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 106 (78 generated)
jbauman
Sorry, this is a pretty big patch, but thanks for looking at least at the ...
3 years, 11 months ago (2017-01-25 00:41:44 UTC) #22
sunnyps
Most comments are nits except those about more error checking on the client e.g. one ...
3 years, 10 months ago (2017-01-28 01:33:59 UTC) #23
jbauman
PTAL On 2017/01/28 01:33:59, sunnyps wrote: > Most comments are nits except those about more ...
3 years, 10 months ago (2017-02-07 22:31:40 UTC) #32
jbauman
sunnyps, ping
3 years, 10 months ago (2017-02-14 10:22:54 UTC) #33
sunnyps
lgtm % nits https://codereview.chromium.org/2646243002/diff/60001/gpu/ipc/service/direct_composition_surface_win.h File gpu/ipc/service/direct_composition_surface_win.h (right): https://codereview.chromium.org/2646243002/diff/60001/gpu/ipc/service/direct_composition_surface_win.h#newcode91 gpu/ipc/service/direct_composition_surface_win.h:91: gfx::Size size_; nit: size_ = gfx::Size(1, ...
3 years, 10 months ago (2017-02-14 22:09:13 UTC) #34
sunnyps
nit: Can you please format the CL description to 80 cols? nit: The CL description ...
3 years, 10 months ago (2017-02-14 22:11:40 UTC) #35
jbauman
danakj@: cc/ OWNERS review dcheng@: gpu\ipc\common\gpu_command_buffer_traits_multi.h OWNERS review
3 years, 10 months ago (2017-02-15 01:07:27 UTC) #40
dcheng
https://codereview.chromium.org/2646243002/diff/120001/content/browser/compositor/gpu_browser_compositor_output_surface.cc File content/browser/compositor/gpu_browser_compositor_output_surface.cc (right): https://codereview.chromium.org/2646243002/diff/120001/content/browser/compositor/gpu_browser_compositor_output_surface.cc#newcode148 content/browser/compositor/gpu_browser_compositor_output_surface.cc:148: DCHECK(has_set_draw_rectangle_since_last_resize_ || Is it OK to DCHECK here? I ...
3 years, 10 months ago (2017-02-15 06:57:06 UTC) #47
danakj
https://codereview.chromium.org/2646243002/diff/120001/cc/output/direct_renderer.cc File cc/output/direct_renderer.cc (right): https://codereview.chromium.org/2646243002/diff/120001/cc/output/direct_renderer.cc#newcode92 cc/output/direct_renderer.cc:92: context_provider->ContextCapabilities().set_draw_rectangle) { nit: no {}, or merge this with ...
3 years, 10 months ago (2017-02-15 16:01:02 UTC) #48
jbauman
PTAL. Should have fixed everything requested in review. On 2017/02/15 06:57:06, dcheng wrote: > https://codereview.chromium.org/2646243002/diff/120001/content/browser/compositor/gpu_browser_compositor_output_surface.cc ...
3 years, 10 months ago (2017-02-22 01:50:09 UTC) #66
dcheng
On 2017/02/22 01:50:09, jbauman wrote: > PTAL. Should have fixed everything requested in review. > ...
3 years, 10 months ago (2017-02-22 07:58:02 UTC) #67
danakj
Code changes LG but why not unit tests for the cc code? https://codereview.chromium.org/2646243002/diff/220001/cc/output/direct_renderer.cc File cc/output/direct_renderer.cc ...
3 years, 10 months ago (2017-02-22 15:04:08 UTC) #68
jbauman
On 2017/02/22 07:58:02, dcheng wrote: > On 2017/02/22 01:50:09, jbauman wrote: > > PTAL. Should ...
3 years, 10 months ago (2017-02-23 02:47:15 UTC) #69
jbauman
PTAL. On 2017/02/22 15:04:08, danakj wrote: > Code changes LG but why not unit tests ...
3 years, 10 months ago (2017-02-23 04:32:20 UTC) #78
dcheng
ipc lgtm thanks for the clarifications
3 years, 10 months ago (2017-02-23 06:49:16 UTC) #79
danakj
On Wed, Feb 22, 2017 at 11:32 PM, <jbauman@chromium.org> wrote: > PTAL. > > On ...
3 years, 10 months ago (2017-02-23 22:54:09 UTC) #80
jbauman
On 2017/02/23 22:54:09, danakj wrote: > On Wed, Feb 22, 2017 at 11:32 PM, <mailto:jbauman@chromium.org> ...
3 years, 10 months ago (2017-02-23 23:34:49 UTC) #81
danakj
LGTM https://codereview.chromium.org/2646243002/diff/240001/cc/output/gl_renderer_unittest.cc File cc/output/gl_renderer_unittest.cc (right): https://codereview.chromium.org/2646243002/diff/240001/cc/output/gl_renderer_unittest.cc#newcode1866 cc/output/gl_renderer_unittest.cc:1866: context->set_have_post_sub_buffer(true); can you set_support_set_draw_rectangle here instead of using ...
3 years, 10 months ago (2017-02-23 23:38:51 UTC) #82
jbauman
boliu@: android-related review fsamuel@: services/ui/surfaces OWNERS review
3 years, 10 months ago (2017-02-24 01:06:50 UTC) #86
boliu
On 2017/02/24 01:06:50, jbauman wrote: > boliu@: android-related review rs lgtm > fsamuel@: services/ui/surfaces OWNERS ...
3 years, 10 months ago (2017-02-24 01:11:34 UTC) #87
Fady Samuel
Hmm Mus doesn't need an implementation of this?
3 years, 10 months ago (2017-02-24 01:12:29 UTC) #88
jbauman
On 2017/02/24 01:12:29, Fady Samuel wrote: > Hmm Mus doesn't need an implementation of this? ...
3 years, 10 months ago (2017-02-24 22:14:55 UTC) #93
jbauman
fsamuel, PTAL. Thanks. On 2017/02/24 22:14:55, jbauman wrote: > On 2017/02/24 01:12:29, Fady Samuel wrote: ...
3 years, 9 months ago (2017-02-28 23:00:30 UTC) #94
Fady Samuel
lgtm
3 years, 9 months ago (2017-03-01 18:40:51 UTC) #95
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/2646243002/300001
3 years, 9 months ago (2017-03-01 21:52:53 UTC) #98
commit-bot: I haz the power
Failed to apply patch for content/browser/compositor/gpu_browser_compositor_output_surface.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-01 23:04:19 UTC) #100
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/2646243002/320001
3 years, 9 months ago (2017-03-01 23:19:54 UTC) #103
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 00:36:03 UTC) #106
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/2a2ad220b1c964f4fc348a8118ae...

Powered by Google App Engine
This is Rietveld 408576698