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 20 matching lines...) Expand all Loading... |
31 virtual bool BindTexImage(); | 31 virtual bool BindTexImage(); |
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 // Create a GL image for a window. | 36 // Create a GL image for a window. |
37 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); | 37 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); |
38 | 38 |
39 // Create a GL image for a GPU Memory buffer. | 39 // Create a GL image for a GPU Memory buffer. |
40 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( | 40 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( |
41 gfx::GpuMemoryBufferHandle buffer, gfx::Size size); | 41 gfx::GpuMemoryBufferHandle buffer, |
| 42 gfx::Size size, |
| 43 unsigned internalformat); |
42 | 44 |
43 protected: | 45 protected: |
44 virtual ~GLImage(); | 46 virtual ~GLImage(); |
45 | 47 |
46 private: | 48 private: |
47 friend class base::RefCounted<GLImage>; | 49 friend class base::RefCounted<GLImage>; |
48 | 50 |
49 DISALLOW_COPY_AND_ASSIGN(GLImage); | 51 DISALLOW_COPY_AND_ASSIGN(GLImage); |
50 }; | 52 }; |
51 | 53 |
52 } // namespace gfx | 54 } // namespace gfx |
53 | 55 |
54 #endif // UI_GL_GL_IMAGE_H_ | 56 #endif // UI_GL_GL_IMAGE_H_ |
OLD | NEW |