| Index: Source/platform/graphics/RecordingImageBufferSurface.h
|
| diff --git a/Source/platform/graphics/RecordingImageBufferSurface.h b/Source/platform/graphics/RecordingImageBufferSurface.h
|
| index 558f3aef94f6877caacacac160a81bfd0b49f8cd..a7500db150270eb59839e6e88ac111cdc160bf10 100644
|
| --- a/Source/platform/graphics/RecordingImageBufferSurface.h
|
| +++ b/Source/platform/graphics/RecordingImageBufferSurface.h
|
| @@ -6,7 +6,6 @@
|
| #define RecordingImageBufferSurface_h
|
|
|
| #include "platform/graphics/GraphicsContext.h"
|
| -#include "platform/graphics/GraphicsContextClient.h"
|
| #include "platform/graphics/ImageBufferSurface.h"
|
| #include "public/platform/WebThread.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| @@ -28,40 +27,39 @@ public:
|
| virtual ~RecordingImageBufferFallbackSurfaceFactory() { }
|
| };
|
|
|
| -class PLATFORM_EXPORT RecordingImageBufferSurface : public ImageBufferSurface, public GraphicsContextClient {
|
| +class PLATFORM_EXPORT RecordingImageBufferSurface : public ImageBufferSurface {
|
| WTF_MAKE_NONCOPYABLE(RecordingImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
|
| public:
|
| RecordingImageBufferSurface(const IntSize&, PassOwnPtr<RecordingImageBufferFallbackSurfaceFactory> fallbackFactory, OpacityMode = NonOpaque);
|
| virtual ~RecordingImageBufferSurface();
|
|
|
| // Implementation of ImageBufferSurface interfaces
|
| - virtual SkCanvas* canvas() const override;
|
| - virtual PassRefPtr<SkPicture> getPicture() override;
|
| - virtual void willDrawVideo() override;
|
| - virtual void didDraw() override;
|
| - virtual bool isValid() const override { return true; }
|
| - virtual bool isRecording() const override { return !m_fallbackSurface; }
|
| - virtual void willAccessPixels() override;
|
| - virtual void finalizeFrame(const FloatRect&) override;
|
| - virtual void setImageBuffer(ImageBuffer*) override;
|
| - virtual PassRefPtr<SkImage> newImageSnapshot() const override;
|
| - virtual bool needsClipTracking() const override { return !m_fallbackSurface; }
|
| + SkCanvas* canvas() const override;
|
| + PassRefPtr<SkPicture> getPicture() override;
|
| + void willDrawVideo() override;
|
| + void didDraw() override;
|
| + bool isValid() const override { return true; }
|
| + bool isRecording() const override { return !m_fallbackSurface; }
|
| + void willAccessPixels() override;
|
| + void willOverwriteCanvas() override;
|
| + void finalizeFrame(const FloatRect&) override;
|
| + void setImageBuffer(ImageBuffer*) override;
|
| + PassRefPtr<SkImage> newImageSnapshot() const override;
|
| + bool needsClipTracking() const override { return !m_fallbackSurface; }
|
| void draw(GraphicsContext*, const FloatRect& destRect, const FloatRect& srcRect, SkXfermode::Mode, bool needsCopy) override;
|
|
|
| // Passthroughs to fallback surface
|
| - virtual const SkBitmap& bitmap() override;
|
| - virtual bool restore() override;
|
| - virtual WebLayer* layer() const override;
|
| - virtual bool isAccelerated() const override;
|
| - virtual Platform3DObject getBackingTexture() const override;
|
| - virtual bool cachedBitmapEnabled() const override;
|
| - virtual const SkBitmap& cachedBitmap() const override;
|
| - virtual void invalidateCachedBitmap() override;
|
| - virtual void updateCachedBitmapIfNeeded() override;
|
| - virtual void setIsHidden(bool) override;
|
| + const SkBitmap& bitmap() override;
|
| + bool restore() override;
|
| + WebLayer* layer() const override;
|
| + bool isAccelerated() const override;
|
| + Platform3DObject getBackingTexture() const override;
|
| + bool cachedBitmapEnabled() const override;
|
| + const SkBitmap& cachedBitmap() const override;
|
| + void invalidateCachedBitmap() override;
|
| + void updateCachedBitmapIfNeeded() override;
|
| + void setIsHidden(bool) override;
|
|
|
| - // Implementation of GraphicsContextClient
|
| - virtual void willOverwriteCanvas() override;
|
| private:
|
| friend class ::RecordingImageBufferSurfaceTest; // for unit testing
|
| void fallBackToRasterCanvas();
|
|
|