| 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 735 rwhvp->CopyFromCompositingSurface(copy_rect, |
| 736 output_size, | 736 output_size, |
| 737 callback, | 737 callback, |
| 738 false); | 738 SkBitmap::kARGB_8888_Config); |
| 739 } | 739 } |
| 740 run_loop.Run(); | 740 run_loop.Run(); |
| 741 } | 741 } |
| 742 | 742 |
| 743 // 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 |
| 744 // #0ff and the right half with #ff0. | 744 // #0ff and the right half with #ff0. |
| 745 void SetupLeftRightBitmap(const gfx::Size& copy_size, SkBitmap* bitmap) { | 745 void SetupLeftRightBitmap(const gfx::Size& copy_size, SkBitmap* bitmap) { |
| 746 bitmap->setConfig( | 746 bitmap->setConfig( |
| 747 SkBitmap::kARGB_8888_Config, copy_size.width(), copy_size.height()); | 747 SkBitmap::kARGB_8888_Config, copy_size.width(), copy_size.height()); |
| 748 bitmap->allocPixels(); | 748 bitmap->allocPixels(); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 947 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
| 948 testing::ValuesIn(kAllCompositingModes)); | 948 testing::ValuesIn(kAllCompositingModes)); |
| 949 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 949 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
| 950 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 950 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
| 951 testing::ValuesIn(kAllCompositingModes)); | 951 testing::ValuesIn(kAllCompositingModes)); |
| 952 | 952 |
| 953 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 953 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
| 954 | 954 |
| 955 } // namespace | 955 } // namespace |
| 956 } // namespace content | 956 } // namespace content |
| OLD | NEW |