Index: cc/gl_renderer.cc |
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc |
index 51d46f529c64d1b54f178b43885f25f410e805b4..91bbc51f81c06f7555e84ec56ccd5922305b1a3c 100644 |
--- a/cc/gl_renderer.cc |
+++ b/cc/gl_renderer.cc |
@@ -110,7 +110,7 @@ bool CCRendererGL::initialize() |
m_capabilities.usingPartialSwap = Settings::partialSwapEnabled() && extensions.count("GL_CHROMIUM_post_sub_buffer"); |
// Use the swapBuffers callback only with the threaded proxy. |
- if (CCProxy::hasImplThread()) |
+ if (m_proxy->hasImplThread()) |
m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM_swapbuffers_complete_callback"); |
if (m_capabilities.usingSwapCompleteCallback) |
m_context->setSwapBuffersCompleteCallbackCHROMIUM(this); |
@@ -143,7 +143,7 @@ bool CCRendererGL::initialize() |
CCRendererGL::~CCRendererGL() |
{ |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
m_context->setSwapBuffersCompleteCallbackCHROMIUM(0); |
m_context->setMemoryAllocationChangedCallbackCHROMIUM(0); |
m_context->setContextLostCallback(0); |
@@ -336,8 +336,9 @@ static inline SkBitmap applyFilters(CCRendererGL* renderer, const WebKit::WebFil |
if (filters.isEmpty()) |
return SkBitmap(); |
- WebGraphicsContext3D* filterContext = CCProxy::hasImplThread() ? WebSharedGraphicsContext3D::compositorThreadContext() : WebSharedGraphicsContext3D::mainThreadContext(); |
- GrContext* filterGrContext = CCProxy::hasImplThread() ? WebSharedGraphicsContext3D::compositorThreadGrContext() : WebSharedGraphicsContext3D::mainThreadGrContext(); |
+ bool hasImplThread = renderer->resourceProvider()->proxy()->hasImplThread(); |
+ WebGraphicsContext3D* filterContext = hasImplThread ? WebSharedGraphicsContext3D::compositorThreadContext() : WebSharedGraphicsContext3D::mainThreadContext(); |
+ GrContext* filterGrContext = hasImplThread ? WebSharedGraphicsContext3D::compositorThreadGrContext() : WebSharedGraphicsContext3D::mainThreadGrContext(); |
if (!filterContext || !filterGrContext) |
return SkBitmap(); |
@@ -871,7 +872,7 @@ struct TexTransformTextureProgramBinding : TextureProgramBinding { |
void CCRendererGL::drawTextureQuad(const DrawingFrame& frame, const CCTextureDrawQuad* quad) |
{ |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
TexTransformTextureProgramBinding binding; |
if (quad->flipped()) |
@@ -915,7 +916,7 @@ void CCRendererGL::drawTextureQuad(const DrawingFrame& frame, const CCTextureDra |
void CCRendererGL::drawIOSurfaceQuad(const DrawingFrame& frame, const CCIOSurfaceDrawQuad* quad) |
{ |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
TexTransformTextureProgramBinding binding; |
binding.set(textureIOSurfaceProgram()); |
@@ -1058,12 +1059,12 @@ void CCRendererGL::onSwapBuffersComplete() |
void CCRendererGL::onMemoryAllocationChanged(WebGraphicsMemoryAllocation allocation) |
{ |
// FIXME: This is called on the main thread in single threaded mode, but we expect it on the impl thread. |
- if (!CCProxy::hasImplThread()) { |
- DCHECK(CCProxy::isMainThread()); |
+ if (!m_proxy->hasImplThread()) { |
+ DCHECK(m_proxy->isMainThread()); |
DebugScopedSetImplThread impl; |
onMemoryAllocationChangedOnImplThread(allocation); |
} else { |
- DCHECK(CCProxy::isImplThread()); |
+ DCHECK(m_proxy->isImplThread()); |
onMemoryAllocationChangedOnImplThread(allocation); |
} |
} |