| OLD | NEW |
| 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 CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ | 8 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ |
| 9 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ | 9 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ |
| 10 | 10 |
| 11 #include <stddef.h> | 11 #include <stddef.h> |
| 12 #include <string.h> | 12 #include <string.h> |
| 13 | 13 |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "ui/gfx/buffer_format_util.h" | 15 #include "ui/gfx/buffer_format_util.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace gpu { |
| 18 | 18 |
| 19 template <typename GpuMemoryBufferImplType> | 19 template <typename GpuMemoryBufferImplType> |
| 20 class GpuMemoryBufferImplTest : public testing::Test { | 20 class GpuMemoryBufferImplTest : public testing::Test { |
| 21 public: | 21 public: |
| 22 GpuMemoryBufferImpl::DestructionCallback AllocateGpuMemoryBuffer( | 22 GpuMemoryBufferImpl::DestructionCallback AllocateGpuMemoryBuffer( |
| 23 const gfx::Size& size, | 23 const gfx::Size& size, |
| 24 gfx::BufferFormat format, | 24 gfx::BufferFormat format, |
| 25 gfx::BufferUsage usage, | 25 gfx::BufferUsage usage, |
| 26 gfx::GpuMemoryBufferHandle* handle, | 26 gfx::GpuMemoryBufferHandle* handle, |
| 27 bool* destroyed) { | 27 bool* destroyed) { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 // The GpuMemoryBufferImplTest test case verifies behavior that is expected | 198 // The GpuMemoryBufferImplTest test case verifies behavior that is expected |
| 199 // from a GpuMemoryBuffer implementation in order to be conformant. | 199 // from a GpuMemoryBuffer implementation in order to be conformant. |
| 200 REGISTER_TYPED_TEST_CASE_P(GpuMemoryBufferImplTest, | 200 REGISTER_TYPED_TEST_CASE_P(GpuMemoryBufferImplTest, |
| 201 CreateFromHandle, | 201 CreateFromHandle, |
| 202 Map, | 202 Map, |
| 203 PersistentMap); | 203 PersistentMap); |
| 204 | 204 |
| 205 } // namespace content | 205 } // namespace gpu |
| 206 | 206 |
| 207 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ | 207 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ |
| OLD | NEW |