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

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

Issue 2036663003: Establish mojo service between Canvas (blink) and SurfaceManager (browser) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN build in android_dbg_recipe Created 4 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.h
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
index 3e9f3208198862f40c066485ec845ee15ee73542..e671dae09d8bcebb32c510abcf6369c8b44a0d86 100644
--- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
@@ -6,13 +6,15 @@
#define CanvasSurfaceLayerBridge_h
#include "base/memory/ref_counted.h"
+#include "cc/surfaces/surface_id.h"
#include "platform/PlatformExport.h"
+#include "platform/graphics/CanvasSurfaceLayerBridgeClient.h"
#include "wtf/OwnPtr.h"
namespace cc {
-// TODO(611796): replace SolidColorLayer with SurfaceLayer
-class SolidColorLayer;
-}
+class SurfaceLayer;
+struct SurfaceSequence;
+} // namespace cc
namespace blink {
@@ -20,15 +22,23 @@ class WebLayer;
class PLATFORM_EXPORT CanvasSurfaceLayerBridge {
public:
- explicit CanvasSurfaceLayerBridge();
- ~CanvasSurfaceLayerBridge();
+ explicit CanvasSurfaceLayerBridge(PassOwnPtr<CanvasSurfaceLayerBridgeClient>);
+ virtual ~CanvasSurfaceLayerBridge();
jbroman 2016/06/16 21:11:48 I don't think this destructor needs to be virtual,
xlai (Olivia) 2016/06/16 23:16:21 Done.
+ bool createSurfaceLayer(int canvasWidth, int canvasHeight);
WebLayer* getWebLayer() const { return m_webLayer.get(); }
+ const cc::SurfaceId& getSurfaceId() const { return m_surfaceId; }
+ CanvasSurfaceLayerBridgeClient* getClient() const { return m_client.get(); }
+
+ void satisfyCallback(cc::SurfaceSequence);
+ void requireCallback(cc::SurfaceId, cc::SurfaceSequence);
private:
- scoped_refptr<cc::SolidColorLayer> m_solidColorLayer;
+ scoped_refptr<cc::SurfaceLayer> m_surfaceLayer;
OwnPtr<WebLayer> m_webLayer;
+ OwnPtr<CanvasSurfaceLayerBridgeClient> m_client;
+ cc::SurfaceId m_surfaceId;
};
-}
+} // namespace blink
-#endif // CanvasSurfaceLayerBridge
+#endif // CanvasSurfaceLayerBridge_h

Powered by Google App Engine
This is Rietveld 408576698