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 #include "third_party/skia/include/core/SkRefCnt.h" | 10 #include "third_party/skia/include/core/SkRefCnt.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 sk_sp<SkImage> imageForCurrentFrame() override; | 28 sk_sp<SkImage> imageForCurrentFrame() override; |
29 | 29 |
30 bool originClean() const { return m_isOriginClean; } | 30 bool originClean() const { return m_isOriginClean; } |
31 void setOriginClean(bool flag) { m_isOriginClean = flag; } | 31 void setOriginClean(bool flag) { m_isOriginClean = flag; } |
32 bool isPremultiplied() const { return m_isPremultiplied; } | 32 bool isPremultiplied() const { return m_isPremultiplied; } |
33 void setPremultiplied(bool flag) { m_isPremultiplied = flag; } | 33 void setPremultiplied(bool flag) { m_isPremultiplied = flag; } |
34 bool isTextureBacked() override; | 34 bool isTextureBacked() override; |
35 virtual void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GL
enum, bool) { NOTREACHED(); } | 35 virtual void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GL
enum, bool) { NOTREACHED(); } |
36 virtual bool hasMailbox() { return false; } | 36 virtual bool hasMailbox() { return false; } |
37 virtual void transfer() { } | |
38 | 37 |
39 protected: | 38 protected: |
40 StaticBitmapImage(sk_sp<SkImage>); | 39 StaticBitmapImage(sk_sp<SkImage>); |
41 StaticBitmapImage() { } // empty constructor for derived class. | 40 StaticBitmapImage() { } // empty constructor for derived class. |
42 sk_sp<SkImage> m_image; | 41 sk_sp<SkImage> m_image; |
43 | 42 |
44 private: | 43 private: |
45 bool m_isOriginClean = true; | 44 bool m_isOriginClean = true; |
46 // The premultiply info is stored here because the SkImage API | 45 // The premultiply info is stored here because the SkImage API |
47 // doesn't expose this info. | 46 // doesn't expose this info. |
48 bool m_isPremultiplied = true; | 47 bool m_isPremultiplied = true; |
49 }; | 48 }; |
50 | 49 |
51 } // namespace blink | 50 } // namespace blink |
52 | 51 |
53 #endif | 52 #endif |
OLD | NEW |