| 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
|
|
|