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

Side by Side 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: exposing a SkPicture instead of PicturePileImpl. 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 unified diff | Download patch | Annotate | Revision Log
« cc/picture_pile_impl.cc ('K') | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 return commitPendingRequest.commitPending; 1012 return commitPendingRequest.commitPending;
1013 } 1013 }
1014 1014
1015 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) 1015 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est)
1016 { 1016 {
1017 DCHECK(isImplThread()); 1017 DCHECK(isImplThread());
1018 request->commitPending = m_schedulerOnImplThread->commitPending(); 1018 request->commitPending = m_schedulerOnImplThread->commitPending();
1019 request->completion.signal(); 1019 request->completion.signal();
1020 } 1020 }
1021 1021
1022 skia::RefPtr<SkPicture> ThreadProxy::capturePicture()
1023 {
1024 DCHECK(isMainThread());
1025 CompletionEvent completion;
1026 skia::RefPtr<SkPicture> picture;
1027 {
1028 DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
1029 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::capturePictureOnI mplThread,
1030 m_implThreadWeakPtr,
1031 &completion,
1032 &picture));
1033 completion.wait();
1034 }
1035 return picture;
1036 }
1037
1038 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia:: RefPtr<SkPicture>* picture)
1039 {
1040 DCHECK(isImplThread());
1041 *picture = m_layerTreeHostImpl->capturePicture();
1042 completion->signal();
1043 }
1044
1022 } // namespace cc 1045 } // namespace cc
OLDNEW
« cc/picture_pile_impl.cc ('K') | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698