New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 647852 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Mus+Ash: Preserve SurfaceDrawQuads in CompositorFrames

Project Member Reported by fsam...@chromium.org, Sep 16 2016

Issue description

Each Mus window should:

1. Submit a CompositorFrame.
2. Refer to its children in its CompositorFrame via SurfaceDrawQuads. Each child should have a corresponding SurfaceLayer in the parent's compositor.
3. When surface IDs change in a child, that should propagate to the parent which should update its SurfaceLayer.

I'm glossing over SurfaceSequence stuff because we will change that soon with Jellyfish upstreaming.

According to danakj@, that will give us back some of the occlusion culling optimizations in cc. We still don't get back partial occlusion (if one window [one surface] partially occludes another). We can start thinking about that post-Jellyfish upstreaming.
 
Also, Window Decorations + Client Area should have a parent Surface OR the Window Decorations CompositorFrame should refer to the client area in its CompositorFrame. This gives us back the ability to do copy requests of a whole window including decorations.

Comment 2 by danakj@chromium.org, Sep 16 2016

> According to danakj@, that will give us back some of the occlusion culling optimizations in cc.

Only if the surface layer is marked as opaque, which it should be only when the renderer is opaque (which is most cases). You can follow breadcrumbs from https://cs.chromium.org/chromium/src/content/renderer/gpu/render_widget_compositor.cc?rcl=1474039068&l=691
Labels: -Pri-3 Pri-2
Description: Show this description
Note that this bug is a Mus+Ash launch blocker.
Cc: mfomitchev@chromium.org
Owner: fsam...@chromium.org
Status: Started (was: Untriaged)
I have a working prototype of this: https://codereview.chromium.org/2369793002/

Chatting with Scott, and cc folks, it sounds like this is a good path forward and we should do this so I'm going to begin upstreaming.

Comment 8 by danakj@chromium.org, Sep 29 2016

This was talked about in a meeting and various email threads today, but just in case cuz this is the working spot... I think you don't need these to do draw occlusion in the SurfaceAggregator, right? So don't think this needs to be done then, unless I'm missing something.

Comment 9 by danakj@chromium.org, Sep 29 2016

fsamuel explained to me:

- mustash code was not embedding things with surfacedrawquads, but doing the embedding out somewhere else. which means moving a embedded thing around required a bunch of synchronization.

we should embed children with a surfacequad in mustash like elsewhere so SGTM. this is unrelated to draw occlusion then.
Yea, it sounds like using UIResourceLayer would be the primary way to address occlusion concerns so that we don't do the same work over and over again behind the webcontent.
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84

commit e0f705bd4f61d868a0dcb7a7f1a905b3033ede84
Author: fsamuel <fsamuel@chromium.org>
Date: Sat Oct 01 14:07:14 2016

Replace usage of SurfaceId's client_id with FrameSinkId

This CL mechanically replaces SurfaceClientId with a
FrameSinkId that consists of two components. The second
component is left empty in this CL. In a subsequent CL,
FrameSinkId will be made into a (RenderProcessHost ID,
RoutingID) pair and
GpuProcessTransportFactory::AllocateFrameSinkId will go
away. In Mus+Ash, the FrameSinkId will be the WindowId in
that subsequent CL.

This will allow the display compositor to route new surface
IDs allocated in clients to the appropriate endpoints in
the display compositor host (browser or window server).
Also, these IDs persist across display compositor restarts and so
FrameSinkObservers can be registered in any order
(subsequent CL).

