Chromium Code Reviews| 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..7b5e17c0df0ceb3762a4bcf0a289dc64ef34f0d7 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 "public/platform/modules/offscreencanvas/offscreen_canvas_surface_service.mojom-blink.h" |
| #include "wtf/OwnPtr.h" |
| namespace cc { |
| -// TODO(611796): replace SolidColorLayer with SurfaceLayer |
| -class SolidColorLayer; |
| -} |
| +class SurfaceLayer; |
| +struct SurfaceSequence; |
| +} // namespace cc |
| namespace blink { |
| @@ -21,14 +23,26 @@ class WebLayer; |
| class PLATFORM_EXPORT CanvasSurfaceLayerBridge { |
| public: |
| explicit CanvasSurfaceLayerBridge(); |
| - ~CanvasSurfaceLayerBridge(); |
| + virtual ~CanvasSurfaceLayerBridge(); |
| + bool createSurfaceLayer(int canvasWidth, int canvasHeight); |
| WebLayer* getWebLayer() const { return m_webLayer.get(); } |
| + void satisfyCallback(cc::SurfaceSequence); |
| + void requireCallback(cc::SurfaceId, cc::SurfaceSequence); |
| + |
| +protected: |
| + // Virtual functions for unit tests |
|
danakj
2016/06/13 20:53:39
nit: end comments with punctuation
A common strat
xlai (Olivia)
2016/06/14 21:10:18
Done. Removed all the virtual testing things from
|
| + virtual bool syncGetServiceId(); |
| + virtual void asyncRequestSurfaceCreation(); |
| + cc::SurfaceId m_surfaceId; |
|
danakj
2016/06/13 20:53:39
This could be private if you made syncGetServiceId
danakj
2016/06/13 20:53:39
use whitespace to make this separate from the comm
xlai (Olivia)
2016/06/14 21:10:17
Done.
|
| + |
| private: |
| - scoped_refptr<cc::SolidColorLayer> m_solidColorLayer; |
| + scoped_refptr<cc::SurfaceLayer> m_surfaceLayer; |
| OwnPtr<WebLayer> m_webLayer; |
| + |
| + mojom::blink::OffscreenCanvasSurfaceServicePtr m_service; |
| }; |
| -} |
| +} // namespace blink |
| #endif // CanvasSurfaceLayerBridge |
|
danakj
2016/06/13 20:53:39
_h ?
xlai (Olivia)
2016/06/14 21:10:17
Done.
|