Index: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h |
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..72265db89bf7de36201e96dd261929ac35732490 |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 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 CanvasSurfaceLayerBridgeClient_h |
+#define CanvasSurfaceLayerBridgeClient_h |
+ |
+#include "cc/surfaces/surface_id.h" |
+#include "cc/surfaces/surface_sequence.h" |
+#include "platform/PlatformExport.h" |
+ |
+namespace blink { |
+ |
+// This class is an interface for all mojo calls from CanvasSurfaceLayerBridge |
+// to OffscreenCanvasSurfaceService. |
+class PLATFORM_EXPORT CanvasSurfaceLayerBridgeClient { |
+public: |
+ virtual ~CanvasSurfaceLayerBridgeClient() {}; |
+ |
+ // Calls that help initial creation of SurfaceLayer. |
+ virtual bool syncGetSurfaceId(cc::SurfaceId*) = 0; |
+ virtual void asyncRequestSurfaceCreation(const cc::SurfaceId&) = 0; |
jbroman
2016/06/16 21:11:48
Elsewhere you pass cc::SurfaceId by value, but her
xlai (Olivia)
2016/06/16 23:16:21
I am trying to use const& as much as possible. How
|
+ |
+ // Calls that ensure correct destruction order of surface. |
+ virtual void asyncRequire(cc::SurfaceId, cc::SurfaceSequence) = 0; |
+ virtual void asyncSatisfy(cc::SurfaceSequence) = 0; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // CanvasSurfaceLayerBridgeClient_h |