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() { } |
37 | 38 |
38 protected: | 39 protected: |
39 StaticBitmapImage(sk_sp<SkImage>); | 40 StaticBitmapImage(sk_sp<SkImage>); |
40 StaticBitmapImage() { } // empty constructor for derived class. | 41 StaticBitmapImage() { } // empty constructor for derived class. |
41 sk_sp<SkImage> m_image; | 42 sk_sp<SkImage> m_image; |
42 | 43 |
43 private: | 44 private: |
44 bool m_isOriginClean = true; | 45 bool m_isOriginClean = true; |
45 // The premultiply info is stored here because the SkImage API | 46 // The premultiply info is stored here because the SkImage API |
46 // doesn't expose this info. | 47 // doesn't expose this info. |
47 bool m_isPremultiplied = true; | 48 bool m_isPremultiplied = true; |
48 }; | 49 }; |
49 | 50 |
50 } // namespace blink | 51 } // namespace blink |
51 | 52 |
52 #endif | 53 #endif |
OLD | NEW |