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

Side by Side Diff: ui/gfx/test/gfx_test_utils.cc

Issue 9288053: Remove old (pre-webkit) compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 11 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
« no previous file with comments | « ui/gfx/test/gfx_test_utils.h ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/gfx/test/gfx_test_utils.h"
6
7 #if defined(VIEWS_COMPOSITOR)
8 #include "base/command_line.h"
9 #include "ui/gfx/compositor/compositor.h"
10 #include "ui/gfx/compositor/test/test_compositor.h"
11 #endif
12
13 #if defined(VIEWS_COMPOSITOR)
14 namespace switches {
15
16 const char kDisableTestCompositor[] = "disable-test-compositor";
17
18 }
19 #endif
20
21 namespace ui {
22 namespace gfx_test_utils {
23
24 void SetupTestCompositor() {
25 #if defined(VIEWS_COMPOSITOR)
26 if (!CommandLine::ForCurrentProcess()->HasSwitch(
27 switches::kDisableTestCompositor)) {
28 // Use a mock compositor that noops draws.
29 ui::Compositor::set_compositor_factory_for_testing(
30 ui::TestCompositor::Create);
31 }
32 #endif
33 }
34
35 } // namespace gfx_test_utils
36 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/test/gfx_test_utils.h ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698