| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void DidModifyTexImage() override {} | 43 void DidModifyTexImage() override {} |
| 44 bool ScheduleOverlayPlane(AcceleratedWidget widget, | 44 bool ScheduleOverlayPlane(AcceleratedWidget widget, |
| 45 int z_order, | 45 int z_order, |
| 46 OverlayTransform transform, | 46 OverlayTransform transform, |
| 47 const Rect& bounds_rect, | 47 const Rect& bounds_rect, |
| 48 const RectF& crop_rect) override; | 48 const RectF& crop_rect) override; |
| 49 | 49 |
| 50 protected: | 50 protected: |
| 51 ~GLImageMemory() override; | 51 ~GLImageMemory() override; |
| 52 | 52 |
| 53 BufferFormat format() const { return format_; } |
| 54 |
| 53 private: | 55 private: |
| 54 void DoBindTexImage(unsigned target); | 56 void DoBindTexImage(unsigned target); |
| 55 | 57 |
| 56 const Size size_; | 58 const Size size_; |
| 57 const unsigned internalformat_; | 59 const unsigned internalformat_; |
| 58 const unsigned char* memory_; | 60 const unsigned char* memory_; |
| 59 BufferFormat format_; | 61 BufferFormat format_; |
| 60 bool in_use_; | 62 bool in_use_; |
| 61 unsigned target_; | 63 unsigned target_; |
| 62 bool need_do_bind_tex_image_; | 64 bool need_do_bind_tex_image_; |
| 63 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ | 65 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ |
| 64 defined(USE_OZONE) | 66 defined(USE_OZONE) |
| 65 unsigned egl_texture_id_; | 67 unsigned egl_texture_id_; |
| 66 EGLImageKHR egl_image_; | 68 EGLImageKHR egl_image_; |
| 67 #endif | 69 #endif |
| 68 | 70 |
| 69 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); | 71 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 } // namespace gfx | 74 } // namespace gfx |
| 73 | 75 |
| 74 #endif // UI_GL_GL_IMAGE_MEMORY_H_ | 76 #endif // UI_GL_GL_IMAGE_MEMORY_H_ |
| OLD | NEW |