Index: content/common/gpu/client/gpu_memory_buffer_factory_host.cc |
diff --git a/content/common/gpu/client/gpu_memory_buffer_factory_host.cc b/content/common/gpu/client/gpu_memory_buffer_factory_host.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ea7a321d1c5fcf9eb1b4ecc30e630ce83416eb16 |
--- /dev/null |
+++ b/content/common/gpu/client/gpu_memory_buffer_factory_host.cc |
@@ -0,0 +1,27 @@ |
+// Copyright 2014 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/client/gpu_memory_buffer_factory_host.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace content { |
+namespace { |
+GpuMemoryBufferFactoryHost* instance = NULL; |
+} |
+ |
+// static |
+GpuMemoryBufferFactoryHost* GpuMemoryBufferFactoryHost::GetInstance() { |
+ return instance; |
+} |
+ |
+GpuMemoryBufferFactoryHost::GpuMemoryBufferFactoryHost() { |
+ DCHECK(instance == NULL); |
+ instance = this; |
+} |
+ |
+GpuMemoryBufferFactoryHost::~GpuMemoryBufferFactoryHost() { |
+ instance = NULL; |
+} |
+} |