| Index: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
|
| index 001e3b01b93b3145e6792ca8fc9bc93c112ef843..c27cc5744c7417cb639504fe8d55cf528f74dc55 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "platform/graphics/Image.h"
|
| #include "public/platform/WebExternalTextureMailbox.h"
|
| +#include "third_party/khronos/GLES2/gl2.h"
|
|
|
| namespace blink {
|
|
|
| @@ -23,18 +24,28 @@ public:
|
| virtual IntSize size() const;
|
| void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode) override;
|
|
|
| - PassRefPtr<SkImage> imageForCurrentFrame() override;
|
| + PassRefPtr<SkImage> imageForCurrentFrame(WebGraphicsContext3DProvider* = nullptr) override;
|
|
|
| bool originClean() const { return m_isOriginClean; }
|
| void setOriginClean(bool flag) { m_isOriginClean = flag; }
|
| bool isPremultiplied() const { return m_isPremultiplied; }
|
| void setPremultiplied(bool flag) { m_isPremultiplied = flag; }
|
| + void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GLenum);
|
| + bool isTextureBacked() override;
|
| + bool hasMailbox() { return m_mailbox.textureSize.width != 0 && m_mailbox.textureSize.height != 0; }
|
| +
|
| protected:
|
| StaticBitmapImage(PassRefPtr<SkImage>);
|
| StaticBitmapImage(WebExternalTextureMailbox&);
|
|
|
| +private:
|
| + void consumeTextureMailbox(WebGraphicsContext3DProvider*);
|
| + bool prepareMailboxForSkImage(WebGraphicsContext3DProvider*);
|
| +
|
| RefPtr<SkImage> m_image;
|
| WebExternalTextureMailbox m_mailbox;
|
| + // Cached textureId from CreateAndConsumeTextureCHROMIUM
|
| + GLuint m_textureId = 0;
|
| bool m_isOriginClean = true;
|
| // The premultiply info is stored here because the SkImage API
|
| // doesn't expose this info.
|
|
|