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

Side by Side Diff: media/filters/video_renderer_algorithm_unittest.cc

Issue 1227383003: Remove memset from VideoFrame and mark buffer as unpoisoned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dalecurtis@ comments. Created 5 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <cmath> 5 #include <cmath>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // special connotations. 70 // special connotations.
71 tick_clock_->Advance(base::TimeDelta::FromMicroseconds(10000)); 71 tick_clock_->Advance(base::TimeDelta::FromMicroseconds(10000));
72 time_source_.set_tick_clock_for_testing(tick_clock_.get()); 72 time_source_.set_tick_clock_for_testing(tick_clock_.get());
73 } 73 }
74 ~VideoRendererAlgorithmTest() override {} 74 ~VideoRendererAlgorithmTest() override {}
75 75
76 scoped_refptr<VideoFrame> CreateFrame(base::TimeDelta timestamp) { 76 scoped_refptr<VideoFrame> CreateFrame(base::TimeDelta timestamp) {
77 const gfx::Size natural_size(8, 8); 77 const gfx::Size natural_size(8, 8);
78 return frame_pool_.CreateFrame(VideoFrame::YV12, natural_size, 78 return frame_pool_.CreateFrame(VideoFrame::YV12, natural_size,
79 gfx::Rect(natural_size), natural_size, 79 gfx::Rect(natural_size), natural_size,
80 timestamp); 80 timestamp, false);
81 } 81 }
82 82
83 base::TimeDelta minimum_glitch_time() const { 83 base::TimeDelta minimum_glitch_time() const {
84 return base::TimeDelta::FromSeconds( 84 return base::TimeDelta::FromSeconds(
85 VideoRendererAlgorithm::kMinimumAcceptableTimeBetweenGlitchesSecs); 85 VideoRendererAlgorithm::kMinimumAcceptableTimeBetweenGlitchesSecs);
86 } 86 }
87 87
88 base::TimeDelta max_acceptable_drift() const { 88 base::TimeDelta max_acceptable_drift() const {
89 return algorithm_.max_acceptable_drift_; 89 return algorithm_.max_acceptable_drift_;
90 } 90 }
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 ASSERT_TRUE(is_using_cadence()); 1316 ASSERT_TRUE(is_using_cadence());
1317 1317
1318 // Finally the last frame. 1318 // Finally the last frame.
1319 rendered_frame = RenderAndStep(&tg, &frames_dropped); 1319 rendered_frame = RenderAndStep(&tg, &frames_dropped);
1320 EXPECT_EQ(1u, frames_queued()); 1320 EXPECT_EQ(1u, frames_queued());
1321 EXPECT_EQ(tg.interval(12), rendered_frame->timestamp()); 1321 EXPECT_EQ(tg.interval(12), rendered_frame->timestamp());
1322 ASSERT_TRUE(is_using_cadence()); 1322 ASSERT_TRUE(is_using_cadence());
1323 } 1323 }
1324 1324
1325 } // namespace media 1325 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698