Chromium Code Reviews| 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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "ui/gl/gl_bindings.h" | |
| 11 #include "ui/gl/gl_image.h" | 10 #include "ui/gl/gl_image.h" |
| 12 | 11 |
| 13 namespace gfx { | 12 namespace gfx { |
| 14 class SurfaceTexture; | 13 class SurfaceTexture; |
| 15 } | 14 } |
| 16 | 15 |
| 17 namespace gl { | 16 namespace gl { |
| 18 | 17 |
| 19 class GL_EXPORT GLImageSurfaceTexture : public GLImage { | 18 class GL_EXPORT GLImageSurfaceTexture : public GLImage { |
| 20 public: | 19 public: |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 40 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 39 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 41 uint64_t process_tracing_id, | 40 uint64_t process_tracing_id, |
| 42 const std::string& dump_name) override; | 41 const std::string& dump_name) override; |
| 43 | 42 |
| 44 protected: | 43 protected: |
| 45 ~GLImageSurfaceTexture() override; | 44 ~GLImageSurfaceTexture() override; |
| 46 | 45 |
| 47 private: | 46 private: |
| 48 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 47 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| 49 const gfx::Size size_; | 48 const gfx::Size size_; |
| 50 GLint texture_id_; | |
| 51 base::ThreadChecker thread_checker_; | 49 base::ThreadChecker thread_checker_; |
| 50 unsigned framebuffer_ = 0; | |
|
Daniele Castagna
2015/11/03 19:57:34
Should we try to share this state before this CL?
reveman
2015/12/05 23:09:08
Long term that would be nice but there are some op
| |
| 51 unsigned vertex_shader_ = 0; | |
| 52 unsigned fragment_shader_ = 0; | |
| 53 unsigned program_ = 0; | |
| 54 unsigned vertex_buffer_ = 0; | |
| 52 | 55 |
| 53 DISALLOW_COPY_AND_ASSIGN(GLImageSurfaceTexture); | 56 DISALLOW_COPY_AND_ASSIGN(GLImageSurfaceTexture); |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 } // namespace gl | 59 } // namespace gl |
| 57 | 60 |
| 58 #endif // UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ | 61 #endif // UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_ |
| OLD | NEW |