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

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

Powered by Google App Engine
This is Rietveld 408576698