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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_unittest.cc

Issue 2490153003: [Mojo Video Capture] Replace const scoped_refptr<T>& with scoped_refptr<T> and use std::move (Closed)
Patch Set: fix bots Created 4 years, 1 month 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 #include "content/browser/media/capture/desktop_capture_device.h" 5 #include "content/browser/media/capture/desktop_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return std::unique_ptr<Buffer>(); 86 return std::unique_ptr<Buffer>();
87 } 87 }
88 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 88 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
89 const media::VideoCaptureFormat& frame_format, 89 const media::VideoCaptureFormat& frame_format,
90 base::TimeTicks reference_time, 90 base::TimeTicks reference_time,
91 base::TimeDelta timestamp) override { 91 base::TimeDelta timestamp) override {
92 DoOnIncomingCapturedBuffer(); 92 DoOnIncomingCapturedBuffer();
93 } 93 }
94 void OnIncomingCapturedVideoFrame( 94 void OnIncomingCapturedVideoFrame(
95 std::unique_ptr<Buffer> buffer, 95 std::unique_ptr<Buffer> buffer,
96 const scoped_refptr<media::VideoFrame>& frame) override { 96 scoped_refptr<media::VideoFrame> frame) override {
97 DoOnIncomingCapturedVideoFrame(); 97 DoOnIncomingCapturedVideoFrame();
98 } 98 }
99 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 99 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
100 const gfx::Size& dimensions, 100 const gfx::Size& dimensions,
101 media::VideoPixelFormat format, 101 media::VideoPixelFormat format,
102 media::VideoPixelStorage storage) override { 102 media::VideoPixelStorage storage) override {
103 EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 && 103 EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 &&
104 storage == media::PIXEL_STORAGE_CPU); 104 storage == media::PIXEL_STORAGE_CPU);
105 DoResurrectLastOutputBuffer(); 105 DoResurrectLastOutputBuffer();
106 return std::unique_ptr<Buffer>(); 106 return std::unique_ptr<Buffer>();
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 frame_size); 550 frame_size);
551 for (int i = 0; i < output_frame_->size().height(); ++i) { 551 for (int i = 0; i < output_frame_->size().height(); ++i) {
552 EXPECT_EQ(0, 552 EXPECT_EQ(0,
553 memcmp(inverted_frame->data() + i * inverted_frame->stride(), 553 memcmp(inverted_frame->data() + i * inverted_frame->stride(),
554 output_frame_->data() + i * output_frame_->stride(), 554 output_frame_->data() + i * output_frame_->stride(),
555 output_frame_->stride())); 555 output_frame_->stride()));
556 } 556 }
557 } 557 }
558 558
559 } // namespace content 559 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698