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

Side by Side Diff: remoting/codec/video_encoder_vpx_unittest.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
Patch Set: Created 4 years, 12 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
« no previous file with comments | « remoting/codec/video_encoder_vpx.cc ('k') | remoting/signaling/fake_signal_strategy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "remoting/codec/video_encoder_vpx.h" 5 #include "remoting/codec/video_encoder_vpx.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 for (int x = 0; x < frame_size.width(); ++x) { 31 for (int x = 0; x < frame_size.width(); ++x) {
32 for (int y = 0; y < frame_size.height(); ++y) { 32 for (int y = 0; y < frame_size.height(); ++y) {
33 uint8_t* pixel_u8 = frame->data() + (y * frame->stride()) + 33 uint8_t* pixel_u8 = frame->data() + (y * frame->stride()) +
34 (x * webrtc::DesktopFrame::kBytesPerPixel); 34 (x * webrtc::DesktopFrame::kBytesPerPixel);
35 *(reinterpret_cast<uint32_t*>(pixel_u8)) = 35 *(reinterpret_cast<uint32_t*>(pixel_u8)) =
36 ((x + y) & 1) ? kGreenColor : kBlueColor; 36 ((x + y) & 1) ? kGreenColor : kBlueColor;
37 } 37 }
38 } 38 }
39 frame->mutable_updated_region()->SetRect( 39 frame->mutable_updated_region()->SetRect(
40 webrtc::DesktopRect::MakeSize(frame_size)); 40 webrtc::DesktopRect::MakeSize(frame_size));
41 return frame.Pass(); 41 return frame;
42 } 42 }
43 43
44 TEST(VideoEncoderVpxTest, Vp8) { 44 TEST(VideoEncoderVpxTest, Vp8) {
45 scoped_ptr<VideoEncoderVpx> encoder(VideoEncoderVpx::CreateForVP8()); 45 scoped_ptr<VideoEncoderVpx> encoder(VideoEncoderVpx::CreateForVP8());
46 TestVideoEncoder(encoder.get(), false); 46 TestVideoEncoder(encoder.get(), false);
47 } 47 }
48 48
49 TEST(VideoEncoderVpxTest, Vp9) { 49 TEST(VideoEncoderVpxTest, Vp9) {
50 scoped_ptr<VideoEncoderVpx> encoder(VideoEncoderVpx::CreateForVP9()); 50 scoped_ptr<VideoEncoderVpx> encoder(VideoEncoderVpx::CreateForVP9());
51 // VP9 encoder defaults to lossless encode and lossy (I420) color. 51 // VP9 encoder defaults to lossless encode and lossy (I420) color.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 TEST(VideoEncoderVpxTest, Vp9LossyUnchangedFrame) { 178 TEST(VideoEncoderVpxTest, Vp9LossyUnchangedFrame) {
179 scoped_ptr<VideoEncoderVpx> encoder(VideoEncoderVpx::CreateForVP9()); 179 scoped_ptr<VideoEncoderVpx> encoder(VideoEncoderVpx::CreateForVP9());
180 encoder->SetLosslessEncode(false); 180 encoder->SetLosslessEncode(false);
181 // Expect that VP9+CR should generate no more than 10 top-off frames 181 // Expect that VP9+CR should generate no more than 10 top-off frames
182 // per cycle, and take no more than 2 cycles to top-off. 182 // per cycle, and take no more than 2 cycles to top-off.
183 TestVideoEncoderEmptyFrames(encoder.get(), 20); 183 TestVideoEncoderEmptyFrames(encoder.get(), 20);
184 } 184 }
185 185
186 } // namespace remoting 186 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/codec/video_encoder_vpx.cc ('k') | remoting/signaling/fake_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698