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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 SetExcludeRect( | 725 SetExcludeRect( |
726 gfx::Rect(output_size.width() / 2 - 1, 0, 2, output_size.height())); | 726 gfx::Rect(output_size.width() / 2 - 1, 0, 2, output_size.height())); |
727 } | 727 } |
728 #endif | 728 #endif |
729 | 729 |
730 base::Callback<void(bool, const SkBitmap&)> callback = | 730 base::Callback<void(bool, const SkBitmap&)> callback = |
731 base::Bind(&CompositingRenderWidgetHostViewBrowserTestTabCapture:: | 731 base::Bind(&CompositingRenderWidgetHostViewBrowserTestTabCapture:: |
732 CopyFromCompositingSurfaceCallback, | 732 CopyFromCompositingSurfaceCallback, |
733 base::Unretained(this), | 733 base::Unretained(this), |
734 run_loop.QuitClosure()); | 734 run_loop.QuitClosure()); |
735 rwhvp->CopyFromCompositingSurface(copy_rect, output_size, callback); | 735 rwhvp->CopyFromCompositingSurface(copy_rect, |
| 736 output_size, |
| 737 callback, |
| 738 false); |
736 } | 739 } |
737 run_loop.Run(); | 740 run_loop.Run(); |
738 } | 741 } |
739 | 742 |
740 // Sets up |bitmap| to have size |copy_size|. It floods the left half with | 743 // Sets up |bitmap| to have size |copy_size|. It floods the left half with |
741 // #0ff and the right half with #ff0. | 744 // #0ff and the right half with #ff0. |
742 void SetupLeftRightBitmap(const gfx::Size& copy_size, SkBitmap* bitmap) { | 745 void SetupLeftRightBitmap(const gfx::Size& copy_size, SkBitmap* bitmap) { |
743 bitmap->setConfig( | 746 bitmap->setConfig( |
744 SkBitmap::kARGB_8888_Config, copy_size.width(), copy_size.height()); | 747 SkBitmap::kARGB_8888_Config, copy_size.width(), copy_size.height()); |
745 bitmap->allocPixels(); | 748 bitmap->allocPixels(); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 947 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
945 testing::ValuesIn(kAllCompositingModes)); | 948 testing::ValuesIn(kAllCompositingModes)); |
946 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 949 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
947 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 950 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
948 testing::ValuesIn(kAllCompositingModes)); | 951 testing::ValuesIn(kAllCompositingModes)); |
949 | 952 |
950 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 953 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
951 | 954 |
952 } // namespace | 955 } // namespace |
953 } // namespace content | 956 } // namespace content |
OLD | NEW |