Index: content/common/gpu/gpu_surface_lookup.cc |
diff --git a/content/common/gpu/gpu_surface_lookup.cc b/content/common/gpu/gpu_surface_lookup.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8cd9a9a882b5acd33eda928a63cb7b42b14bdd4 |
--- /dev/null |
+++ b/content/common/gpu/gpu_surface_lookup.cc |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2012 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 "content/common/gpu/gpu_surface_lookup.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace { |
+GpuSurfaceLookup* g_instance = NULL; |
+} // anonymous namespace |
+ |
+// static |
+GpuSurfaceLookup* GpuSurfaceLookup::GetInstance() { |
+ DCHECK(g_instance); |
+ return g_instance; |
+} |
+ |
+// static |
+void GpuSurfaceLookup::InitInstance(GpuSurfaceLookup* lookup) { |
+ DCHECK(!g_instance); |
+ g_instance = lookup; |
+} |