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

Side by Side Diff: chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc

Issue 543893002: Random fixes through Chrome for scoped_reftpr T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 <algorithm> 5 #include <algorithm>
6 #include <cmath> 6 #include <cmath>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 video_frame->format() == media::VideoFrame::I420 || 201 video_frame->format() == media::VideoFrame::I420 ||
202 video_frame->format() == media::VideoFrame::YV12A); 202 video_frame->format() == media::VideoFrame::YV12A);
203 203
204 if (done_callback_.is_null() || expected_yuv_colors_.empty()) 204 if (done_callback_.is_null() || expected_yuv_colors_.empty())
205 return; // No need to waste CPU doing analysis on the frame. 205 return; // No need to waste CPU doing analysis on the frame.
206 206
207 // Take the median value of each plane because the test image will contain a 207 // Take the median value of each plane because the test image will contain a
208 // letterboxed content region of mostly a solid color plus a small piece of 208 // letterboxed content region of mostly a solid color plus a small piece of
209 // "something" that's animating to keep the tab capture pipeline generating 209 // "something" that's animating to keep the tab capture pipeline generating
210 // new frames. 210 // new frames.
211 const gfx::Rect region = FindLetterboxedContentRegion(video_frame); 211 const gfx::Rect region = FindLetterboxedContentRegion(video_frame.get());
212 YUVColor current_color; 212 YUVColor current_color;
213 current_color.y = ComputeMedianIntensityInRegionInPlane( 213 current_color.y = ComputeMedianIntensityInRegionInPlane(
214 region, 214 region,
215 video_frame->stride(media::VideoFrame::kYPlane), 215 video_frame->stride(media::VideoFrame::kYPlane),
216 video_frame->data(media::VideoFrame::kYPlane)); 216 video_frame->data(media::VideoFrame::kYPlane));
217 current_color.u = ComputeMedianIntensityInRegionInPlane( 217 current_color.u = ComputeMedianIntensityInRegionInPlane(
218 gfx::ScaleToEnclosedRect(region, 0.5f), 218 gfx::ScaleToEnclosedRect(region, 0.5f),
219 video_frame->stride(media::VideoFrame::kUPlane), 219 video_frame->stride(media::VideoFrame::kUPlane),
220 video_frame->data(media::VideoFrame::kUPlane)); 220 video_frame->data(media::VideoFrame::kUPlane));
221 current_color.v = ComputeMedianIntensityInRegionInPlane( 221 current_color.v = ComputeMedianIntensityInRegionInPlane(
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 delete receiver; 392 delete receiver;
393 cast_environment->Shutdown(); 393 cast_environment->Shutdown();
394 } 394 }
395 395
396 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { 396 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) {
397 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); 397 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html"));
398 } 398 }
399 399
400 } // namespace extensions 400 } // namespace extensions
OLDNEW
« no previous file with comments | « base/test/test_pending_task.cc ('k') | chrome/browser/extensions/extension_toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698