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

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: Add a test for the transform goop 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
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 observer_list_, 567 observer_list_,
559 OnCompositingLockStateChanged(this)); 568 OnCompositingLockStateChanged(this));
560 } 569 }
561 570
562 void Compositor::CancelCompositorLock() { 571 void Compositor::CancelCompositorLock() {
563 if (compositor_lock_) 572 if (compositor_lock_)
564 compositor_lock_->CancelLock(); 573 compositor_lock_->CancelLock();
565 } 574 }
566 575
567 } // namespace ui 576 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698