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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 class CompositingRenderWidgetHostViewTabCaptureHighDPI | 870 class CompositingRenderWidgetHostViewTabCaptureHighDPI |
871 : public CompositingRenderWidgetHostViewBrowserTestTabCapture { | 871 : public CompositingRenderWidgetHostViewBrowserTestTabCapture { |
872 public: | 872 public: |
873 CompositingRenderWidgetHostViewTabCaptureHighDPI() : kScale(2.f) {} | 873 CompositingRenderWidgetHostViewTabCaptureHighDPI() : kScale(2.f) {} |
874 | 874 |
875 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE { | 875 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE { |
876 CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUpCommandLine(cmd); | 876 CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUpCommandLine(cmd); |
877 cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor, | 877 cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor, |
878 base::StringPrintf("%f", scale())); | 878 base::StringPrintf("%f", scale())); |
879 #if defined(OS_WIN) | 879 #if defined(OS_WIN) |
880 cmd->AppendSwitchASCII(switches::kHighDPISupport, "1"); | 880 gfx::ForceHighDPISupportForTesting(scale()); |
881 gfx::EnableHighDPISupport(); | 881 gfx::EnableHighDPISupport(); |
882 #endif | 882 #endif |
883 } | 883 } |
884 | 884 |
885 float scale() const { return kScale; } | 885 float scale() const { return kScale; } |
886 | 886 |
887 private: | 887 private: |
888 virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE { | 888 virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE { |
889 PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale()); | 889 PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale()); |
890 return true; | 890 return true; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 944 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
945 testing::ValuesIn(kAllCompositingModes)); | 945 testing::ValuesIn(kAllCompositingModes)); |
946 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 946 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
947 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 947 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
948 testing::ValuesIn(kAllCompositingModes)); | 948 testing::ValuesIn(kAllCompositingModes)); |
949 | 949 |
950 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 950 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
951 | 951 |
952 } // namespace | 952 } // namespace |
953 } // namespace content | 953 } // namespace content |
OLD | NEW |