| Index: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
| index 67b4817b97fb74df518a102fd71c098bde45f26c..28aa8a7c2570026b9b9b66087a0313fb41776b15 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
| @@ -17,6 +17,7 @@
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebCompositorSupport.h"
|
| #include "public/platform/WebLayer.h"
|
| +#include "public/platform/WebLayerTreeView.h"
|
| #include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom-blink.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "wtf/Functional.h"
|
| @@ -55,11 +56,14 @@ class OffscreenCanvasSurfaceReferenceFactory
|
| } // namespace
|
|
|
| CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(
|
| - CanvasSurfaceLayerBridgeObserver* observer)
|
| + CanvasSurfaceLayerBridgeObserver* observer,
|
| + WebLayerTreeView* layerTreeView)
|
| : m_weakFactory(this),
|
| m_observer(observer),
|
| m_binding(this),
|
| - m_frameSinkId(Platform::current()->generateFrameSinkId()) {
|
| + m_frameSinkId(Platform::current()->generateFrameSinkId()),
|
| + m_parentFrameSinkId(layerTreeView ? layerTreeView->getFrameSinkId()
|
| + : cc::FrameSinkId()) {
|
| m_refFactory =
|
| new OffscreenCanvasSurfaceReferenceFactory(m_weakFactory.GetWeakPtr());
|
|
|
| @@ -68,7 +72,7 @@ CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(
|
| Platform::current()->interfaceProvider()->getInterface(
|
| mojo::MakeRequest(&serviceFactory));
|
| serviceFactory->CreateOffscreenCanvasSurface(
|
| - m_frameSinkId, m_binding.CreateInterfacePtrAndBind(),
|
| + m_parentFrameSinkId, m_frameSinkId, m_binding.CreateInterfacePtrAndBind(),
|
| mojo::MakeRequest(&m_service));
|
| }
|
|
|
|
|