| 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 UI_GL_GL_IMAGE_MEMORY_H_ | 5 #ifndef UI_GL_GL_IMAGE_MEMORY_H_ |
| 6 #define UI_GL_GL_IMAGE_MEMORY_H_ | 6 #define UI_GL_GL_IMAGE_MEMORY_H_ |
| 7 | 7 |
| 8 #include "ui/gl/gl_image.h" | 8 #include "ui/gl/gl_image.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ | 10 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Overridden from GLImage: | 24 // Overridden from GLImage: |
| 25 virtual void Destroy() OVERRIDE; | 25 virtual void Destroy() OVERRIDE; |
| 26 virtual gfx::Size GetSize() OVERRIDE; | 26 virtual gfx::Size GetSize() OVERRIDE; |
| 27 virtual bool BindTexImage(unsigned target) OVERRIDE; | 27 virtual bool BindTexImage(unsigned target) OVERRIDE; |
| 28 virtual void ReleaseTexImage(unsigned target) OVERRIDE {} | 28 virtual void ReleaseTexImage(unsigned target) OVERRIDE {} |
| 29 virtual void WillUseTexImage() OVERRIDE {} | 29 virtual void WillUseTexImage() OVERRIDE {} |
| 30 virtual void DidUseTexImage() OVERRIDE {} | 30 virtual void DidUseTexImage() OVERRIDE {} |
| 31 virtual void WillModifyTexImage() OVERRIDE {} | 31 virtual void WillModifyTexImage() OVERRIDE {} |
| 32 virtual void DidModifyTexImage() OVERRIDE {} | 32 virtual void DidModifyTexImage() OVERRIDE {} |
| 33 virtual bool ScheduleOverlayPlane(int z_order, |
| 34 OverlayTransform transform, |
| 35 const Rect& bounds_rect, |
| 36 const RectF& crop_rect) OVERRIDE; |
| 33 | 37 |
| 34 protected: | 38 protected: |
| 35 virtual ~GLImageMemory(); | 39 virtual ~GLImageMemory(); |
| 36 | 40 |
| 37 bool HasValidFormat() const; | 41 bool HasValidFormat() const; |
| 38 size_t Bytes() const; | 42 size_t Bytes() const; |
| 39 | 43 |
| 40 private: | 44 private: |
| 41 const unsigned char* memory_; | 45 const unsigned char* memory_; |
| 42 const gfx::Size size_; | 46 const gfx::Size size_; |
| 43 const unsigned internalformat_; | 47 const unsigned internalformat_; |
| 44 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ | 48 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ |
| 45 defined(USE_OZONE) | 49 defined(USE_OZONE) |
| 46 unsigned egl_texture_id_; | 50 unsigned egl_texture_id_; |
| 47 EGLImageKHR egl_image_; | 51 EGLImageKHR egl_image_; |
| 48 #endif | 52 #endif |
| 49 | 53 |
| 50 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); | 54 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); |
| 51 }; | 55 }; |
| 52 | 56 |
| 53 } // namespace gfx | 57 } // namespace gfx |
| 54 | 58 |
| 55 #endif // UI_GL_GL_IMAGE_MEMORY_H_ | 59 #endif // UI_GL_GL_IMAGE_MEMORY_H_ |
| OLD | NEW |