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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 667793004: Support single-threaded impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, add ContextCapabilities Created 6 years, 2 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
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 344dfb97f66df586e94ef01a0717426831627db9..1af657a3d0ead51ef2076e2a3133121699e800f1 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -467,8 +467,6 @@ void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately");
DCHECK(Proxy::IsMainThread());
- DCHECK(!layer_tree_host_impl_->settings().impl_side_painting)
- << "Impl-side painting and synchronous compositing are not supported.";
base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true);
if (layer_tree_host_->output_surface_lost()) {
@@ -493,6 +491,13 @@ void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
{
DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this));
+ if (layer_tree_host_impl_->settings().impl_side_painting) {
+ layer_tree_host_impl_->ActivateSyncTree();
+ layer_tree_host_impl_->active_tree()->UpdateDrawProperties();
+ layer_tree_host_impl_->ManageTiles();
+ layer_tree_host_impl_->SynchronouslyInitializeAllTiles();
+ }
+
LayerTreeHostImpl::FrameData frame;
DoComposite(frame_begin_time, &frame);

Powered by Google App Engine
This is Rietveld 408576698