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

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: review fixes. 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/layer_tree_host_unittest.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"
11 #include "cc/frame_rate_controller.h" 11 #include "cc/frame_rate_controller.h"
12 #include "cc/input_handler.h" 12 #include "cc/input_handler.h"
13 #include "cc/layer_tree_host.h" 13 #include "cc/layer_tree_host.h"
14 #include "cc/output_surface.h" 14 #include "cc/output_surface.h"
15 #include "cc/picture_pile_impl.h"
15 #include "cc/scheduler.h" 16 #include "cc/scheduler.h"
16 #include "cc/thread.h" 17 #include "cc/thread.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsCo ntext3D.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsCo ntext3D.h"
18 19
19 using WebKit::WebSharedGraphicsContext3D; 20 using WebKit::WebSharedGraphicsContext3D;
20 21
21 namespace { 22 namespace {
22 23
23 // Measured in seconds. 24 // Measured in seconds.
24 const double contextRecreationTickRate = 0.03; 25 const double contextRecreationTickRate = 0.03;
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 return commitPendingRequest.commitPending; 1013 return commitPendingRequest.commitPending;
1013 } 1014 }
1014 1015
1015 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) 1016 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est)
1016 { 1017 {
1017 DCHECK(isImplThread()); 1018 DCHECK(isImplThread());
1018 request->commitPending = m_schedulerOnImplThread->commitPending(); 1019 request->commitPending = m_schedulerOnImplThread->commitPending();
1019 request->completion.signal(); 1020 request->completion.signal();
1020 } 1021 }
1021 1022
1023 scoped_refptr<PicturePileImpl> ThreadProxy::capturePicturePile()
1024 {
1025 DCHECK(isMainThread());
1026 CompletionEvent completion;
1027 scoped_refptr<PicturePileImpl> picture_pile;
1028 {
1029 DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
1030 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::capturePicturePil eOnImplThread,
1031 m_implThreadWeakPtr,
1032 &completion,
1033 &picture_pile));
1034 completion.wait();
1035 }
1036 return picture_pile;
1037 }
1038
1039 void ThreadProxy::capturePicturePileOnImplThread(CompletionEvent* completion, sc oped_refptr<PicturePileImpl>* picture_pile)
1040 {
1041 DCHECK(isImplThread());
1042 *picture_pile = m_layerTreeHostImpl->capturePicturePile();
1043 completion->signal();
1044 }
1045
1022 } // namespace cc 1046 } // namespace cc
OLDNEW
« 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