summaryrefslogtreecommitdiffstats
path: root/cc/CCThreadProxy.cpp
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-01 01:15:17 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-01 01:15:17 +0000
commit022cbf167d68b3480bda258933d06425403f028b (patch)
treeed001f9af1fba38947b1c6b546e35c8c95e90dc4 /cc/CCThreadProxy.cpp
parentbb53a5aeea4d8f5e19bf6152bb10e17f0af1652f (diff)
downloadchromium_src-022cbf167d68b3480bda258933d06425403f028b.zip
chromium_src-022cbf167d68b3480bda258933d06425403f028b.tar.gz
chromium_src-022cbf167d68b3480bda258933d06425403f028b.tar.bz2
Rolls cc and webkit_compositor up to 127340
With this, webkit_compositor_unittests successfully runs+builds and it's possible to start implemented WebCompositorSupport BUG= Review URL: https://chromiumcodereview.appspot.com/10920059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/CCThreadProxy.cpp')
-rw-r--r--cc/CCThreadProxy.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp
index 394b286..9255010 100644
--- a/cc/CCThreadProxy.cpp
+++ b/cc/CCThreadProxy.cpp
@@ -89,9 +89,12 @@ bool CCThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect)
// Perform a synchronous commit.
- CCCompletionEvent beginFrameCompletion;
- CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::forceBeginFrameOnImplThread, &beginFrameCompletion));
- beginFrameCompletion.wait();
+ {
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
+ CCCompletionEvent beginFrameCompletion;
+ CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::forceBeginFrameOnImplThread, &beginFrameCompletion));
+ beginFrameCompletion.wait();
+ }
m_inCompositeAndReadback = true;
beginFrame();
m_inCompositeAndReadback = false;
@@ -100,8 +103,11 @@ bool CCThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect)
ReadbackRequest request;
request.rect = rect;
request.pixels = pixels;
- CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::requestReadbackOnImplThread, &request));
- request.completion.wait();
+ {
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
+ CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::requestReadbackOnImplThread, &request));
+ request.completion.wait();
+ }
return request.success;
}
@@ -138,6 +144,7 @@ void CCThreadProxy::finishAllRendering()
ASSERT(CCProxy::isMainThread());
// Make sure all GL drawing is finished on the impl thread.
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::finishAllRenderingOnImplThread, &completion));
completion.wait();
@@ -176,6 +183,7 @@ void CCThreadProxy::setSurfaceReadyOnImplThread()
void CCThreadProxy::setVisible(bool visible)
{
TRACE_EVENT0("cc", "CCThreadProxy::setVisible");
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::setVisibleOnImplThread, &completion, visible));
completion.wait();
@@ -197,6 +205,7 @@ bool CCThreadProxy::initializeRenderer()
CCCompletionEvent completion;
bool initializeSucceeded = false;
RendererCapabilities capabilities;
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::initializeRendererOnImplThread,
&completion,
&initializeSucceeded,
@@ -229,6 +238,7 @@ bool CCThreadProxy::recreateContext()
CCCompletionEvent completion;
bool recreateSucceeded = false;
RendererCapabilities capabilities;
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::recreateContextOnImplThread,
&completion,
context.leakPtr(),
@@ -251,6 +261,7 @@ void CCThreadProxy::implSideRenderingStats(CCRenderingStats& stats)
{
ASSERT(isMainThread());
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::implSideRenderingStatsOnImplThread,
&completion,
@@ -369,6 +380,7 @@ void CCThreadProxy::start()
ASSERT(isMainThread());
ASSERT(CCProxy::implThread());
// Create LayerTreeHostImpl.
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::initializeImplOnImplThread, &completion));
completion.wait();
@@ -400,6 +412,7 @@ void CCThreadProxy::stop()
void CCThreadProxy::forceSerializeOnSwapBuffers()
{
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::forceSerializeOnSwapBuffersOnImplThread, &completion));
completion.wait();
@@ -721,6 +734,7 @@ void CCThreadProxy::acquireLayerTextures()
return;
TRACE_EVENT0("cc", "CCThreadProxy::acquireLayerTextures");
+ DebugScopedSetMainThreadBlocked mainThreadBlocked;
CCCompletionEvent completion;
CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::acquireLayerTexturesForMainThreadOnImplThread, &completion));
completion.wait(); // Block until it is safe to write to layer textures from the main thread.