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

Side by Side Diff: gpu/ipc/common/gpu_memory_buffer_support.cc

Issue 2316733002: gpu: Delete unnecessary code. (Closed)
Patch Set: . Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/common/gpu_memory_buffer_support.h" 5 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(USE_OZONE) 10 #if defined(USE_OZONE)
(...skipping 10 matching lines...) Expand all
21 return gfx::SURFACE_TEXTURE_BUFFER; 21 return gfx::SURFACE_TEXTURE_BUFFER;
22 #endif 22 #endif
23 #if defined(USE_OZONE) 23 #if defined(USE_OZONE)
24 return gfx::OZONE_NATIVE_PIXMAP; 24 return gfx::OZONE_NATIVE_PIXMAP;
25 #endif 25 #endif
26 return gfx::EMPTY_BUFFER; 26 return gfx::EMPTY_BUFFER;
27 } 27 }
28 28
29 bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format, 29 bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format,
30 gfx::BufferUsage usage) { 30 gfx::BufferUsage usage) {
31 DCHECK_NE(gfx::SHARED_MEMORY_BUFFER, GetNativeGpuMemoryBufferType());
32 DCHECK_NE(gfx::EMPTY_BUFFER, GetNativeGpuMemoryBufferType());
31 #if defined(OS_MACOSX) 33 #if defined(OS_MACOSX)
32 switch (usage) { 34 switch (usage) {
33 case gfx::BufferUsage::GPU_READ: 35 case gfx::BufferUsage::GPU_READ:
34 case gfx::BufferUsage::SCANOUT: 36 case gfx::BufferUsage::SCANOUT:
35 return format == gfx::BufferFormat::BGRA_8888 || 37 return format == gfx::BufferFormat::BGRA_8888 ||
36 format == gfx::BufferFormat::RGBA_8888 || 38 format == gfx::BufferFormat::RGBA_8888 ||
37 format == gfx::BufferFormat::BGRX_8888; 39 format == gfx::BufferFormat::BGRX_8888;
38 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: 40 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE:
39 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: 41 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT:
40 return format == gfx::BufferFormat::R_8 || 42 return format == gfx::BufferFormat::R_8 ||
(...skipping 25 matching lines...) Expand all
66 } 68 }
67 return ui::ClientNativePixmapFactory::GetInstance()->IsConfigurationSupported( 69 return ui::ClientNativePixmapFactory::GetInstance()->IsConfigurationSupported(
68 format, usage); 70 format, usage);
69 #endif 71 #endif
70 72
71 NOTREACHED(); 73 NOTREACHED();
72 return false; 74 return false;
73 } 75 }
74 76
75 } // namespace gpu 77 } // namespace gpu
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | services/ui/ws/mus_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698