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

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

Issue 2455983005: Refactor AcceleratedStaticBitmapImage (Closed)
Patch Set: deleteTexture in desctructor Created 4 years, 2 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/StaticBitmapImage.h
diff --git a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
index dab65eeb322e1bb5012ec6a6ebc0e908cc363d5e..7191a3afbbd7e8c7c6bf7bdcbd09870d7304297c 100644
--- a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
+++ b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
@@ -38,6 +38,8 @@ class PLATFORM_EXPORT StaticBitmapImage : public Image {
void setOriginClean(bool flag) { m_isOriginClean = flag; }
bool isPremultiplied() const { return m_isPremultiplied; }
void setPremultiplied(bool flag) { m_isPremultiplied = flag; }
+ // In our current design, the SkImage in this class is always *not*
+ // texture-backed.
bool isTextureBacked() override;
virtual void copyToTexture(WebGraphicsContext3DProvider*,
GLuint,
@@ -49,16 +51,17 @@ class PLATFORM_EXPORT StaticBitmapImage : public Image {
virtual bool hasMailbox() { return false; }
virtual void transfer() {}
+ virtual void ensureMailbox() {}
virtual gpu::Mailbox getMailbox() { return gpu::Mailbox(); }
virtual gpu::SyncToken getSyncToken() { return gpu::SyncToken(); }
- virtual void ensureMailbox() {}
+ virtual void updateSyncToken(gpu::SyncToken) {}
protected:
- StaticBitmapImage(sk_sp<SkImage>);
StaticBitmapImage(); // empty constructor for derived class.
sk_sp<SkImage> m_image;
Justin Novosad 2016/10/28 21:58:41 I find it clumsy that AcceleratedStaticBitmapImage
private:
+ StaticBitmapImage(sk_sp<SkImage>);
bool m_isOriginClean = true;
// The premultiply info is stored here because the SkImage API
// doesn't expose this info.

Powered by Google App Engine
This is Rietveld 408576698