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

Unified Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 583503002: rendering_helper - Warm up the rendering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and nit Created 6 years, 2 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 | « content/common/gpu/media/rendering_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/video_decode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index 07cbcefca143e51afa263ebb1ec41e2c932bf992..08a3eb538e0686aaa9e48446568d6a96556b6b3d 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -101,6 +101,9 @@ const base::FilePath::CharType* g_output_log = NULL;
// The value is set by the switch "--rendering_fps".
double g_rendering_fps = 60;
+// The value is set by the switch "--rendering_warm_up".
+int g_rendering_warm_up = 0;
+
// Magic constants for differentiating the reasons for NotifyResetDone being
// called.
enum ResetPoint {
@@ -1070,6 +1073,7 @@ TEST_P(VideoDecodeAcceleratorParamTest, TestSimpleDecode) {
RenderingHelperParams helper_params;
helper_params.rendering_fps = g_rendering_fps;
+ helper_params.warm_up_iterations = g_rendering_warm_up;
helper_params.render_as_thumbnails = render_as_thumbnails;
if (render_as_thumbnails) {
// Only one decoder is supported with thumbnail rendering
@@ -1341,6 +1345,7 @@ TEST_F(VideoDecodeAcceleratorTest, TestDecodeTimeMedian) {
// Disable rendering by setting the rendering_fps = 0.
helper_params.rendering_fps = 0;
+ helper_params.warm_up_iterations = 0;
helper_params.render_as_thumbnails = false;
ClientStateNotification<ClientState>* note =
@@ -1421,6 +1426,11 @@ int main(int argc, char **argv) {
CHECK(base::StringToDouble(input, &content::g_rendering_fps));
continue;
}
+ if (it->first == "rendering_warm_up") {
+ std::string input(it->second.begin(), it->second.end());
+ CHECK(base::StringToInt(input, &content::g_rendering_warm_up));
+ continue;
+ }
// TODO(owenlin): Remove this flag once it is not used in autotest.
if (it->first == "disable_rendering") {
content::g_rendering_fps = 0;
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698