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

Unified Diff: gpu/ipc/service/gpu_memory_buffer_factory.cc

Issue 2781293003: gpu: Have GpuService create and own GpuMemoryBufferFactory. (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « content/gpu/in_process_gpu_thread.cc ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_memory_buffer_factory.cc
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory.cc b/gpu/ipc/service/gpu_memory_buffer_factory.cc
index d3dbb554a7e3e4824003d6cd774393a17643f386..ed016cd46c48e462b1537278833f190950a4b5d3 100644
--- a/gpu/ipc/service/gpu_memory_buffer_factory.cc
+++ b/gpu/ipc/service/gpu_memory_buffer_factory.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "build/build_config.h"
+#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#if defined(OS_MACOSX)
#include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h"
@@ -21,6 +22,8 @@ namespace gpu {
// static
std::unique_ptr<GpuMemoryBufferFactory>
GpuMemoryBufferFactory::CreateNativeType() {
+ if (GetNativeGpuMemoryBufferType() == gfx::EMPTY_BUFFER)
reveman 2017/03/31 06:13:34 nit: can we just remove the NOTREACHED below inste
sadrul 2017/03/31 13:09:15 Done.
+ return nullptr;
#if defined(OS_MACOSX)
return base::WrapUnique(new GpuMemoryBufferFactoryIOSurface);
#endif
« no previous file with comments | « content/gpu/in_process_gpu_thread.cc ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698