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

Side by Side Diff: content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc

Issue 2298353002: gfx: Use unsigned strides for gpu memory buffers. (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 (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 <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return static_cast<void*>(data_); 72 return static_cast<void*>(data_);
73 } 73 }
74 void Unmap() override { 74 void Unmap() override {
75 EXPECT_TRUE(mapped_); 75 EXPECT_TRUE(mapped_);
76 mapped_ = false; 76 mapped_ = false;
77 } 77 }
78 gfx::Size GetSize() const override { return size_; } 78 gfx::Size GetSize() const override { return size_; }
79 gfx::BufferFormat GetFormat() const override { 79 gfx::BufferFormat GetFormat() const override {
80 return gfx::BufferFormat::BGRA_8888; 80 return gfx::BufferFormat::BGRA_8888;
81 } 81 }
82 int stride(size_t plane) const override { 82 uint32_t stride(size_t plane) const override {
83 EXPECT_EQ(0u, plane); 83 EXPECT_EQ(0u, plane);
84 return size_.width() * 4; 84 return size_.width() * 4;
85 } 85 }
86 gfx::GpuMemoryBufferId GetId() const override { 86 gfx::GpuMemoryBufferId GetId() const override {
87 return gfx::GpuMemoryBufferId(0); 87 return gfx::GpuMemoryBufferId(0);
88 } 88 }
89 gfx::GpuMemoryBufferHandle GetHandle() const override { 89 gfx::GpuMemoryBufferHandle GetHandle() const override {
90 return gfx::GpuMemoryBufferHandle(); 90 return gfx::GpuMemoryBufferHandle();
91 } 91 }
92 ClientBuffer AsClientBuffer() override { return nullptr; } 92 ClientBuffer AsClientBuffer() override { return nullptr; }
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 ASSERT_NE(nullptr, held_buffers.back().get()); 495 ASSERT_NE(nullptr, held_buffers.back().get());
496 resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam()); 496 resurrected = ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
497 ASSERT_EQ(nullptr, resurrected.get()); 497 ASSERT_EQ(nullptr, resurrected.get());
498 } 498 }
499 499
500 INSTANTIATE_TEST_CASE_P(, 500 INSTANTIATE_TEST_CASE_P(,
501 VideoCaptureBufferPoolTest, 501 VideoCaptureBufferPoolTest,
502 testing::ValuesIn(kCapturePixelFormatAndStorages)); 502 testing::ValuesIn(kCapturePixelFormatAndStorages));
503 503
504 } // namespace content 504 } // namespace content
OLDNEW
« no previous file with comments | « components/display_compositor/buffer_queue_unittest.cc ('k') | gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698