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

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

Issue 8240006: Use a mocked compositor for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testsuite subclasses Created 9 years, 2 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 | 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
19 Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size) 22 Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size)
20 : delegate_(delegate), 23 : delegate_(delegate),
21 size_(size), 24 size_(size),
22 root_layer_(NULL) { 25 root_layer_(NULL) {
23 } 26 }
24 27
25 Compositor::~Compositor() { 28 Compositor::~Compositor() {
26 } 29 }
27 30
28 void Compositor::SetRootLayer(Layer* root_layer) { 31 void Compositor::SetRootLayer(Layer* root_layer) {
(...skipping 28 matching lines...) Expand all
57 } 60 }
58 61
59 void Compositor::NotifyEnd() { 62 void Compositor::NotifyEnd() {
60 OnNotifyEnd(); 63 OnNotifyEnd();
61 FOR_EACH_OBSERVER(CompositorObserver, 64 FOR_EACH_OBSERVER(CompositorObserver,
62 observer_list_, 65 observer_list_,
63 OnCompositingEnded(this)); 66 OnCompositingEnded(this));
64 } 67 }
65 68
66 } // namespace ui 69 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698