| Index: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
|
| index c82436cc6d369947339ce6f063595d1ff85a9b98..b6f8cc84b22203b67fcb7c42feb09842c362f55e 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
|
| @@ -12,6 +12,8 @@
|
| #include "cc/surfaces/surface_reference_factory.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| #include "platform/PlatformExport.h"
|
| +#include "platform/graphics/SurfaceLayerBridge.h"
|
| +#include "public/platform/WebSurfaceLayerBridgeObserver.h"
|
| #include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom-blink.h"
|
|
|
| namespace cc {
|
| @@ -24,30 +26,24 @@ namespace blink {
|
| class WebLayer;
|
| class WebLayerTreeView;
|
|
|
| -class PLATFORM_EXPORT CanvasSurfaceLayerBridgeObserver {
|
| - public:
|
| - CanvasSurfaceLayerBridgeObserver() {}
|
| - virtual ~CanvasSurfaceLayerBridgeObserver() {}
|
| -
|
| - virtual void OnWebLayerReplaced() = 0;
|
| -};
|
| -
|
| class PLATFORM_EXPORT CanvasSurfaceLayerBridge
|
| - : NON_EXPORTED_BASE(
|
| - public blink::mojom::blink::OffscreenCanvasSurfaceClient) {
|
| + : public NON_EXPORTED_BASE(SurfaceLayerBridge) {
|
| public:
|
| - explicit CanvasSurfaceLayerBridge(CanvasSurfaceLayerBridgeObserver*,
|
| + explicit CanvasSurfaceLayerBridge(WebSurfaceLayerBridgeObserver*,
|
| WebLayerTreeView*);
|
| ~CanvasSurfaceLayerBridge();
|
| - void CreateSolidColorLayer();
|
| - WebLayer* GetWebLayer() const { return web_layer_.get(); }
|
| - const cc::FrameSinkId& GetFrameSinkId() const { return frame_sink_id_; }
|
| +
|
| + // Implementation of SurfaceLayerBridge.
|
| + void CreateSolidColorLayer() override;
|
| + void SatisfyCallback(const cc::SurfaceSequence&) override;
|
| + void RequireCallback(const cc::SurfaceId&,
|
| + const cc::SurfaceSequence&) override;
|
|
|
| // Implementation of blink::mojom::blink::OffscreenCanvasSurfaceClient
|
| void OnSurfaceCreated(const cc::SurfaceInfo&) override;
|
|
|
| - void SatisfyCallback(const cc::SurfaceSequence&);
|
| - void RequireCallback(const cc::SurfaceId&, const cc::SurfaceSequence&);
|
| + WebLayer* GetWebLayer() const { return web_layer_.get(); }
|
| + const cc::FrameSinkId& GetFrameSinkId() const { return frame_sink_id_; }
|
|
|
| private:
|
| scoped_refptr<cc::Layer> cc_layer_;
|
| @@ -56,7 +52,7 @@ class PLATFORM_EXPORT CanvasSurfaceLayerBridge
|
| scoped_refptr<cc::SurfaceReferenceFactory> ref_factory_;
|
| base::WeakPtrFactory<CanvasSurfaceLayerBridge> weak_factory_;
|
|
|
| - CanvasSurfaceLayerBridgeObserver* observer_;
|
| + WebSurfaceLayerBridgeObserver* observer_;
|
|
|
| mojom::blink::OffscreenCanvasSurfacePtr service_;
|
| mojo::Binding<blink::mojom::blink::OffscreenCanvasSurfaceClient> binding_;
|
|
|