| 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 |target|. | 33 // Release image from texture currently bound to |target|. |
| 34 virtual void ReleaseTexImage(unsigned target); | 34 virtual void ReleaseTexImage(unsigned target); |
| 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 // Called before the texture image data will be modified. |
| 43 virtual void WillModifyTexImage(); |
| 44 |
| 45 // Called after the texture image data has been modified. |
| 46 virtual void DidModifyTexImage(); |
| 47 |
| 42 // Indicate that image should be released after use. | 48 // Indicate that image should be released after use. |
| 43 // (For an Android work-around only). | 49 // (For an Android work-around only). |
| 44 virtual void SetReleaseAfterUse(); | 50 virtual void SetReleaseAfterUse(); |
| 45 | 51 |
| 46 // Create a GL image for a window. | 52 // Create a GL image for a window. |
| 47 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); | 53 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); |
| 48 | 54 |
| 49 // Create a GL image for a GPU Memory buffer. | 55 // Create a GL image for a GPU Memory buffer. |
| 50 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( | 56 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( |
| 51 gfx::GpuMemoryBufferHandle buffer, | 57 gfx::GpuMemoryBufferHandle buffer, |
| 52 gfx::Size size, | 58 gfx::Size size, |
| 53 unsigned internalformat); | 59 unsigned internalformat); |
| 54 | 60 |
| 55 protected: | 61 protected: |
| 56 virtual ~GLImage(); | 62 virtual ~GLImage(); |
| 57 | 63 |
| 58 private: | 64 private: |
| 59 friend class base::RefCounted<GLImage>; | 65 friend class base::RefCounted<GLImage>; |
| 60 | 66 |
| 61 DISALLOW_COPY_AND_ASSIGN(GLImage); | 67 DISALLOW_COPY_AND_ASSIGN(GLImage); |
| 62 }; | 68 }; |
| 63 | 69 |
| 64 } // namespace gfx | 70 } // namespace gfx |
| 65 | 71 |
| 66 #endif // UI_GL_GL_IMAGE_H_ | 72 #endif // UI_GL_GL_IMAGE_H_ |
| OLD | NEW |