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