| 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_SURFACE_TEXTURE_H_ | 5 #ifndef UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ |
| 6 #define UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ | 6 #define UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Overridden from GLImage: | 27 // Overridden from GLImage: |
| 28 void Destroy(bool have_context) override; | 28 void Destroy(bool have_context) override; |
| 29 gfx::Size GetSize() override; | 29 gfx::Size GetSize() override; |
| 30 unsigned GetInternalFormat() override; | 30 unsigned GetInternalFormat() override; |
| 31 bool BindTexImage(unsigned target, GLFence* fence) override; | 31 bool BindTexImage(unsigned target, GLFence* fence) override; |
| 32 void ReleaseTexImage(unsigned target) override {} | 32 void ReleaseTexImage(unsigned target) override {} |
| 33 bool CopyTexImage(unsigned target) override; | 33 bool CopyTexImage(unsigned target) override; |
| 34 bool CopyTexSubImage(unsigned target, | 34 bool CopyTexSubImage(unsigned target, |
| 35 const gfx::Point& offset, | 35 const gfx::Point& offset, |
| 36 const gfx::Rect& rect) override; | 36 const gfx::Rect& rect) override; |
| 37 bool CopySubImageData(unsigned texture_id, |
| 38 const gfx::Point& offset, |
| 39 const gfx::Rect& rect, |
| 40 GLFence* in_fence, |
| 41 GLFence* out_fence) override; |
| 37 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 42 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 38 int z_order, | 43 int z_order, |
| 39 gfx::OverlayTransform transform, | 44 gfx::OverlayTransform transform, |
| 40 const gfx::Rect& bounds_rect, | 45 const gfx::Rect& bounds_rect, |
| 41 const gfx::RectF& crop_rect) override; | 46 const gfx::RectF& crop_rect) override; |
| 42 void Flush() override {} | 47 void Flush() override {} |
| 43 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 48 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 44 uint64_t process_tracing_id, | 49 uint64_t process_tracing_id, |
| 45 const std::string& dump_name) override; | 50 const std::string& dump_name) override; |
| 46 | 51 |
| 47 protected: | 52 protected: |
| 48 ~GLImageSurfaceTexture() override; | 53 ~GLImageSurfaceTexture() override; |
| 49 | 54 |
| 50 private: | 55 private: |
| 51 scoped_refptr<SurfaceTexture> surface_texture_; | 56 scoped_refptr<SurfaceTexture> surface_texture_; |
| 52 const gfx::Size size_; | 57 const gfx::Size size_; |
| 53 GLint texture_id_; | 58 GLint texture_id_; |
| 54 base::ThreadChecker thread_checker_; | 59 base::ThreadChecker thread_checker_; |
| 55 | 60 |
| 56 DISALLOW_COPY_AND_ASSIGN(GLImageSurfaceTexture); | 61 DISALLOW_COPY_AND_ASSIGN(GLImageSurfaceTexture); |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 } // namespace gl | 64 } // namespace gl |
| 60 | 65 |
| 61 #endif // UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ | 66 #endif // UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ |
| OLD | NEW |