| 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 "public/platform/WebExternalTextureMailbox.h" | 9 #include "public/platform/WebExternalTextureMailbox.h" |
| 10 #include "third_party/khronos/GLES2/gl2.h" | 10 #include "third_party/khronos/GLES2/gl2.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 bool isTextureBacked() override; | 36 bool isTextureBacked() override; |
| 37 bool hasMailbox() { return m_mailbox.textureSize.width != 0 && m_mailbox.tex
tureSize.height != 0; } | 37 bool hasMailbox() { return m_mailbox.textureSize.width != 0 && m_mailbox.tex
tureSize.height != 0; } |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 StaticBitmapImage(PassRefPtr<SkImage>); | 40 StaticBitmapImage(PassRefPtr<SkImage>); |
| 41 StaticBitmapImage(WebExternalTextureMailbox&); | 41 StaticBitmapImage(WebExternalTextureMailbox&); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 GLuint switchStorageToSkImage(WebGraphicsContext3DProvider*); | 44 GLuint switchStorageToSkImage(WebGraphicsContext3DProvider*); |
| 45 bool switchStorageToMailbox(WebGraphicsContext3DProvider*); | 45 bool switchStorageToMailbox(WebGraphicsContext3DProvider*); |
| 46 GLuint textureIdForWebGL(WebGraphicsContext3DProvider*); | 46 GLuint switchStorageToSkImageForWebGL(WebGraphicsContext3DProvider*); |
| 47 | 47 |
| 48 RefPtr<SkImage> m_image; | 48 RefPtr<SkImage> m_image; |
| 49 WebExternalTextureMailbox m_mailbox; | 49 WebExternalTextureMailbox m_mailbox; |
| 50 bool m_isOriginClean = true; | 50 bool m_isOriginClean = true; |
| 51 // The premultiply info is stored here because the SkImage API | 51 // The premultiply info is stored here because the SkImage API |
| 52 // doesn't expose this info. | 52 // doesn't expose this info. |
| 53 bool m_isPremultiplied = true; | 53 bool m_isPremultiplied = true; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace blink | 56 } // namespace blink |
| 57 | 57 |
| 58 #endif | 58 #endif |
| OLD | NEW |