OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_GL_GL_SURFACE_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_H_ |
6 #define UI_GFX_GL_GL_SURFACE_H_ | 6 #define UI_GFX_GL_GL_SURFACE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "ui/gfx/gl/gl_export.h" | 11 #include "ui/gfx/gl/gl_export.h" |
12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
13 #include "ui/gfx/size.h" | 13 #include "ui/gfx/size.h" |
14 | 14 |
15 #if defined(OS_ANDROID) | |
16 #include <android/native_window.h> | |
17 | |
18 // This is a wrapper object to pass ANativeWindow handles around when running | |
19 // in SurfaceTexture mode. | |
20 class AndroidNativeWindowInterface { | |
jonathan.backer
2011/11/21 18:54:45
I don't see where this is referenced in this CL? M
michaelbai
2011/11/21 19:29:04
OK, Removed
| |
21 public: | |
22 virtual ~AndroidNativeWindowInterface() {} | |
23 | |
24 virtual ANativeWindow* GetNativeHandle() const = 0; | |
25 }; | |
26 | |
27 #endif | |
28 | |
15 namespace gfx { | 29 namespace gfx { |
16 | 30 |
17 class GLContext; | 31 class GLContext; |
18 | 32 |
19 // Encapsulates a surface that can be rendered to with GL, hiding platform | 33 // Encapsulates a surface that can be rendered to with GL, hiding platform |
20 // specific management. | 34 // specific management. |
21 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { | 35 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
22 public: | 36 public: |
23 GLSurface(); | 37 GLSurface(); |
24 | 38 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 GLSurface* surface() const { return surface_.get(); } | 139 GLSurface* surface() const { return surface_.get(); } |
126 | 140 |
127 private: | 141 private: |
128 scoped_refptr<GLSurface> surface_; | 142 scoped_refptr<GLSurface> surface_; |
129 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 143 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
130 }; | 144 }; |
131 | 145 |
132 } // namespace gfx | 146 } // namespace gfx |
133 | 147 |
134 #endif // UI_GFX_GL_GL_SURFACE_H_ | 148 #endif // UI_GFX_GL_GL_SURFACE_H_ |
OLD | NEW |