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

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

Issue 517733002: Revert of Fix assorted issues with remote CoreAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_up_accel_layers
Patch Set: 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/gl/gl_gl_api_implementation.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 <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
283 scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const { 279 scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
284 return vsync_manager_; 280 return vsync_manager_;
285 } 281 }
286 282
287 void Compositor::AddObserver(CompositorObserver* observer) { 283 void Compositor::AddObserver(CompositorObserver* observer) {
288 #if defined(OS_MACOSX) 284 #if defined(OS_MACOSX)
289 // Debugging instrumentation for crbug.com/401630. 285 // Debugging instrumentation for crbug.com/401630.
290 // TODO(ccameron): remove this. 286 // TODO(ccameron): remove this.
291 CHECK(observer); 287 CHECK(observer);
292 if (!observer_list_.HasObserver(observer)) 288 if (!observer_list_.HasObserver(observer))
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 // Call ScheduleDraw() instead of Draw() in order to allow other 440 // Call ScheduleDraw() instead of Draw() in order to allow other
445 // CompositorObservers to be notified before starting another 441 // CompositorObservers to be notified before starting another
446 // draw cycle. 442 // draw cycle.
447 ScheduleDraw(); 443 ScheduleDraw();
448 } 444 }
449 FOR_EACH_OBSERVER( 445 FOR_EACH_OBSERVER(
450 CompositorObserver, observer_list_, OnCompositingEnded(this)); 446 CompositorObserver, observer_list_, OnCompositingEnded(this));
451 } 447 }
452 448
453 } // namespace ui 449 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698