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

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

Issue 516643002: Fix assorted issues with remote CoreAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_up_accel_layers
Patch Set: Incorporate review feedback Created 6 years, 3 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 <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (root_layer_) 269 if (root_layer_)
270 root_layer_->OnDeviceScaleFactorChanged(scale); 270 root_layer_->OnDeviceScaleFactorChanged(scale);
271 } 271 }
272 } 272 }
273 273
274 void Compositor::SetBackgroundColor(SkColor color) { 274 void Compositor::SetBackgroundColor(SkColor color) {
275 host_->set_background_color(color); 275 host_->set_background_color(color);
276 ScheduleDraw(); 276 ScheduleDraw();
277 } 277 }
278 278
279 void Compositor::SetVisible(bool visible) {
280 host_->SetVisible(visible);
281 }
282
279 scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const { 283 scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
280 return vsync_manager_; 284 return vsync_manager_;
281 } 285 }
282 286
283 void Compositor::AddObserver(CompositorObserver* observer) { 287 void Compositor::AddObserver(CompositorObserver* observer) {
284 #if defined(OS_MACOSX) 288 #if defined(OS_MACOSX)
285 // Debugging instrumentation for crbug.com/401630. 289 // Debugging instrumentation for crbug.com/401630.
286 // TODO(ccameron): remove this. 290 // TODO(ccameron): remove this.
287 CHECK(observer); 291 CHECK(observer);
288 if (!observer_list_.HasObserver(observer)) 292 if (!observer_list_.HasObserver(observer))
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // Call ScheduleDraw() instead of Draw() in order to allow other 444 // Call ScheduleDraw() instead of Draw() in order to allow other
441 // CompositorObservers to be notified before starting another 445 // CompositorObservers to be notified before starting another
442 // draw cycle. 446 // draw cycle.
443 ScheduleDraw(); 447 ScheduleDraw();
444 } 448 }
445 FOR_EACH_OBSERVER( 449 FOR_EACH_OBSERVER(
446 CompositorObserver, observer_list_, OnCompositingEnded(this)); 450 CompositorObserver, observer_list_, OnCompositingEnded(this));
447 } 451 }
448 452
449 } // namespace ui 453 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698