OLD | NEW |
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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 quit_callback.Run(); | 492 quit_callback.Run(); |
493 return; | 493 return; |
494 } | 494 } |
495 | 495 |
496 media::SkCanvasVideoRenderer video_renderer; | 496 media::SkCanvasVideoRenderer video_renderer; |
497 | 497 |
498 SkBitmap bitmap; | 498 SkBitmap bitmap; |
499 bitmap.allocPixels(SkImageInfo::Make(video_frame->visible_rect().width(), | 499 bitmap.allocPixels(SkImageInfo::Make(video_frame->visible_rect().width(), |
500 video_frame->visible_rect().height(), | 500 video_frame->visible_rect().height(), |
501 kPMColor_SkColorType, | 501 kPMColor_SkColorType, |
502 kOpaque_SkAlphaType)); | 502 kPremul_SkAlphaType)); |
503 bitmap.allocPixels(); | 503 bitmap.allocPixels(); |
504 SkCanvas canvas(bitmap); | 504 SkCanvas canvas(bitmap); |
505 | 505 |
506 video_renderer.Paint(video_frame.get(), | 506 video_renderer.Paint(video_frame.get(), |
507 &canvas, | 507 &canvas, |
508 video_frame->visible_rect(), | 508 video_frame->visible_rect(), |
509 0xff); | 509 0xff); |
510 | 510 |
511 CopyFromCompositingSurfaceCallback(quit_callback, | 511 CopyFromCompositingSurfaceCallback(quit_callback, |
512 result, | 512 result, |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 865 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
866 testing::ValuesIn(kAllCompositingModes)); | 866 testing::ValuesIn(kAllCompositingModes)); |
867 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 867 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
868 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 868 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
869 testing::ValuesIn(kAllCompositingModes)); | 869 testing::ValuesIn(kAllCompositingModes)); |
870 | 870 |
871 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 871 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
872 | 872 |
873 } // namespace | 873 } // namespace |
874 } // namespace content | 874 } // namespace content |
OLD | NEW |