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

Unified Diff: cc/thread_proxy.cc

Issue 11731002: Implement a method to access the non-composited content root layer picture pile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 7 years, 11 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
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index 68bb89078cebdc692867927743c202bb88f4076b..6979a1528265c5a517b49a9d0f9e22005c0dbe15 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -1017,4 +1017,27 @@ void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ
request->completion.signal();
}
+skia::RefPtr<SkPicture> ThreadProxy::capturePicture()
+{
+ DCHECK(isMainThread());
+ CompletionEvent completion;
+ skia::RefPtr<SkPicture> picture;
+ {
+ DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
+ Proxy::implThread()->postTask(base::Bind(&ThreadProxy::capturePictureOnImplThread,
+ m_implThreadWeakPtr,
+ &completion,
+ &picture));
+ completion.wait();
+ }
+ return picture;
+}
+
+void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia::RefPtr<SkPicture>* picture)
+{
+ DCHECK(isImplThread());
+ *picture = m_layerTreeHostImpl->capturePicture();
+ completion->signal();
+}
+
} // namespace cc
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698