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

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

Issue 8805033: Makes tests either use mock compositor or mock WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years 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
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 {
11 11
12 TextureDrawParams::TextureDrawParams() 12 TextureDrawParams::TextureDrawParams()
13 : blend(false), 13 : blend(false),
14 has_valid_alpha_channel(false), 14 has_valid_alpha_channel(false),
15 opacity(1.0f), 15 opacity(1.0f),
16 vertically_flipped(false) { 16 vertically_flipped(false) {
17 } 17 }
18 18
19 // static
20 Compositor*(*Compositor::compositor_factory_)(CompositorDelegate*) = NULL;
21
22 Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size) 19 Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size)
23 : delegate_(delegate), 20 : delegate_(delegate),
24 size_(size), 21 size_(size),
25 root_layer_(NULL) { 22 root_layer_(NULL) {
26 } 23 }
27 24
28 Compositor::~Compositor() { 25 Compositor::~Compositor() {
29 if (root_layer_) 26 if (root_layer_)
30 root_layer_->SetCompositor(NULL); 27 root_layer_->SetCompositor(NULL);
31 } 28 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 99 }
103 100
104 void Compositor::NotifyEnd() { 101 void Compositor::NotifyEnd() {
105 OnNotifyEnd(); 102 OnNotifyEnd();
106 FOR_EACH_OBSERVER(CompositorObserver, 103 FOR_EACH_OBSERVER(CompositorObserver,
107 observer_list_, 104 observer_list_,
108 OnCompositingEnded(this)); 105 OnCompositingEnded(this));
109 } 106 }
110 107
111 } // namespace ui 108 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698