Chromium Code Reviews| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 485 return; | 485 return; |
| 486 } | 486 } |
| 487 | 487 |
| 488 media::SkCanvasVideoRenderer video_renderer; | 488 media::SkCanvasVideoRenderer video_renderer; |
| 489 | 489 |
| 490 SkBitmap bitmap; | 490 SkBitmap bitmap; |
| 491 bitmap.allocPixels(SkImageInfo::Make(video_frame->visible_rect().width(), | 491 bitmap.allocPixels(SkImageInfo::Make(video_frame->visible_rect().width(), |
| 492 video_frame->visible_rect().height(), | 492 video_frame->visible_rect().height(), |
| 493 kPMColor_SkColorType, | 493 kPMColor_SkColorType, |
| 494 kPremul_SkAlphaType)); | 494 kPremul_SkAlphaType)); |
| 495 bitmap.allocPixels(); | 495 bitmap.allocPixels(); |
|
reed1
2014/06/06 15:46:30
While we're editing this file... I see there are t
danakj
2014/06/06 15:47:21
Well that's strange, haha.
danakj
2014/06/06 17:21:08
Done.
| |
| 496 bitmap.eraseColor(SK_ColorTRANSPARENT); | |
| 496 SkCanvas canvas(bitmap); | 497 SkCanvas canvas(bitmap); |
| 497 | 498 |
| 498 video_renderer.Paint(video_frame.get(), | 499 video_renderer.Paint(video_frame.get(), |
| 499 &canvas, | 500 &canvas, |
| 500 video_frame->visible_rect(), | 501 video_frame->visible_rect(), |
| 501 0xff); | 502 0xff); |
| 502 | 503 |
| 503 CopyFromCompositingSurfaceCallback(quit_callback, | 504 CopyFromCompositingSurfaceCallback(quit_callback, |
| 504 result, | 505 result, |
| 505 bitmap); | 506 bitmap); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 857 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 858 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
| 858 testing::ValuesIn(kAllCompositingModes)); | 859 testing::ValuesIn(kAllCompositingModes)); |
| 859 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 860 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
| 860 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 861 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
| 861 testing::ValuesIn(kAllCompositingModes)); | 862 testing::ValuesIn(kAllCompositingModes)); |
| 862 | 863 |
| 863 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 864 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
| 864 | 865 |
| 865 } // namespace | 866 } // namespace |
| 866 } // namespace content | 867 } // namespace content |
| OLD | NEW |