Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(993)

Unified Diff: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp

Issue 2956713003: Replaces VideoLayer with a SurfaceLayer in WebMediaPlayerImpl (Closed)
Patch Set: Replaces VideoLayer with SurfaceLayer. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..31c4ac9d4822509a027afc1a867a403cb16a343e 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"
@@ -19,44 +20,14 @@
#include "public/platform/WebCompositorSupport.h"
#include "public/platform/WebLayer.h"
#include "public/platform/WebLayerTreeView.h"
+#include "public/platform/WebSurfaceLayerBridgeObserver.h"
#include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom-blink.h"
#include "ui/gfx/geometry/size.h"
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,
+ WebSurfaceLayerBridgeObserver* observer,
WebLayerTreeView* layer_tree_view)
: weak_factory_(this),
observer_(observer),
@@ -65,7 +36,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;

Powered by Google App Engine
This is Rietveld 408576698