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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 // Get the platform specific display on which this surface resides, if | 95 // Get the platform specific display on which this surface resides, if |
96 // available. | 96 // available. |
97 virtual void* GetDisplay(); | 97 virtual void* GetDisplay(); |
98 | 98 |
99 // Get the platfrom specific configuration for this surface, if available. | 99 // Get the platfrom specific configuration for this surface, if available. |
100 virtual void* GetConfig(); | 100 virtual void* GetConfig(); |
101 | 101 |
102 // Get the GL pixel format of the surface, if available. | 102 // Get the GL pixel format of the surface, if available. |
103 virtual unsigned GetFormat(); | 103 virtual unsigned GetFormat(); |
104 | 104 |
105 // Get the CLOCK_MONOTONIC time (in microseconds) for the most recent screen | |
piman
2012/10/24 16:56:54
CLOCK_MONOTONIC is a linux-only concept. Maybe the
ajuma
2012/10/26 20:12:39
Done.
| |
106 // refresh, along with the values of the Media Stream Counter (which counts | |
107 // screen refreshes) and the Swap Buffer Counter. Returns false on error, | |
108 // including when these values are unavailable. | |
109 virtual bool GetSyncValues(int64* monotonicTime, | |
piman
2012/10/24 16:56:54
nit: chrome style for parameters
ajuma
2012/10/26 20:12:39
Done.
| |
110 int64* mediaStreamCounter, | |
111 int64* swapBufferCounter); | |
112 | |
105 // Create a GL surface that renders directly to a view. | 113 // Create a GL surface that renders directly to a view. |
106 static scoped_refptr<GLSurface> CreateViewGLSurface( | 114 static scoped_refptr<GLSurface> CreateViewGLSurface( |
107 bool software, | 115 bool software, |
108 gfx::AcceleratedWidget window); | 116 gfx::AcceleratedWidget window); |
109 | 117 |
110 // Create a GL surface used for offscreen rendering. | 118 // Create a GL surface used for offscreen rendering. |
111 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 119 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
112 bool software, | 120 bool software, |
113 const gfx::Size& size); | 121 const gfx::Size& size); |
114 | 122 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 virtual gfx::Size GetSize() OVERRIDE; | 154 virtual gfx::Size GetSize() OVERRIDE; |
147 virtual void* GetHandle() OVERRIDE; | 155 virtual void* GetHandle() OVERRIDE; |
148 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; | 156 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; |
149 virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; | 157 virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; |
150 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE; | 158 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE; |
151 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; | 159 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; |
152 virtual void* GetShareHandle() OVERRIDE; | 160 virtual void* GetShareHandle() OVERRIDE; |
153 virtual void* GetDisplay() OVERRIDE; | 161 virtual void* GetDisplay() OVERRIDE; |
154 virtual void* GetConfig() OVERRIDE; | 162 virtual void* GetConfig() OVERRIDE; |
155 virtual unsigned GetFormat() OVERRIDE; | 163 virtual unsigned GetFormat() OVERRIDE; |
164 virtual bool GetSyncValues(int64* monotonicTime, | |
165 int64* mediaStreamCounter, | |
166 int64* swapBufferCounter) OVERRIDE; | |
156 | 167 |
157 GLSurface* surface() const { return surface_.get(); } | 168 GLSurface* surface() const { return surface_.get(); } |
158 | 169 |
159 protected: | 170 protected: |
160 virtual ~GLSurfaceAdapter(); | 171 virtual ~GLSurfaceAdapter(); |
161 | 172 |
162 private: | 173 private: |
163 scoped_refptr<GLSurface> surface_; | 174 scoped_refptr<GLSurface> surface_; |
164 | 175 |
165 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 176 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
166 }; | 177 }; |
167 | 178 |
168 } // namespace gfx | 179 } // namespace gfx |
169 | 180 |
170 #endif // UI_GL_GL_SURFACE_H_ | 181 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |