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

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: Merge 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
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::ScheduleDraw() { 31 void Compositor::ScheduleDraw() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 73 }
71 74
72 void Compositor::NotifyEnd() { 75 void Compositor::NotifyEnd() {
73 OnNotifyEnd(); 76 OnNotifyEnd();
74 FOR_EACH_OBSERVER(CompositorObserver, 77 FOR_EACH_OBSERVER(CompositorObserver,
75 observer_list_, 78 observer_list_,
76 OnCompositingEnded(this)); 79 OnCompositingEnded(this));
77 } 80 }
78 81
79 } // namespace ui 82 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698