OLD | NEW |
---|---|
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 | 5 |
6 #ifndef CCRendererGL_h | 6 #ifndef CCRendererGL_h |
7 #define CCRendererGL_h | 7 #define CCRendererGL_h |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "CCCheckerboardDrawQuad.h" | 10 #include "CCCheckerboardDrawQuad.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 namespace cc { | 27 namespace cc { |
28 | 28 |
29 class CCScopedTexture; | 29 class CCScopedTexture; |
30 class GeometryBinding; | 30 class GeometryBinding; |
31 class ScopedEnsureFramebufferAllocation; | 31 class ScopedEnsureFramebufferAllocation; |
32 | 32 |
33 // Class that handles drawing of composited render layers using GL. | 33 // Class that handles drawing of composited render layers using GL. |
34 class CCRendererGL : public CCDirectRenderer, | 34 class CCRendererGL : public CCDirectRenderer, |
35 public WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffers CompleteCallbackCHROMIUM, | 35 public WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffers CompleteCallbackCHROMIUM, |
36 public WebKit::WebGraphicsContext3D::WebGraphicsMemoryAlloc ationChangedCallbackCHROMIUM , | 36 public WebKit::WebGraphicsContext3D::WebGraphicsMemoryAlloc ationChangedCallbackCHROMIUM , |
37 public WebKit::WebGraphicsContext3D::WebGraphicsUpdateVSync TimeCallbackCHROMIUM, | |
37 public WebKit::WebGraphicsContext3D::WebGraphicsContextLost Callback { | 38 public WebKit::WebGraphicsContext3D::WebGraphicsContextLost Callback { |
38 public: | 39 public: |
39 static scoped_ptr<CCRendererGL> create(CCRendererClient*, CCResourceProvider *); | 40 static scoped_ptr<CCRendererGL> create(CCRendererClient*, CCResourceProvider *); |
40 | 41 |
41 virtual ~CCRendererGL(); | 42 virtual ~CCRendererGL(); |
42 | 43 |
43 virtual const RendererCapabilities& capabilities() const OVERRIDE; | 44 virtual const RendererCapabilities& capabilities() const OVERRIDE; |
44 | 45 |
45 WebKit::WebGraphicsContext3D* context(); | 46 WebKit::WebGraphicsContext3D* context(); |
46 | 47 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 | 115 |
115 // WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROM IUM implementation. | 116 // WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROM IUM implementation. |
116 virtual void onSwapBuffersComplete() OVERRIDE; | 117 virtual void onSwapBuffersComplete() OVERRIDE; |
117 | 118 |
118 // WebKit::WebGraphicsContext3D::WebGraphicsMemoryAllocationChangedCallbackC HROMIUM implementation. | 119 // WebKit::WebGraphicsContext3D::WebGraphicsMemoryAllocationChangedCallbackC HROMIUM implementation. |
119 virtual void onMemoryAllocationChanged(WebKit::WebGraphicsMemoryAllocation) OVERRIDE; | 120 virtual void onMemoryAllocationChanged(WebKit::WebGraphicsMemoryAllocation) OVERRIDE; |
120 void onMemoryAllocationChangedOnImplThread(WebKit::WebGraphicsMemoryAllocati on); | 121 void onMemoryAllocationChangedOnImplThread(WebKit::WebGraphicsMemoryAllocati on); |
121 void discardFramebuffer(); | 122 void discardFramebuffer(); |
122 void ensureFramebuffer(); | 123 void ensureFramebuffer(); |
123 | 124 |
125 // WebKit::WebGraphicsContext3D::WebGraphicsUpdateVSyncTimeCallbackCHROMIUM implementation. | |
126 virtual void onUpdateVSyncTime(int64) OVERRIDE; | |
piman
2012/10/17 17:24:47
There already is a mechanism to feed the vsync tim
ajuma
2012/10/17 21:15:23
See the discussion in the WebKit bug for this issu
| |
127 | |
124 // WebGraphicsContext3D::WebGraphicsContextLostCallback implementation. | 128 // WebGraphicsContext3D::WebGraphicsContextLostCallback implementation. |
125 virtual void onContextLost() OVERRIDE; | 129 virtual void onContextLost() OVERRIDE; |
126 | 130 |
127 RendererCapabilities m_capabilities; | 131 RendererCapabilities m_capabilities; |
128 | 132 |
129 unsigned m_offscreenFramebufferId; | 133 unsigned m_offscreenFramebufferId; |
130 | 134 |
131 scoped_ptr<GeometryBinding> m_sharedGeometry; | 135 scoped_ptr<GeometryBinding> m_sharedGeometry; |
132 FloatQuad m_sharedGeometryQuad; | 136 FloatQuad m_sharedGeometryQuad; |
133 | 137 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 #if DEBUG_GL_CALLS && !defined ( NDEBUG ) | 230 #if DEBUG_GL_CALLS && !defined ( NDEBUG ) |
227 #define GLC(context, x) (x, CCRendererGL::debugGLCall(&*context, #x, __FILE__, _ _LINE__)) | 231 #define GLC(context, x) (x, CCRendererGL::debugGLCall(&*context, #x, __FILE__, _ _LINE__)) |
228 #else | 232 #else |
229 #define GLC(context, x) (x) | 233 #define GLC(context, x) (x) |
230 #endif | 234 #endif |
231 | 235 |
232 | 236 |
233 } | 237 } |
234 | 238 |
235 #endif | 239 #endif |
OLD | NEW |