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

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: review fixes. Created 7 years, 12 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
« cc/layer_tree_host_unittest.cc ('K') | « 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 ab708613204ecbc672900ca71bdb6abdef33994b..4cdbca173461906d598bb3ba295e51b85dfe589f 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -12,6 +12,7 @@
#include "cc/input_handler.h"
#include "cc/layer_tree_host.h"
#include "cc/output_surface.h"
+#include "cc/picture_pile_impl.h"
#include "cc/scheduler.h"
#include "cc/thread.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsContext3D.h"
@@ -1019,4 +1020,27 @@ void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ
request->completion.signal();
}
+scoped_refptr<PicturePileImpl> ThreadProxy::capturePicturePile()
+{
+ DCHECK(isMainThread());
+ CompletionEvent completion;
+ scoped_refptr<PicturePileImpl> picture_pile;
+ {
+ DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
+ Proxy::implThread()->postTask(base::Bind(&ThreadProxy::capturePicturePileOnImplThread,
+ m_implThreadWeakPtr,
+ &completion,
+ &picture_pile));
+ completion.wait();
+ }
+ return picture_pile;
+}
+
+void ThreadProxy::capturePicturePileOnImplThread(CompletionEvent* completion, scoped_refptr<PicturePileImpl>* picture_pile)
+{
+ DCHECK(isImplThread());
+ *picture_pile = m_layerTreeHostImpl->capturePicturePile();
+ completion->signal();
+}
+
} // namespace cc
« cc/layer_tree_host_unittest.cc ('K') | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698