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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really revert task runner changes Created 4 years, 8 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
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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 SetRequiresHighResToDraw(); 2334 SetRequiresHighResToDraw();
2335 2335
2336 return true; 2336 return true;
2337 } 2337 }
2338 2338
2339 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase, 2339 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase,
2340 base::TimeDelta interval) { 2340 base::TimeDelta interval) {
2341 client_->CommitVSyncParameters(timebase, interval); 2341 client_->CommitVSyncParameters(timebase, interval);
2342 } 2342 }
2343 2343
2344 void LayerTreeHostImpl::SetBeginFrameSource(BeginFrameSource* source) {
2345 client_->SetBeginFrameSource(source);
2346 }
2347
2344 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { 2348 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) {
2345 if (device_viewport_size == device_viewport_size_) 2349 if (device_viewport_size == device_viewport_size_)
2346 return; 2350 return;
2347 TRACE_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize", 2351 TRACE_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize",
2348 TRACE_EVENT_SCOPE_THREAD, "width", 2352 TRACE_EVENT_SCOPE_THREAD, "width",
2349 device_viewport_size.width(), "height", 2353 device_viewport_size.width(), "height",
2350 device_viewport_size.height()); 2354 device_viewport_size.height());
2351 2355
2352 if (pending_tree_) 2356 if (pending_tree_)
2353 active_tree_->SetViewportSizeInvalid(); 2357 active_tree_->SetViewportSizeInvalid();
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
3921 return task_runner_provider_->HasImplThread(); 3925 return task_runner_provider_->HasImplThread();
3922 } 3926 }
3923 3927
3924 bool LayerTreeHostImpl::CommitToActiveTree() const { 3928 bool LayerTreeHostImpl::CommitToActiveTree() const {
3925 // In single threaded mode we skip the pending tree and commit directly to the 3929 // In single threaded mode we skip the pending tree and commit directly to the
3926 // active tree. 3930 // active tree.
3927 return !task_runner_provider_->HasImplThread(); 3931 return !task_runner_provider_->HasImplThread();
3928 } 3932 }
3929 3933
3930 } // namespace cc 3934 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698