OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // Unit test for VideoCaptureBufferPool. | 5 // Unit test for VideoCaptureBufferPool. |
6 | 6 |
7 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" | 7 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 mapped_ = false; | 64 mapped_ = false; |
65 } | 65 } |
66 bool IsMapped() const override { return mapped_; } | 66 bool IsMapped() const override { return mapped_; } |
67 gfx::BufferFormat GetFormat() const override { | 67 gfx::BufferFormat GetFormat() const override { |
68 return gfx::BufferFormat::BGRA_8888; | 68 return gfx::BufferFormat::BGRA_8888; |
69 } | 69 } |
70 void GetStride(int* stride) const override { | 70 void GetStride(int* stride) const override { |
71 *stride = size_.width() * 4; | 71 *stride = size_.width() * 4; |
72 return; | 72 return; |
73 } | 73 } |
74 gfx::GpuMemoryBufferId GetId() const override { return 0; } | 74 gfx::GpuMemoryBufferId GetId() const override { |
| 75 return gfx::GpuMemoryBufferId(0); |
| 76 } |
75 gfx::GpuMemoryBufferHandle GetHandle() const override { | 77 gfx::GpuMemoryBufferHandle GetHandle() const override { |
76 return gfx::GpuMemoryBufferHandle(); | 78 return gfx::GpuMemoryBufferHandle(); |
77 } | 79 } |
78 ClientBuffer AsClientBuffer() override { return nullptr; } | 80 ClientBuffer AsClientBuffer() override { return nullptr; } |
79 | 81 |
80 private: | 82 private: |
81 const gfx::Size size_; | 83 const gfx::Size size_; |
82 uint8* const data_; | 84 uint8* const data_; |
83 bool mapped_; | 85 bool mapped_; |
84 }; | 86 }; |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 if (buffer4->data() != nullptr) | 358 if (buffer4->data() != nullptr) |
357 memset(buffer4->data(), 0x77, buffer4->size()); | 359 memset(buffer4->data(), 0x77, buffer4->size()); |
358 buffer4.reset(); | 360 buffer4.reset(); |
359 } | 361 } |
360 | 362 |
361 INSTANTIATE_TEST_CASE_P(, | 363 INSTANTIATE_TEST_CASE_P(, |
362 VideoCaptureBufferPoolTest, | 364 VideoCaptureBufferPoolTest, |
363 testing::ValuesIn(kCapturePixelFormatAndStorages)); | 365 testing::ValuesIn(kCapturePixelFormatAndStorages)); |
364 | 366 |
365 } // namespace content | 367 } // namespace content |
OLD | NEW |