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

Unified Diff: media/capture/video/fake_video_capture_device_unittest.cc

Issue 1267883002: Pass GpuMemoryBuffer backed VideoFrame from browser to renderer processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmbtracker-multiple
Patch Set: Rebase Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/capture/video/fake_video_capture_device.cc ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/fake_video_capture_device_unittest.cc
diff --git a/media/capture/video/fake_video_capture_device_unittest.cc b/media/capture/video/fake_video_capture_device_unittest.cc
index 9b924621df6246b8515b64e505a2b10d5d87a443..c73f5888b0ea2450af1dc516e5d7eee3d2971e99 100644
--- a/media/capture/video/fake_video_capture_device_unittest.cc
+++ b/media/capture/video/fake_video_capture_device_unittest.cc
@@ -27,12 +27,15 @@ namespace {
// This class is a Client::Buffer that allocates and frees the requested |size|.
class MockBuffer : public VideoCaptureDevice::Client::Buffer {
public:
- MockBuffer(int buffer_id, size_t size)
- : id_(buffer_id), size_(size), data_(new uint8[size_]) {}
+ MockBuffer(int buffer_id, size_t mapped_size)
+ : id_(buffer_id),
+ mapped_size_(mapped_size),
+ data_(new uint8[mapped_size]) {}
~MockBuffer() override { delete[] data_; }
int id() const override { return id_; }
- size_t size() const override { return size_; }
+ gfx::Size dimensions() const override { return gfx::Size(); }
+ size_t mapped_size() const override { return mapped_size_; }
void* data(int plane) override { return data_; }
ClientBuffer AsClientBuffer(int plane) override { return nullptr; }
#if defined(OS_POSIX)
@@ -43,7 +46,7 @@ class MockBuffer : public VideoCaptureDevice::Client::Buffer {
private:
const int id_;
- const size_t size_;
+ const size_t mapped_size_;
uint8* const data_;
};
« no previous file with comments | « media/capture/video/fake_video_capture_device.cc ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698