| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef StaticBitmapImage_h | 5 #ifndef StaticBitmapImage_h |
| 6 #define StaticBitmapImage_h | 6 #define StaticBitmapImage_h |
| 7 | 7 |
| 8 #include "platform/graphics/Image.h" | 8 #include "platform/graphics/Image.h" |
| 9 #include "third_party/khronos/GLES2/gl2.h" | 9 #include "third_party/khronos/GLES2/gl2.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 PassRefPtr<SkImage> imageForCurrentFrame() override; | 27 PassRefPtr<SkImage> imageForCurrentFrame() override; |
| 28 | 28 |
| 29 bool originClean() const { return m_isOriginClean; } | 29 bool originClean() const { return m_isOriginClean; } |
| 30 void setOriginClean(bool flag) { m_isOriginClean = flag; } | 30 void setOriginClean(bool flag) { m_isOriginClean = flag; } |
| 31 bool isPremultiplied() const { return m_isPremultiplied; } | 31 bool isPremultiplied() const { return m_isPremultiplied; } |
| 32 void setPremultiplied(bool flag) { m_isPremultiplied = flag; } | 32 void setPremultiplied(bool flag) { m_isPremultiplied = flag; } |
| 33 bool isTextureBacked() override; | 33 bool isTextureBacked() override; |
| 34 virtual void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GL
enum, bool) { NOTREACHED(); } | 34 virtual void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GL
enum, bool) { NOTREACHED(); } |
| 35 virtual bool hasMailbox() { return false; } | 35 virtual bool hasMailbox() { return false; } |
| 36 virtual void transfer() { } |
| 36 | 37 |
| 37 protected: | 38 protected: |
| 38 StaticBitmapImage(PassRefPtr<SkImage>); | 39 StaticBitmapImage(PassRefPtr<SkImage>); |
| 39 StaticBitmapImage() { } // empty constructor for derived class. | 40 StaticBitmapImage() { } // empty constructor for derived class. |
| 40 RefPtr<SkImage> m_image; | 41 RefPtr<SkImage> m_image; |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 bool m_isOriginClean = true; | 44 bool m_isOriginClean = true; |
| 44 // The premultiply info is stored here because the SkImage API | 45 // The premultiply info is stored here because the SkImage API |
| 45 // doesn't expose this info. | 46 // doesn't expose this info. |
| 46 bool m_isPremultiplied = true; | 47 bool m_isPremultiplied = true; |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace blink | 50 } // namespace blink |
| 50 | 51 |
| 51 #endif | 52 #endif |
| OLD | NEW |