| Index: cc/thread_proxy.cc
|
| diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
|
| index ab708613204ecbc672900ca71bdb6abdef33994b..480faf91868d1e2712dbfe9dbd6dddb0771f8197 100644
|
| --- a/cc/thread_proxy.cc
|
| +++ b/cc/thread_proxy.cc
|
| @@ -1019,4 +1019,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
|
|
|