| Index: Source/core/html/HTMLCanvasElement.h
|
| diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h
|
| index fa8c45a47d6ccb08159bd6df9a23cfbd02b31988..eb52f06dd4cd8ffa9ea719ca1c980d9af64b93c0 100644
|
| --- a/Source/core/html/HTMLCanvasElement.h
|
| +++ b/Source/core/html/HTMLCanvasElement.h
|
| @@ -34,6 +34,7 @@
|
| #include "platform/geometry/IntSize.h"
|
| #include "platform/graphics/Canvas2DLayerBridge.h"
|
| #include "platform/graphics/GraphicsTypes.h"
|
| +#include "platform/graphics/ImageBufferClient.h"
|
| #include "wtf/Forward.h"
|
|
|
| #define CanvasDefaultInterpolationQuality InterpolationLow
|
| @@ -61,7 +62,7 @@ public:
|
| virtual void canvasDestroyed(HTMLCanvasElement*) = 0;
|
| };
|
|
|
| -class HTMLCanvasElement FINAL : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource {
|
| +class HTMLCanvasElement FINAL : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource, public ImageBufferClient {
|
| public:
|
| static PassRefPtr<HTMLCanvasElement> create(Document&);
|
| virtual ~HTMLCanvasElement();
|
| @@ -124,7 +125,9 @@ public:
|
|
|
| bool is3D() const;
|
|
|
| - bool hasImageBuffer() const { return m_imageBuffer.get(); }
|
| + bool hasImageBuffer() const { return m_imageBuffer; }
|
| + bool hasValidImageBuffer() const;
|
| + void discardImageBuffer();
|
|
|
| bool shouldAccelerate(const IntSize&) const;
|
|
|
| @@ -138,6 +141,9 @@ public:
|
| virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE;
|
| virtual FloatSize sourceSize() const OVERRIDE;
|
|
|
| + // ImageBufferClient implementation
|
| + virtual void notifySurfaceInvalid() OVERRIDE;
|
| +
|
| protected:
|
| virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE;
|
|
|
| @@ -152,8 +158,8 @@ private:
|
|
|
| PassOwnPtr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount);
|
| void createImageBuffer();
|
| + void createImageBufferInternal();
|
| void clearImageBuffer();
|
| - void discardImageBuffer();
|
|
|
| void setSurfaceSize(const IntSize&);
|
|
|
|
|