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

Side by Side Diff: ui/compositor/compositor.cc

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: bugref, scale_delta DCHECK + comment Created 4 years, 4 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 378 }
379 379
380 void Compositor::SetVisible(bool visible) { 380 void Compositor::SetVisible(bool visible) {
381 host_->SetVisible(visible); 381 host_->SetVisible(visible);
382 } 382 }
383 383
384 bool Compositor::IsVisible() { 384 bool Compositor::IsVisible() {
385 return host_->visible(); 385 return host_->visible();
386 } 386 }
387 387
388 bool Compositor::ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) {
389 return host_->GetInputHandler()->ScrollLayerTo(layer_id, offset);
390 }
391
392 bool Compositor::GetScrollOffsetForLayer(int layer_id,
393 gfx::ScrollOffset* offset) const {
394 return host_->GetInputHandler()->GetScrollOffsetForLayer(layer_id, offset);
395 }
396
388 void Compositor::SetAuthoritativeVSyncInterval( 397 void Compositor::SetAuthoritativeVSyncInterval(
389 const base::TimeDelta& interval) { 398 const base::TimeDelta& interval) {
390 context_factory_->SetAuthoritativeVSyncInterval(this, interval); 399 context_factory_->SetAuthoritativeVSyncInterval(this, interval);
391 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 400 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
392 cc::switches::kDisableBeginFrameScheduling)) { 401 cc::switches::kDisableBeginFrameScheduling)) {
393 vsync_manager_->SetAuthoritativeVSyncInterval(interval); 402 vsync_manager_->SetAuthoritativeVSyncInterval(interval);
394 } 403 }
395 } 404 }
396 405
397 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 406 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 observer_list_, 578 observer_list_,
570 OnCompositingLockStateChanged(this)); 579 OnCompositingLockStateChanged(this));
571 } 580 }
572 581
573 void Compositor::CancelCompositorLock() { 582 void Compositor::CancelCompositorLock() {
574 if (compositor_lock_) 583 if (compositor_lock_)
575 compositor_lock_->CancelLock(); 584 compositor_lock_->CancelLock();
576 } 585 }
577 586
578 } // namespace ui 587 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698