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

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: Fix unittests 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 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 SetRequiresHighResToDraw(); 2335 SetRequiresHighResToDraw();
2336 2336
2337 return true; 2337 return true;
2338 } 2338 }
2339 2339
2340 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase, 2340 void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase,
2341 base::TimeDelta interval) { 2341 base::TimeDelta interval) {
2342 client_->CommitVSyncParameters(timebase, interval); 2342 client_->CommitVSyncParameters(timebase, interval);
2343 } 2343 }
2344 2344
2345 void LayerTreeHostImpl::SetBeginFrameSource(BeginFrameSource* source) {
2346 client_->SetBeginFrameSource(source);
2347 }
2348
2345 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { 2349 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) {
2346 if (device_viewport_size == device_viewport_size_) 2350 if (device_viewport_size == device_viewport_size_)
2347 return; 2351 return;
2348 TRACE_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize", 2352 TRACE_EVENT_INSTANT2("cc", "LayerTreeHostImpl::SetViewportSize",
2349 TRACE_EVENT_SCOPE_THREAD, "width", 2353 TRACE_EVENT_SCOPE_THREAD, "width",
2350 device_viewport_size.width(), "height", 2354 device_viewport_size.width(), "height",
2351 device_viewport_size.height()); 2355 device_viewport_size.height());
2352 2356
2353 if (pending_tree_) 2357 if (pending_tree_)
2354 active_tree_->SetViewportSizeInvalid(); 2358 active_tree_->SetViewportSizeInvalid();
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 return task_runner_provider_->HasImplThread(); 3926 return task_runner_provider_->HasImplThread();
3923 } 3927 }
3924 3928
3925 bool LayerTreeHostImpl::CommitToActiveTree() const { 3929 bool LayerTreeHostImpl::CommitToActiveTree() const {
3926 // In single threaded mode we skip the pending tree and commit directly to the 3930 // In single threaded mode we skip the pending tree and commit directly to the
3927 // active tree. 3931 // active tree.
3928 return !task_runner_provider_->HasImplThread(); 3932 return !task_runner_provider_->HasImplThread();
3929 } 3933 }
3930 3934
3931 } // namespace cc 3935 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698