BUG= 647852 

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2382873002
Cr-Commit-Position: refs/heads/master@{#422314}

[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/android_webview/browser/hardware_renderer.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/android_webview/browser/surfaces_instance.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/android_webview/browser/surfaces_instance.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/core/compositor/blimp_compositor.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/public/BUILD.gn
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/public/DEPS
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/public/compositor/compositor_dependencies.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/support/compositor/blimp_embedder_compositor.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/support/compositor/compositor_dependencies_impl.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/blimp/client/support/compositor/compositor_dependencies_impl.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/BUILD.gn
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/cc_param_traits.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/cc_param_traits.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/cc_param_traits_macros.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/cc_param_traits_unittest.cc
[add] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/frame_sink_id.mojom
[add] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/frame_sink_id.typemap
[add] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/frame_sink_id_struct_traits.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/surface_id.mojom
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/surface_id_struct_traits.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/surface_sequence.mojom
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/surface_sequence_struct_traits.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/ipc/typemaps.gni
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/layers/surface_layer_impl_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/layers/surface_layer_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/BUILD.gn
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/direct_compositor_frame_sink_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/display.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/display.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/display_unittest.cc
[add] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/frame_sink_id.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_aggregator_perftest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_aggregator_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_factory_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_hittest_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_id.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_id_allocator.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_id_allocator.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_manager.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_manager.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_manager_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_sequence.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surface_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/surfaces/surfaces_pixeltest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/test/test_compositor_frame_sink.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/trees/layer_tree_host.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/trees/layer_tree_host_in_process.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/trees/layer_tree_host_in_process.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/trees/surface_sequence_generator.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/trees/surface_sequence_generator.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/cc/trees/surface_sequence_generator_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/chrome/browser/android/blimp/chrome_compositor_dependencies.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/chrome/browser/android/blimp/chrome_compositor_dependencies.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/components/exo/surface.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/compositor/gpu_process_transport_factory.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/compositor/surface_utils.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/compositor/surface_utils.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/frame_host/cross_process_frame_connector.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/frame_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/compositor_impl_android.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/context_provider_factory_impl_android.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/context_provider_factory_impl_android.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_view_host_impl.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_input_event_router.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_input_event_router.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/common/view_messages.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/renderer/android/synchronous_compositor_frame_sink.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/renderer/gpu/render_widget_compositor.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/renderer/render_widget.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/renderer/render_widget.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/test/test_render_view_host.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/content/test/test_render_view_host.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/services/ui/surfaces/display_compositor.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/android/context_provider_factory.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/android/delegated_frame_host_android.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/android/window_android_compositor.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/compositor/compositor.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/compositor/compositor.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/compositor/compositor_unittest.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/compositor/test/in_process_context_factory.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/compositor/test/in_process_context_factory.h
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/views/mus/surface_context_factory.cc
[modify] https://crrev.com/e0f705bd4f61d868a0dcb7a7f1a905b3033ede84/ui/views/mus/surface_context_factory.h

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b

commit afec9f4d069fc3bf6d56fdf85a7699d70bd0355b
Author: fsamuel <fsamuel@chromium.org>
Date: Mon Oct 03 20:22:58 2016

services/ui: Match naming in cc (and jellyfish branch)

DisplayCompositor => CompositorFrameSink
SurfacesState => DisplayCompositor

BUG= 647852 

Review-Url: https://codereview.chromium.org/2386763002
Cr-Commit-Position: refs/heads/master@{#422510}

[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/gpu/display_compositor/compositor_frame_sink_factory_impl.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/gpu/display_compositor/compositor_frame_sink_factory_impl.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/gpu/display_compositor/compositor_frame_sink_impl.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/gpu/display_compositor/compositor_frame_sink_impl.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/gpu/display_compositor/display_impl.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/gpu/display_compositor/display_impl.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/surfaces/BUILD.gn
[add] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/surfaces/compositor_frame_sink.cc
[add] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/surfaces/compositor_frame_sink.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/surfaces/display_compositor.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/surfaces/display_compositor.h
[delete] https://crrev.com/dfb4211ebbd9934c01cca376edf70fe44daa381f/services/ui/surfaces/surfaces_state.cc
[delete] https://crrev.com/dfb4211ebbd9934c01cca376edf70fe44daa381f/services/ui/surfaces/surfaces_state.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/cursor_unittest.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/display_manager.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/display_unittest.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/frame_generator.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/frame_generator_unittest.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/platform_display.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/platform_display_init_params.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/platform_display_init_params.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/server_window_delegate.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/server_window_surface_manager.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/test_server_window_delegate.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/test_utils.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/test_utils.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/user_display_manager_unittest.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/window_finder.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/window_manager_state_unittest.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/window_server.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/window_server.h
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/window_tree_host_factory.cc
[modify] https://crrev.com/afec9f4d069fc3bf6d56fdf85a7699d70bd0355b/services/ui/ws/window_tree_unittest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6acafa1d1e2107f66deeed51865fb233b03641b

commit b6acafa1d1e2107f66deeed51865fb233b03641b
Author: fsamuel <fsamuel@chromium.org>
Date: Tue Oct 04 03:21:52 2016

Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId

This CL takes us two steps along the long windy road to an out of
process display compositor.

1. In the near future, SurfaceIds will be allocated in clients in order to
avoid sync IPCs for offscreen canvas. Thus, we need to reduce our
reliance on SurfaceIdAllocator. SurfaceIdAllocator is often used simply
to find out the frame_sink_id(). This CL gives owners of
SurfaceIdAllocator a FrameSinkId directly and removes that accessor
from the ID allocator. This significantly reduces usage of
SurfaceIdAllocator.

2. SurfaceFactory's role was not well defined previously. It practice, it
corresponds to a single CompositorFrameSink but in tests, surface IDs
with different FrameSinkIds were submitting CompositorFrames to
the same SurfaceFactory. This CL establishes the invariant that a
SurfaceFactory belongs to a single CompositorFrameSink. In the near
future, we won't need to pass a SurfaceFactory a full SurfaceId
anymore, we can simply give it the "LocalFrameId" part and assume
a constant FrameSinkId. This will reduce the the data needed to send to
FrameSinkObservers from SurfaceFactories and from frame sources to
SurfaceFactories.

BUG= 647852 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2383373002
Cr-Commit-Position: refs/heads/master@{#422688}

[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/android_webview/browser/hardware_renderer.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/android_webview/browser/hardware_renderer.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/android_webview/browser/surfaces_instance.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/android_webview/browser/surfaces_instance.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/blimp/client/core/compositor/blimp_compositor.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/blimp/client/core/compositor/blimp_compositor.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/blimp/client/support/compositor/blimp_embedder_compositor.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/blimp/client/support/compositor/blimp_embedder_compositor.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/output/compositor_frame_sink.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/direct_compositor_frame_sink.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/direct_compositor_frame_sink_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/display_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_aggregator_perftest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_aggregator_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_factory.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_factory.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_factory_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_hittest_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_id_allocator.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surface_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/surfaces/surfaces_pixeltest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/test/test_compositor_frame_sink.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/cc/test/test_compositor_frame_sink.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/components/exo/surface.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/components/exo/surface.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/frame_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/browser_compositor_view_mac.mm
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/compositor_impl_android.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/renderer/android/synchronous_compositor_frame_sink.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/test/test_render_view_host.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/content/test/test_render_view_host.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/services/ui/surfaces/compositor_frame_sink.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/services/ui/surfaces/compositor_frame_sink.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/ui/android/delegated_frame_host_android.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/ui/compositor/compositor.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/ui/compositor/compositor.h
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/ui/compositor/compositor_unittest.cc
[modify] https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b/ui/compositor/test/in_process_context_factory.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fcbcef7b01cb6b898174856e7fe8970c4e501471

commit fcbcef7b01cb6b898174856e7fe8970c4e501471
Author: fsamuel <fsamuel@chromium.org>
Date: Wed Oct 05 06:28:48 2016

FrameSinkIds are WindowIds in window server, Process ID/Route ID in renderer

This CL places routing information in FrameSinkIds. That way a new
surface can be routed to the appropriate FrameSinkObserver from the
display compositor.

In Chrome, the FrameSinkId contains the ProcessId/RoutingId.
FrameSinks that are not owned by renderers have a client_id = 0,
and the sink_id is set by AllocateFrameSinkId().

In Mus+Ash, each ServerWindowSurface gets a unique FrameSinkId.
The client_id is the WindowId, and the sink_id is the surface type.
Once the underlay surface goes away, the FrameSinkId will simply be
the window ID.

BUG= 647852 
TBR=junov@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2385193002
Cr-Commit-Position: refs/heads/master@{#423089}

[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/content/browser/compositor/gpu_process_transport_factory.h
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/services/ui/ws/frame_generator_unittest.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/services/ui/ws/server_window_surface_manager.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/ui/views/mus/surface_context_factory.cc
[modify] https://crrev.com/fcbcef7b01cb6b898174856e7fe8970c4e501471/ui/views/mus/surface_context_factory.h

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01f3620439dc6473c838e8e4700e4be84d1b4423

commit 01f3620439dc6473c838e8e4700e4be84d1b4423
Author: fsamuel <fsamuel@chromium.org>
Date: Thu Oct 06 01:08:28 2016

Introduce cc::LocalFrameId and use in SurfaceFactory

This CL introduces cc::LocalFrameId which is the (local_id, nonce)
part of the SurfaceId. This is the part that can be allocated by
the renderer asynchronously on resize or initial creation. The
FrameSinkId component of a SurfaceId remains constant across resizes
as it identifies a FrameSink/FrameSource as opposed to individual
surfaces.

Since SurfaceFactory is tied to a single FrameSink now, passing in
SurfaceIds including FrameSinkIds is redundant and invites API
abuse by passing in SurfaceIds that don't belong to the given
FrameSink. This will result in a DCHECK, but in production, once
SurfaceIds are allocated in the renderer, then one client could
clobber a surface of another client (albeit this is unlikely due to the
nonce), or it could confuse surface ID routing and fool the parent
to embed a surface ID belonging to a different client (since
FrameSinkIds are guessable).

This change eliminates this concern by making it impossible to pass a
different FrameSinkId into SurfaceFactory; the API simply does not allow
for it.

BUG= 647852 
TBR=dtrainor@chromium.org, reveman@chromium.org, sky@chromium.org, boliu@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2388753003
Cr-Commit-Position: refs/heads/master@{#423371}

[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/hardware_renderer.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/hardware_renderer.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/surfaces_instance.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/surfaces_instance.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/blimp/client/core/compositor/blimp_compositor.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/blimp/client/core/compositor/blimp_compositor.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/BUILD.gn
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/cc_param_traits.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/cc_param_traits.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/cc_param_traits_unittest.cc
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/local_frame_id.mojom
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/local_frame_id.typemap
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/local_frame_id_struct_traits.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/surface_id.mojom
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/surface_id_struct_traits.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/typemaps.gni
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/layers/surface_layer_impl_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/layers/surface_layer_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/BUILD.gn
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/direct_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/display_unittest.cc
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/local_frame_id.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_aggregator_perftest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_aggregator_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory_client.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_hittest_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_id.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_id_allocator.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_id_allocator.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surfaces_pixeltest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/test/test_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/test/test_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/components/exo/surface.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/components/exo/surface.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/components/exo/surface_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/renderer/android/synchronous_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/renderer/android/synchronous_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/test/test_render_view_host.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/test/test_render_view_host.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/surfaces/compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/surfaces/compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/android/delegated_frame_host_android.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/compositor/compositor.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/compositor/compositor.h

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d469420cbb2b76ae2311ecfbfbccff74422878f0

commit d469420cbb2b76ae2311ecfbfbccff74422878f0
Author: fsamuel <fsamuel@chromium.org>
Date: Fri Oct 07 23:30:46 2016

Mus+Ash: Use standard cc mechanism for surface lifetime.

Rendering of the topmost frame happens in two phases. First the frame
is generated and submitted, and a later date it is actually drawn.
During the time the frame is generated and drawn we can't destroy the
surface, otherwise when drawn you get an empty surface.

To address this previously, mus-ws implemented its own lifetime management
system. cc already has a mechanism called SurfaceSequence (which is being
updated in parallel). However, in order to manage surface lifetime correctly
the face of surface ID propagation to clients, we need to track surfaces
using cc.

BUG= 647852 

Review-Url: https://codereview.chromium.org/2400723003
Cr-Commit-Position: refs/heads/master@{#424010}

[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/display.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/display.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/frame_generator.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/frame_generator_delegate.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/platform_display.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/platform_display.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/platform_display_delegate.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/server_window.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/server_window.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/server_window_delegate.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/test_server_window_delegate.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/test_utils.h
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/window_server.cc
[modify] https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0/services/ui/ws/window_server.h

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d119e3f1f4a9997ab6b29a3598131d2f14cd8538

commit d119e3f1f4a9997ab6b29a3598131d2f14cd8538
Author: fsamuel <fsamuel@chromium.org>
Date: Wed Oct 12 02:23:31 2016

cc: Introduce mechanism to observe CompositorFrames submitted to new surfaceIDs

In Mus+Ash, SurfaceManager and the display compositor will
live in the GPU. The gpu process needs to signal the
display compositor host for newly allocated
surface IDs so that it can identify the embedders and
update its book-keeping for lifetime management of
surfaces.

TBR=sadrul@chromium.org for content/browser/renderer_host
BUG= 647852 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2403573002
Cr-Commit-Position: refs/heads/master@{#424651}

[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/display.cc
[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/display.h
[delete] https://crrev.com/b07fec5fa70ba1f13eb9479f077a452871a2cf64/cc/surfaces/surface_damage_observer.h
[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/surface_factory.cc
[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/surface_factory_unittest.cc
[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/surface_manager.cc
[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/surface_manager.h
[add] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/cc/surfaces/surface_observer.h
[modify] https://crrev.com/d119e3f1f4a9997ab6b29a3598131d2f14cd8538/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/065bde79d4e511f613ae89a2fc535029dae26100

commit 065bde79d4e511f613ae89a2fc535029dae26100
Author: fsamuel <fsamuel@chromium.org>
Date: Sat Oct 15 07:28:01 2016

Mus+Ash: propagate Surface ID to parents

Currently, in Mus+Ash, the window server is responsible for positioning
windows and generating SurfaceDrawQuads for them. This CL propagates surface
IDs for child windows to their parents so that parents can embed them directly
via CompositorFrames. This will happen in a subsequent patch.

A SurfaceSequence is allocated for the surface ID that is propagated up the
window hierarchy. As long as the parent holds on to the SurfaceSequence,
then the surface ID will be preserved. Once the parent is informed of a
new surface ID then it will return the SurfaceSequence back to the window
server for reclamation (mus-gpu in the future). If a window is destroyed then
it will also return its SurfaceSequence.

BUG= 647852 

Review-Url: https://codereview.chromium.org/2414683003
Cr-Commit-Position: refs/heads/master@{#425556}

[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/BUILD.gn
[add] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/surface_id_handler.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/tests/test_window_tree.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/tests/test_window_tree.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/window.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/window.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/window_private.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/window_tree_client.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/cpp/window_tree_client.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/public/interfaces/window_tree.mojom
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/surfaces/BUILD.gn
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/surfaces/display_compositor.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/surfaces/display_compositor.h
[add] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/surfaces/display_compositor_client.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/frame_generator_unittest.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/test_change_tracker.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/test_change_tracker.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/test_utils.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/test_utils.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/window_server.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/window_server.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/window_tree.cc
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/window_tree.h
[modify] https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100/services/ui/ws/window_tree_client_unittest.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c735fc2eda819740138c2a55086cc45ef6d7a9a4

commit c735fc2eda819740138c2a55086cc45ef6d7a9a4
Author: rockot <rockot@chromium.org>
Date: Sat Oct 15 15:41:50 2016

Revert of Mus+Ash: propagate Surface ID to parents (patchset #11 id:200001 of https://codereview.chromium.org/2414683003/ )

Reason for revert:
Speculative revert for mash_browser_tests flake

Original issue's description:
> Mus+Ash: propagate Surface ID to parents
>
> Currently, in Mus+Ash, the window server is responsible for positioning
> windows and generating SurfaceDrawQuads for them. This CL propagates surface
> IDs for child windows to their parents so that parents can embed them directly
> via CompositorFrames. This will happen in a subsequent patch.
>
> A SurfaceSequence is allocated for the surface ID that is propagated up the
> window hierarchy. As long as the parent holds on to the SurfaceSequence,
> then the surface ID will be preserved. Once the parent is informed of a
> new surface ID then it will return the SurfaceSequence back to the window
> server for reclamation (mus-gpu in the future). If a window is destroyed then
> it will also return its SurfaceSequence.
>
> BUG= 647852 
>
> Committed: https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100
> Cr-Commit-Position: refs/heads/master@{#425556}

TBR=kylechar@chromium.org,rjkroege@chromium.org,sadrul@chromium.org,sky@chromium.org,tsepez@chromium.org,fsamuel@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 647852 

Review-Url: https://codereview.chromium.org/2424633002
Cr-Commit-Position: refs/heads/master@{#425564}

[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/BUILD.gn
[delete] https://crrev.com/548e01d4ba62fc9ac54458e7d03aabf1dc26abfa/services/ui/public/cpp/surface_id_handler.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/tests/test_window_tree.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/tests/test_window_tree.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/window.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/window.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/window_private.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/window_tree_client.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/cpp/window_tree_client.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/public/interfaces/window_tree.mojom
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/surfaces/BUILD.gn
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/surfaces/display_compositor.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/surfaces/display_compositor.h
[delete] https://crrev.com/548e01d4ba62fc9ac54458e7d03aabf1dc26abfa/services/ui/surfaces/display_compositor_client.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/frame_generator_unittest.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/test_change_tracker.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/test_change_tracker.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/test_utils.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/test_utils.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/window_server.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/window_server.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/window_tree.cc
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/window_tree.h
[modify] https://crrev.com/c735fc2eda819740138c2a55086cc45ef6d7a9a4/services/ui/ws/window_tree_client_unittest.cc

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/433690106161ad7467d59901c469762f160fa4a2

commit 433690106161ad7467d59901c469762f160fa4a2
Author: fsamuel <fsamuel@chromium.org>
Date: Sat Oct 15 17:28:21 2016

Mus+Ash: propagate Surface ID to parents

Currently, in Mus+Ash, the window server is responsible for positioning
windows and generating SurfaceDrawQuads for them. This CL propagates surface
IDs for child windows to their parents so that parents can embed them directly
via CompositorFrames. This will happen in a subsequent patch.

A SurfaceSequence is allocated for the surface ID that is propagated up the
window hierarchy. As long as the parent holds on to the SurfaceSequence,
then the surface ID will be preserved. Once the parent is informed of a
new surface ID then it will return the SurfaceSequence back to the window
server for reclamation (mus-gpu in the future). If a window is destroyed then
it will also return its SurfaceSequence.

BUG= 647852 

Committed: https://crrev.com/065bde79d4e511f613ae89a2fc535029dae26100
Review-Url: https://codereview.chromium.org/2414683003
Cr-Original-Commit-Position: refs/heads/master@{#425556}
Cr-Commit-Position: refs/heads/master@{#425566}

[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/BUILD.gn
[add] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/surface_id_handler.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/tests/test_window_tree.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/tests/test_window_tree.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/window.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/window.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/window_private.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/window_tree_client.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/cpp/window_tree_client.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/public/interfaces/window_tree.mojom
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/surfaces/BUILD.gn
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/surfaces/display_compositor.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/surfaces/display_compositor.h
[add] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/surfaces/display_compositor_client.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/frame_generator_unittest.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/test_change_tracker.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/test_change_tracker.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/test_utils.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/test_utils.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/window_server.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/window_server.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/window_tree.cc
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/window_tree.h
[modify] https://crrev.com/433690106161ad7467d59901c469762f160fa4a2/services/ui/ws/window_tree_client_unittest.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01f3620439dc6473c838e8e4700e4be84d1b4423

commit 01f3620439dc6473c838e8e4700e4be84d1b4423
Author: fsamuel <fsamuel@chromium.org>
Date: Thu Oct 06 01:08:28 2016

Introduce cc::LocalFrameId and use in SurfaceFactory

This CL introduces cc::LocalFrameId which is the (local_id, nonce)
part of the SurfaceId. This is the part that can be allocated by
the renderer asynchronously on resize or initial creation. The
FrameSinkId component of a SurfaceId remains constant across resizes
as it identifies a FrameSink/FrameSource as opposed to individual
surfaces.

Since SurfaceFactory is tied to a single FrameSink now, passing in
SurfaceIds including FrameSinkIds is redundant and invites API
abuse by passing in SurfaceIds that don't belong to the given
FrameSink. This will result in a DCHECK, but in production, once
SurfaceIds are allocated in the renderer, then one client could
clobber a surface of another client (albeit this is unlikely due to the
nonce), or it could confuse surface ID routing and fool the parent
to embed a surface ID belonging to a different client (since
FrameSinkIds are guessable).

This change eliminates this concern by making it impossible to pass a
different FrameSinkId into SurfaceFactory; the API simply does not allow
for it.

BUG= 647852 
TBR=dtrainor@chromium.org, reveman@chromium.org, sky@chromium.org, boliu@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2388753003
Cr-Commit-Position: refs/heads/master@{#423371}

[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/hardware_renderer.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/hardware_renderer.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/surfaces_instance.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/android_webview/browser/surfaces_instance.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/blimp/client/core/compositor/blimp_compositor.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/blimp/client/core/compositor/blimp_compositor.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/BUILD.gn
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/cc_param_traits.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/cc_param_traits.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/cc_param_traits_unittest.cc
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/local_frame_id.mojom
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/local_frame_id.typemap
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/local_frame_id_struct_traits.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/surface_id.mojom
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/surface_id_struct_traits.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/ipc/typemaps.gni
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/layers/surface_layer_impl_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/layers/surface_layer_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/BUILD.gn
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/direct_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/direct_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/display_scheduler_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/display_unittest.cc
[add] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/local_frame_id.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_aggregator.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_aggregator_perftest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_aggregator_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory_client.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_factory_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_hittest_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_id.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_id_allocator.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_id_allocator.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surface_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/surfaces/surfaces_pixeltest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/test/test_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/cc/test/test_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/components/exo/surface.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/components/exo/surface.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/components/exo/surface_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/renderer/android/synchronous_compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/renderer/android/synchronous_compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/test/test_render_view_host.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/content/test/test_render_view_host.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/surfaces/compositor_frame_sink.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/surfaces/compositor_frame_sink.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/ws/server_window_surface.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/services/ui/ws/server_window_surface.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/android/delegated_frame_host_android.h
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/compositor/compositor.cc
[modify] https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423/ui/compositor/compositor.h

Comment 26 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Status: Fixed (was: Started)
This is technically fixed but there is subsequent work to do for resize. Marking as FIXED

Sign in to add a comment