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_SURFACE_H_ | 5 #ifndef UI_GL_GL_SURFACE_H_ |
6 #define UI_GL_GL_SURFACE_H_ | 6 #define UI_GL_GL_SURFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Swaps front and back buffers. This has no effect for off-screen | 50 // Swaps front and back buffers. This has no effect for off-screen |
51 // contexts. | 51 // contexts. |
52 virtual bool SwapBuffers() = 0; | 52 virtual bool SwapBuffers() = 0; |
53 | 53 |
54 // Get the size of the surface. | 54 // Get the size of the surface. |
55 virtual gfx::Size GetSize() = 0; | 55 virtual gfx::Size GetSize() = 0; |
56 | 56 |
57 // Get the underlying platform specific surface "handle". | 57 // Get the underlying platform specific surface "handle". |
58 virtual void* GetHandle() = 0; | 58 virtual void* GetHandle() = 0; |
59 | 59 |
| 60 // Check if this object represents a surface managed by a surrounding |
| 61 // framework rather than a surface managed by Chromium. |
| 62 virtual bool RepresentsNonOwnedSurface(); |
| 63 |
60 // Returns whether or not the surface supports PostSubBuffer. | 64 // Returns whether or not the surface supports PostSubBuffer. |
61 virtual bool SupportsPostSubBuffer(); | 65 virtual bool SupportsPostSubBuffer(); |
62 | 66 |
63 // Returns the internal frame buffer object name if the surface is backed by | 67 // Returns the internal frame buffer object name if the surface is backed by |
64 // FBO. Otherwise returns 0. | 68 // FBO. Otherwise returns 0. |
65 virtual unsigned int GetBackingFrameBufferObject(); | 69 virtual unsigned int GetBackingFrameBufferObject(); |
66 | 70 |
67 // Copy part of the backbuffer to the frontbuffer. | 71 // Copy part of the backbuffer to the frontbuffer. |
68 virtual bool PostSubBuffer(int x, int y, int width, int height); | 72 virtual bool PostSubBuffer(int x, int y, int width, int height); |
69 | 73 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 168 |
165 private: | 169 private: |
166 scoped_refptr<GLSurface> surface_; | 170 scoped_refptr<GLSurface> surface_; |
167 | 171 |
168 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 172 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
169 }; | 173 }; |
170 | 174 |
171 } // namespace gfx | 175 } // namespace gfx |
172 | 176 |
173 #endif // UI_GL_GL_SURFACE_H_ | 177 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |