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

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

Issue 8561014: Fixes some asserts in compositor_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/compositor/layer_unittest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/gfx/compositor/compositor.h" 5 #include "ui/gfx/compositor/compositor.h"
6 6
7 #include "ui/gfx/compositor/compositor_observer.h" 7 #include "ui/gfx/compositor/compositor_observer.h"
8 #include "ui/gfx/compositor/layer.h" 8 #include "ui/gfx/compositor/layer.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 17 matching lines...) Expand all
28 Compositor::~Compositor() { 28 Compositor::~Compositor() {
29 if (root_layer_) 29 if (root_layer_)
30 root_layer_->SetCompositor(NULL); 30 root_layer_->SetCompositor(NULL);
31 } 31 }
32 32
33 void Compositor::ScheduleDraw() { 33 void Compositor::ScheduleDraw() {
34 delegate_->ScheduleDraw(); 34 delegate_->ScheduleDraw();
35 } 35 }
36 36
37 void Compositor::SetRootLayer(Layer* root_layer) { 37 void Compositor::SetRootLayer(Layer* root_layer) {
38 if (root_layer_ == root_layer)
39 return;
38 if (root_layer_) 40 if (root_layer_)
39 root_layer_->SetCompositor(NULL); 41 root_layer_->SetCompositor(NULL);
40 root_layer_ = root_layer; 42 root_layer_ = root_layer;
41 if (root_layer_ && !root_layer_->GetCompositor()) 43 if (root_layer_ && !root_layer_->GetCompositor())
42 root_layer_->SetCompositor(this); 44 root_layer_->SetCompositor(this);
43 OnRootLayerChanged(); 45 OnRootLayerChanged();
44 } 46 }
45 47
46 void Compositor::Draw(bool force_clear) { 48 void Compositor::Draw(bool force_clear) {
47 if (!root_layer_) 49 if (!root_layer_)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 102 }
101 103
102 void Compositor::NotifyEnd() { 104 void Compositor::NotifyEnd() {
103 OnNotifyEnd(); 105 OnNotifyEnd();
104 FOR_EACH_OBSERVER(CompositorObserver, 106 FOR_EACH_OBSERVER(CompositorObserver,
105 observer_list_, 107 observer_list_,
106 OnCompositingEnded(this)); 108 OnCompositingEnded(this));
107 } 109 }
108 110
109 } // namespace ui 111 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698