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..bd9abd8b1b435d468a90a94566f15ef88a5f9612 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,7 +56,8 @@ class OffscreenCanvasSurfaceReferenceFactory |
} // namespace |
CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge( |
- CanvasSurfaceLayerBridgeObserver* observer) |
+ CanvasSurfaceLayerBridgeObserver* observer, |
+ WebLayerTreeView* layerTreeView) |
: m_weakFactory(this), |
m_observer(observer), |
m_binding(this), |
@@ -67,8 +69,11 @@ CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge( |
mojom::blink::OffscreenCanvasSurfaceFactoryPtr serviceFactory; |
Platform::current()->interfaceProvider()->getInterface( |
mojo::MakeRequest(&serviceFactory)); |
+ if (layerTreeView) { |
Fady Samuel
2017/01/19 04:05:43
Is there any reason why this might be null?
xlai (Olivia)
2017/01/19 16:43:56
This variable is passed from HTMLCanvasElement. I'
dcheng
2017/01/20 08:44:12
Out of curiosity, how do we create this object if
xlai (Olivia)
2017/01/20 16:36:21
Just double check with junov@. This variable can b
|
+ m_parentFrameSinkId = layerTreeView->getFrameSinkId(); |
+ } |
serviceFactory->CreateOffscreenCanvasSurface( |
- m_frameSinkId, m_binding.CreateInterfacePtrAndBind(), |
+ m_parentFrameSinkId, m_frameSinkId, m_binding.CreateInterfacePtrAndBind(), |
mojo::MakeRequest(&m_service)); |
} |