| 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bitmap.eraseColor(SK_ColorTRANSPARENT); | 494 bitmap.eraseColor(SK_ColorTRANSPARENT); |
| 495 SkCanvas canvas(bitmap); | 495 SkCanvas canvas(bitmap); |
| 496 | 496 |
| 497 video_renderer.Paint(video_frame.get(), | 497 video_renderer.Paint( |
| 498 &canvas, | 498 video_frame.get(), &canvas, video_frame->visible_rect(), 0xff, NULL); |
| 499 video_frame->visible_rect(), | |
| 500 0xff); | |
| 501 | 499 |
| 502 CopyFromCompositingSurfaceCallback(quit_callback, | 500 CopyFromCompositingSurfaceCallback(quit_callback, |
| 503 result, | 501 result, |
| 504 bitmap); | 502 bitmap); |
| 505 } | 503 } |
| 506 | 504 |
| 507 void SetExpectedCopyFromCompositingSurfaceResult(bool result, | 505 void SetExpectedCopyFromCompositingSurfaceResult(bool result, |
| 508 const SkBitmap& bitmap) { | 506 const SkBitmap& bitmap) { |
| 509 expected_copy_from_compositing_surface_result_ = result; | 507 expected_copy_from_compositing_surface_result_ = result; |
| 510 expected_copy_from_compositing_surface_bitmap_ = bitmap; | 508 expected_copy_from_compositing_surface_bitmap_ = bitmap; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 852 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
| 855 testing::ValuesIn(kAllCompositingModes)); | 853 testing::ValuesIn(kAllCompositingModes)); |
| 856 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 854 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
| 857 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 855 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
| 858 testing::ValuesIn(kAllCompositingModes)); | 856 testing::ValuesIn(kAllCompositingModes)); |
| 859 | 857 |
| 860 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 858 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
| 861 | 859 |
| 862 } // namespace | 860 } // namespace |
| 863 } // namespace content | 861 } // namespace content |
| OLD | NEW |