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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_test_template.h

Issue 2717963002: ui: Add gfx::BufferUsage::SCANOUT_CPU_READ_WRITE. (Closed)
Patch Set: SCANOUT_CPU_READ_WRITE as valid shm usage 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // This file defines tests that implementations of GpuMemoryBufferFactory should 5 // This file defines tests that implementations of GpuMemoryBufferFactory should
6 // pass in order to be conformant. 6 // pass in order to be conformant.
7 7
8 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ 8 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_
9 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ 9 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 47
48 TYPED_TEST_CASE_P(GpuMemoryBufferImplTest); 48 TYPED_TEST_CASE_P(GpuMemoryBufferImplTest);
49 49
50 TYPED_TEST_P(GpuMemoryBufferImplTest, CreateFromHandle) { 50 TYPED_TEST_P(GpuMemoryBufferImplTest, CreateFromHandle) {
51 const gfx::Size kBufferSize(8, 8); 51 const gfx::Size kBufferSize(8, 8);
52 52
53 for (auto format : gfx::GetBufferFormatsForTesting()) { 53 for (auto format : gfx::GetBufferFormatsForTesting()) {
54 gfx::BufferUsage usages[] = { 54 gfx::BufferUsage usages[] = {
55 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT, 55 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT,
56 gfx::BufferUsage::SCANOUT_CPU_READ_WRITE,
56 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE, 57 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
57 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT}; 58 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT};
58 for (auto usage : usages) { 59 for (auto usage : usages) {
59 if (!TypeParam::IsConfigurationSupported(format, usage)) 60 if (!TypeParam::IsConfigurationSupported(format, usage))
60 continue; 61 continue;
61 62
62 bool destroyed = false; 63 bool destroyed = false;
63 gfx::GpuMemoryBufferHandle handle; 64 gfx::GpuMemoryBufferHandle handle;
64 GpuMemoryBufferImpl::DestructionCallback destroy_callback = 65 GpuMemoryBufferImpl::DestructionCallback destroy_callback =
65 TestFixture::CreateGpuMemoryBuffer(kBufferSize, format, usage, 66 TestFixture::CreateGpuMemoryBuffer(kBufferSize, format, usage,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // The GpuMemoryBufferImplTest test case verifies behavior that is expected 202 // The GpuMemoryBufferImplTest test case verifies behavior that is expected
202 // from a GpuMemoryBuffer implementation in order to be conformant. 203 // from a GpuMemoryBuffer implementation in order to be conformant.
203 REGISTER_TYPED_TEST_CASE_P(GpuMemoryBufferImplTest, 204 REGISTER_TYPED_TEST_CASE_P(GpuMemoryBufferImplTest,
204 CreateFromHandle, 205 CreateFromHandle,
205 Map, 206 Map,
206 PersistentMap); 207 PersistentMap);
207 208
208 } // namespace gpu 209 } // namespace gpu
209 210
210 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ 211 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc ('k') | gpu/ipc/common/gpu_memory_buffer_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698