Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef UI_GL_GL_IMAGE_H_ |
| 6 #define UI_GL_GL_IMAGE_H_ | 6 #define UI_GL_GL_IMAGE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "ui/gfx/gpu_memory_buffer.h" | 9 #include "ui/gfx/gpu_memory_buffer.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 // Release image from texture currently bound to GL_TEXTURE_2D target. | 33 // Release image from texture currently bound to GL_TEXTURE_2D target. |
| 34 virtual void ReleaseTexImage(); | 34 virtual void ReleaseTexImage(); |
| 35 | 35 |
| 36 // Called before the texture is used for drawing. | 36 // Called before the texture is used for drawing. |
| 37 virtual void WillUseTexImage(); | 37 virtual void WillUseTexImage(); |
| 38 | 38 |
| 39 // Called after the texture has been used for drawing. | 39 // Called after the texture has been used for drawing. |
| 40 virtual void DidUseTexImage(); | 40 virtual void DidUseTexImage(); |
| 41 | 41 |
| 42 // Indicate that the DidUse should release tex image in DidUse. | |
|
kaanb
2013/11/12 18:49:57
s/tex image/image/ here and elsewhere
boliu
2013/11/12 19:07:20
Done.
| |
| 43 // (For an Android work-around only). | |
| 44 virtual void SetReleaseAfterUse(); | |
| 45 | |
| 42 // Create a GL image for a window. | 46 // Create a GL image for a window. |
| 43 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); | 47 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); |
| 44 | 48 |
| 45 // Create a GL image for a GPU Memory buffer. | 49 // Create a GL image for a GPU Memory buffer. |
| 46 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( | 50 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( |
| 47 gfx::GpuMemoryBufferHandle buffer, | 51 gfx::GpuMemoryBufferHandle buffer, |
| 48 gfx::Size size, | 52 gfx::Size size, |
| 49 unsigned internalformat); | 53 unsigned internalformat); |
| 50 | 54 |
| 51 protected: | 55 protected: |
| 52 virtual ~GLImage(); | 56 virtual ~GLImage(); |
| 53 | 57 |
| 54 private: | 58 private: |
| 55 friend class base::RefCounted<GLImage>; | 59 friend class base::RefCounted<GLImage>; |
| 56 | 60 |
| 57 DISALLOW_COPY_AND_ASSIGN(GLImage); | 61 DISALLOW_COPY_AND_ASSIGN(GLImage); |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 } // namespace gfx | 64 } // namespace gfx |
| 61 | 65 |
| 62 #endif // UI_GL_GL_IMAGE_H_ | 66 #endif // UI_GL_GL_IMAGE_H_ |
| OLD | NEW |