| 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 a19b255b812b2db6f33a8b42b3b98732ada22e00..2147de38e7984fe3ccad785abdcda3f6279b0c97 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
| @@ -12,6 +12,7 @@
|
| #include "cc/surfaces/surface_info.h"
|
| #include "cc/surfaces/surface_sequence.h"
|
| #include "platform/graphics/GraphicsLayer.h"
|
| +#include "platform/graphics/SurfaceLayerBridge.h"
|
| #include "platform/mojo/MojoHelper.h"
|
| #include "platform/wtf/Functional.h"
|
| #include "public/platform/InterfaceProvider.h"
|
| @@ -24,37 +25,6 @@
|
|
|
| namespace blink {
|
|
|
| -namespace {
|
| -
|
| -class OffscreenCanvasSurfaceReferenceFactory
|
| - : public cc::SequenceSurfaceReferenceFactory {
|
| - public:
|
| - OffscreenCanvasSurfaceReferenceFactory(
|
| - base::WeakPtr<CanvasSurfaceLayerBridge> bridge)
|
| - : bridge_(bridge) {}
|
| -
|
| - private:
|
| - ~OffscreenCanvasSurfaceReferenceFactory() override = default;
|
| -
|
| - // cc::SequenceSurfaceReferenceFactory implementation:
|
| - void RequireSequence(const cc::SurfaceId& id,
|
| - const cc::SurfaceSequence& sequence) const override {
|
| - DCHECK(bridge_);
|
| - bridge_->RequireCallback(id, sequence);
|
| - }
|
| -
|
| - void SatisfySequence(const cc::SurfaceSequence& sequence) const override {
|
| - if (bridge_)
|
| - bridge_->SatisfyCallback(sequence);
|
| - }
|
| -
|
| - base::WeakPtr<CanvasSurfaceLayerBridge> bridge_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasSurfaceReferenceFactory);
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(
|
| CanvasSurfaceLayerBridgeObserver* observer,
|
| WebLayerTreeView* layer_tree_view)
|
| @@ -65,7 +35,7 @@ CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(
|
| parent_frame_sink_id_(layer_tree_view ? layer_tree_view->GetFrameSinkId()
|
| : cc::FrameSinkId()) {
|
| ref_factory_ =
|
| - new OffscreenCanvasSurfaceReferenceFactory(weak_factory_.GetWeakPtr());
|
| + new SequenceSurfaceReferenceFactoryImpl(weak_factory_.GetWeakPtr());
|
|
|
| DCHECK(!service_.is_bound());
|
| mojom::blink::OffscreenCanvasProviderPtr provider;
|
| @@ -129,15 +99,4 @@ void CanvasSurfaceLayerBridge::OnSurfaceCreated(
|
| cc_layer_->SetBounds(surface_info.size_in_pixels());
|
| }
|
|
|
| -void CanvasSurfaceLayerBridge::SatisfyCallback(
|
| - const cc::SurfaceSequence& sequence) {
|
| - service_->Satisfy(sequence);
|
| -}
|
| -
|
| -void CanvasSurfaceLayerBridge::RequireCallback(
|
| - const cc::SurfaceId& surface_id,
|
| - const cc::SurfaceSequence& sequence) {
|
| - service_->Require(surface_id, sequence);
|
| -}
|
| -
|
| } // namespace blink
|
|
|