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

Unified Diff: third_party/WebKit/Source/platform/graphics/SurfaceLayerBridge.h

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/SurfaceLayerBridge.h
diff --git a/third_party/WebKit/Source/platform/graphics/SurfaceLayerBridge.h b/third_party/WebKit/Source/platform/graphics/SurfaceLayerBridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..51fcfa3bd5502659dab510cd08038d6b453d05f9
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/SurfaceLayerBridge.h
@@ -0,0 +1,61 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SurfaceLayerBridge_h
+#define SurfaceLayerBridge_h
+
+#include <memory>
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "cc/surfaces/sequence_surface_reference_factory.h"
+#include "cc/surfaces/surface_id.h"
+#include "cc/surfaces/surface_reference_factory.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "platform/PlatformExport.h"
+#include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom-blink.h"
+
+namespace cc {
+class Layer;
+class SurfaceInfo;
+} // namespace cc
+
+namespace blink {
+
+class WebLayer;
+class WebLayerTreeView;
+
+class SurfaceLayerBridge
+ : public blink::mojom::blink::OffscreenCanvasSurfaceClient {
+ public:
+ SurfaceLayerBridge();
+ virtual ~SurfaceLayerBridge();
+
+ virtual void CreateSolidColorLayer() = 0;
+ virtual void SatisfyCallback(const cc::SurfaceSequence&) = 0;
+ virtual void RequireCallback(const cc::SurfaceId&,
+ const cc::SurfaceSequence&) = 0;
+};
+
+class SequenceSurfaceReferenceFactoryImpl
+ : public cc::SequenceSurfaceReferenceFactory {
+ public:
+ SequenceSurfaceReferenceFactoryImpl(base::WeakPtr<SurfaceLayerBridge> bridge);
+
+ private:
+ ~SequenceSurfaceReferenceFactoryImpl() override = default;
+
+ // cc::SequenceSurfaceReferenceFactory implementation:
+ void RequireSequence(const cc::SurfaceId& id,
+ const cc::SurfaceSequence& sequence) const override;
+
+ void SatisfySequence(const cc::SurfaceSequence& sequence) const override;
+
+ base::WeakPtr<SurfaceLayerBridge> bridge_;
+
+ DISALLOW_COPY_AND_ASSIGN(SequenceSurfaceReferenceFactoryImpl);
+};
+
+} // namespace blink
+
+#endif // SurfaceLayerBridge_h

Powered by Google App Engine
This is Rietveld 408576698