| 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_ANDROID_NATIVE_BUFFER_H_ | 5 #ifndef UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_ |
| 6 #define UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_ | 6 #define UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_ |
| 7 | 7 |
| 8 #include "ui/gl/gl_image_egl.h" | 8 #include "ui/gl/gl_image_egl.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 | 11 |
| 12 class GL_EXPORT GLImageAndroidNativeBuffer : public GLImageEGL { | 12 class GL_EXPORT GLImageAndroidNativeBuffer : public GLImageEGL { |
| 13 public: | 13 public: |
| 14 explicit GLImageAndroidNativeBuffer(const gfx::Size& size); | 14 explicit GLImageAndroidNativeBuffer(const gfx::Size& size); |
| 15 | 15 |
| 16 bool Initialize(EGLClientBuffer native_buffer); | 16 bool Initialize(EGLClientBuffer native_buffer); |
| 17 | 17 |
| 18 // Overridden from GLImage: | 18 // Overridden from GLImage: |
| 19 virtual void Destroy() OVERRIDE; | 19 virtual void Destroy() OVERRIDE; |
| 20 virtual bool BindTexImage(unsigned target) OVERRIDE; | 20 virtual bool BindTexImage(unsigned target) OVERRIDE; |
| 21 virtual void WillUseTexImage() OVERRIDE; | 21 virtual void WillUseTexImage() OVERRIDE; |
| 22 virtual void DidUseTexImage() OVERRIDE; | 22 virtual void DidUseTexImage() OVERRIDE; |
| 23 virtual void SetReleaseAfterUse() OVERRIDE; | 23 virtual void SetReleaseAfterUse() OVERRIDE; |
| 24 virtual bool ScheduleOverlayPlane(int z_order, |
| 25 OverlayTransform transform, |
| 26 const Rect& bounds_rect, |
| 27 const RectF& crop_rect) OVERRIDE { |
| 28 return false; |
| 29 } |
| 24 | 30 |
| 25 protected: | 31 protected: |
| 26 virtual ~GLImageAndroidNativeBuffer(); | 32 virtual ~GLImageAndroidNativeBuffer(); |
| 27 | 33 |
| 28 private: | 34 private: |
| 29 bool release_after_use_; | 35 bool release_after_use_; |
| 30 bool in_use_; | 36 bool in_use_; |
| 31 unsigned target_; | 37 unsigned target_; |
| 32 EGLImageKHR egl_image_for_unbind_; | 38 EGLImageKHR egl_image_for_unbind_; |
| 33 GLuint texture_id_for_unbind_; | 39 GLuint texture_id_for_unbind_; |
| 34 | 40 |
| 35 DISALLOW_COPY_AND_ASSIGN(GLImageAndroidNativeBuffer); | 41 DISALLOW_COPY_AND_ASSIGN(GLImageAndroidNativeBuffer); |
| 36 }; | 42 }; |
| 37 | 43 |
| 38 } // namespace gfx | 44 } // namespace gfx |
| 39 | 45 |
| 40 #endif // UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_ | 46 #endif // UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_ |
| OLD | NEW |