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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_browsertest.cc

Issue 531353002: Add VideoImageGenerator. (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
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | content/renderer/media/webmediaplayer_ms.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 (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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/gpu/compositor_util.h" 9 #include "content/browser/gpu/compositor_util.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 return; 486 return;
487 } 487 }
488 488
489 media::SkCanvasVideoRenderer video_renderer; 489 media::SkCanvasVideoRenderer video_renderer;
490 490
491 SkBitmap bitmap; 491 SkBitmap bitmap;
492 bitmap.allocN32Pixels(video_frame->visible_rect().width(), 492 bitmap.allocN32Pixels(video_frame->visible_rect().width(),
493 video_frame->visible_rect().height()); 493 video_frame->visible_rect().height());
494 // Don't clear the canvas because drawing a video frame by Src mode. 494 // Don't clear the canvas because drawing a video frame by Src mode.
495 SkCanvas canvas(bitmap); 495 SkCanvas canvas(bitmap);
496 video_renderer.Copy(video_frame.get(), &canvas); 496 video_renderer.Copy(video_frame, &canvas);
497 497
498 CopyFromCompositingSurfaceCallback(quit_callback, 498 CopyFromCompositingSurfaceCallback(quit_callback,
499 result, 499 result,
500 bitmap); 500 bitmap);
501 } 501 }
502 502
503 void SetExpectedCopyFromCompositingSurfaceResult(bool result, 503 void SetExpectedCopyFromCompositingSurfaceResult(bool result,
504 const SkBitmap& bitmap) { 504 const SkBitmap& bitmap) {
505 expected_copy_from_compositing_surface_result_ = result; 505 expected_copy_from_compositing_surface_result_ = result;
506 expected_copy_from_compositing_surface_bitmap_ = bitmap; 506 expected_copy_from_compositing_surface_bitmap_ = bitmap;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING)); 912 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING));
913 INSTANTIATE_TEST_CASE_P( 913 INSTANTIATE_TEST_CASE_P(
914 GLAndSoftwareCompositing, 914 GLAndSoftwareCompositing,
915 CompositingRenderWidgetHostViewBrowserTestTabCaptureHighDPI, 915 CompositingRenderWidgetHostViewBrowserTestTabCaptureHighDPI,
916 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING)); 916 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING));
917 917
918 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 918 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
919 919
920 } // namespace 920 } // namespace
921 } // namespace content 921 } // namespace content
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | content/renderer/media/webmediaplayer_ms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698