Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2900)

Unified Diff: cc/software_renderer.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/software_renderer.cc
diff --git a/cc/software_renderer.cc b/cc/software_renderer.cc
index 05b7a11225255a96894dfcdccc2da475c8f3d05f..8714b39ec1eaadf036765f1651559511a563db7d 100644
--- a/cc/software_renderer.cc
+++ b/cc/software_renderer.cc
@@ -65,13 +65,14 @@ bool isScaleAndTranslate(const SkMatrix& matrix)
} // anonymous namespace
-scoped_ptr<SoftwareRenderer> SoftwareRenderer::create(RendererClient* client, ResourceProvider* resourceProvider, WebCompositorSoftwareOutputDevice* outputDevice)
+scoped_ptr<SoftwareRenderer> SoftwareRenderer::create(RendererClient* client, ResourceProvider* resourceProvider, WebCompositorSoftwareOutputDevice* outputDevice, bool hasImplThread)
{
- return make_scoped_ptr(new SoftwareRenderer(client, resourceProvider, outputDevice));
+ return make_scoped_ptr(new SoftwareRenderer(client, resourceProvider, outputDevice, hasImplThread));
}
-SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* resourceProvider, WebCompositorSoftwareOutputDevice* outputDevice)
+SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* resourceProvider, WebCompositorSoftwareOutputDevice* outputDevice, bool hasImplThread)
: DirectRenderer(client, resourceProvider)
+ , m_hasImplThread(hasImplThread)
, m_visible(true)
, m_outputDevice(outputDevice)
, m_skCurrentCanvas(0)
@@ -333,7 +334,7 @@ void SoftwareRenderer::drawUnsupportedQuad(const DrawingFrame& frame, const Draw
bool SoftwareRenderer::swapBuffers()
{
- if (Proxy::hasImplThread())
+ if (m_hasImplThread)
m_client->onSwapBuffersComplete();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698