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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_android.cc

Issue 699073004: content: Add command line flag for native GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu-memory-buffer-impl-unittests
Patch Set: rebase and use correct texture target Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/common/gpu/client/gpu_memory_buffer_impl.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" 8 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
9 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" 9 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // static 13 // static
14 void GpuMemoryBufferImpl::GetSupportedTypes( 14 void GpuMemoryBufferImpl::GetSupportedTypes(
15 std::vector<gfx::GpuMemoryBufferType>* types) { 15 std::vector<gfx::GpuMemoryBufferType>* types) {
16 const gfx::GpuMemoryBufferType supported_types[] = { 16 const gfx::GpuMemoryBufferType supported_types[] = {
17 gfx::SURFACE_TEXTURE_BUFFER, 17 gfx::SHARED_MEMORY_BUFFER,
18 gfx::SHARED_MEMORY_BUFFER 18 gfx::SURFACE_TEXTURE_BUFFER
piman 2014/11/19 02:39:40 I would prefer having the decision about the types
reveman 2014/11/20 00:53:02 I think my other refactor will result in what you'
19 }; 19 };
20 types->assign(supported_types, supported_types + arraysize(supported_types)); 20 types->assign(supported_types, supported_types + arraysize(supported_types));
21 } 21 }
22 22
23 // static 23 // static
24 bool GpuMemoryBufferImpl::IsConfigurationSupported( 24 bool GpuMemoryBufferImpl::IsConfigurationSupported(
25 gfx::GpuMemoryBufferType type, 25 gfx::GpuMemoryBufferType type,
26 Format format, 26 Format format,
27 Usage usage) { 27 Usage usage) {
28 switch (type) { 28 switch (type) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 case gfx::SURFACE_TEXTURE_BUFFER: 118 case gfx::SURFACE_TEXTURE_BUFFER:
119 return GpuMemoryBufferImplSurfaceTexture::CreateFromHandle( 119 return GpuMemoryBufferImplSurfaceTexture::CreateFromHandle(
120 handle, size, format, callback); 120 handle, size, format, callback);
121 default: 121 default:
122 NOTREACHED(); 122 NOTREACHED();
123 return scoped_ptr<GpuMemoryBufferImpl>(); 123 return scoped_ptr<GpuMemoryBufferImpl>();
124 } 124 }
125 } 125 }
126 126
127 } // namespace content 127 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698