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

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

Issue 2009693002: Create SurfaceManager with ui::InitializeContextFactoryForTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | 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
index 12da2da2659ff396b8e562069a098ef2e9fce93b..7efa6c010be14e0512f46ad462a66307c1a1ee87 100644
--- a/ui/compositor/test/context_factories_for_test.cc
+++ b/ui/compositor/test/context_factories_for_test.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/sys_info.h"
+#include "cc/surfaces/surface_manager.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_switches.h"
#include "ui/compositor/test/in_process_context_factory.h"
@@ -13,6 +14,7 @@
namespace {
+static cc::SurfaceManager* g_surface_manager = nullptr;
static ui::ContextFactory* g_implicit_factory = NULL;
static gfx::DisableNullDrawGLBindings* g_disable_null_draw = NULL;
@@ -30,14 +32,17 @@ ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) {
if (enable_pixel_output)
g_disable_null_draw = new gfx::DisableNullDrawGLBindings;
bool context_factory_for_test = true;
+ g_surface_manager = new cc::SurfaceManager;
g_implicit_factory =
- new InProcessContextFactory(context_factory_for_test, nullptr);
+ new InProcessContextFactory(context_factory_for_test, g_surface_manager);
return g_implicit_factory;
}
void TerminateContextFactoryForTests() {
delete g_implicit_factory;
g_implicit_factory = NULL;
+ delete g_surface_manager;
+ g_surface_manager = nullptr;
delete g_disable_null_draw;
g_disable_null_draw = NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698