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

Unified Diff: ui/compositor/test/context_factories_for_test.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/test/context_factories_for_test.h ('k') | ui/compositor/test/draw_waiter_for_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/context_factories_for_test.cc
diff --git a/ui/compositor/test/context_factories_for_test.cc b/ui/compositor/test/context_factories_for_test.cc
deleted file mode 100644
index f3eeeb369a39085c9ae8fb932c2e150399ca3ef8..0000000000000000000000000000000000000000
--- a/ui/compositor/test/context_factories_for_test.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/compositor/test/context_factories_for_test.h"
-
-#include "base/command_line.h"
-#include "base/sys_info.h"
-#include "ui/compositor/compositor.h"
-#include "ui/compositor/compositor_switches.h"
-#include "ui/compositor/test/in_process_context_factory.h"
-#include "ui/gl/gl_implementation.h"
-
-namespace {
-
-static ui::ContextFactory* g_implicit_factory = NULL;
-static gfx::DisableNullDrawGLBindings* g_disable_null_draw = NULL;
-
-} // namespace
-
-namespace ui {
-
-// static
-ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) {
- DCHECK(!g_implicit_factory) <<
- "ContextFactory for tests already initialized.";
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kEnablePixelOutputInTests))
- enable_pixel_output = true;
- if (enable_pixel_output)
- g_disable_null_draw = new gfx::DisableNullDrawGLBindings;
- g_implicit_factory = new InProcessContextFactory();
- return g_implicit_factory;
-}
-
-void TerminateContextFactoryForTests() {
- delete g_implicit_factory;
- g_implicit_factory = NULL;
- delete g_disable_null_draw;
- g_disable_null_draw = NULL;
-}
-
-} // namespace ui
« no previous file with comments | « ui/compositor/test/context_factories_for_test.h ('k') | ui/compositor/test/draw_waiter_for_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698