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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_factory_host.cc

Issue 458313002: Browser side OZONE_NATIVE_BUFFER allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
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;
+}
+}
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_factory_host.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698