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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory.cc

Issue 1846253003: Revert of Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/gpu_memory_buffer_factory.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory.cc b/content/common/gpu/gpu_memory_buffer_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3468d5a6f189bc566f141a6eadedb992c2f8c20a
--- /dev/null
+++ b/content/common/gpu/gpu_memory_buffer_factory.cc
@@ -0,0 +1,39 @@
+// 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/gpu_memory_buffer_factory.h"
+
+#include "base/logging.h"
+#include "build/build_config.h"
+
+#if defined(OS_MACOSX)
+#include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h"
+#endif
+
+#if defined(OS_ANDROID)
+#include "content/common/gpu/gpu_memory_buffer_factory_surface_texture.h"
+#endif
+
+#if defined(USE_OZONE)
+#include "content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h"
+#endif
+
+namespace content {
+
+// static
+scoped_ptr<GpuMemoryBufferFactory> GpuMemoryBufferFactory::CreateNativeType() {
+#if defined(OS_MACOSX)
+ return make_scoped_ptr(new GpuMemoryBufferFactoryIOSurface);
+#endif
+#if defined(OS_ANDROID)
+ return make_scoped_ptr(new GpuMemoryBufferFactorySurfaceTexture);
+#endif
+#if defined(USE_OZONE)
+ return make_scoped_ptr(new GpuMemoryBufferFactoryOzoneNativePixmap);
+#endif
+ NOTREACHED();
+ return nullptr;
+}
+
+} // namespace content
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory.h ('k') | content/common/gpu/gpu_memory_buffer_factory_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698