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

Side by Side Diff: gpu/ipc/service/gpu_memory_buffer_factory.cc

Issue 2781293003: gpu: Have GpuService create and own GpuMemoryBufferFactory. (Closed)
Patch Set: . Created 3 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" 5 #include "gpu/ipc/service/gpu_memory_buffer_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
reveman 2017/03/31 13:38:38 no need for this after removing the lines below:
sadrul 2017/04/02 02:50:50 Done.
10 11
11 #if defined(OS_MACOSX) 12 #if defined(OS_MACOSX)
12 #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h" 13 #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h"
13 #endif 14 #endif
14 15
15 #if defined(USE_OZONE) 16 #if defined(USE_OZONE)
16 #include "gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h" 17 #include "gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h"
17 #endif 18 #endif
18 19
19 namespace gpu { 20 namespace gpu {
20 21
21 // static 22 // static
22 std::unique_ptr<GpuMemoryBufferFactory> 23 std::unique_ptr<GpuMemoryBufferFactory>
23 GpuMemoryBufferFactory::CreateNativeType() { 24 GpuMemoryBufferFactory::CreateNativeType() {
25 if (GetNativeGpuMemoryBufferType() == gfx::EMPTY_BUFFER)
26 return nullptr;
reveman 2017/03/31 13:38:38 remove these two lines now that it's fine to retur
sadrul 2017/04/02 02:50:50 Done. Also, updated the doc to say that this can r
24 #if defined(OS_MACOSX) 27 #if defined(OS_MACOSX)
25 return base::WrapUnique(new GpuMemoryBufferFactoryIOSurface); 28 return base::WrapUnique(new GpuMemoryBufferFactoryIOSurface);
26 #endif 29 #endif
27 #if defined(USE_OZONE) 30 #if defined(USE_OZONE)
28 return base::WrapUnique(new GpuMemoryBufferFactoryOzoneNativePixmap); 31 return base::WrapUnique(new GpuMemoryBufferFactoryOzoneNativePixmap);
29 #endif 32 #endif
30 NOTREACHED();
31 return nullptr; 33 return nullptr;
32 } 34 }
33 35
34 } // namespace gpu 36 } // namespace gpu
OLDNEW
« 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