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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 content::DOMMessageQueue message_queue; | 239 content::DOMMessageQueue message_queue; |
240 NavigateToURL(shell(), TestUrl()); | 240 NavigateToURL(shell(), TestUrl()); |
241 if (wait_message != NULL) { | 241 if (wait_message != NULL) { |
242 std::string result(wait_message); | 242 std::string result(wait_message); |
243 if (!message_queue.WaitForMessage(&result)) { | 243 if (!message_queue.WaitForMessage(&result)) { |
244 EXPECT_TRUE(false) << "WaitForMessage " << result << " failed."; | 244 EXPECT_TRUE(false) << "WaitForMessage " << result << " failed."; |
245 return false; | 245 return false; |
246 } | 246 } |
247 } | 247 } |
248 | 248 |
249 #if !defined(USE_AURA) | |
250 if (!GetRenderWidgetHost()->is_accelerated_compositing_active()) | |
251 return false; // Renderer did not turn on accelerated compositing. | |
252 #endif | |
253 | |
254 // Using accelerated compositing, but a compositing surface might not be | 249 // Using accelerated compositing, but a compositing surface might not be |
danakj
2014/05/12 17:37:58
Update this comment?
piman
2014/05/13 20:25:40
Done.
| |
255 // available yet. So, wait for it. | 250 // available yet. So, wait for it. |
256 WaitForCopySourceReady(); | 251 WaitForCopySourceReady(); |
257 return true; | 252 return true; |
258 } | 253 } |
259 | 254 |
260 private: | 255 private: |
261 const CompositingMode compositing_mode_; | 256 const CompositingMode compositing_mode_; |
262 | 257 |
263 DISALLOW_COPY_AND_ASSIGN(CompositingRenderWidgetHostViewBrowserTest); | 258 DISALLOW_COPY_AND_ASSIGN(CompositingRenderWidgetHostViewBrowserTest); |
264 }; | 259 }; |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
874 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 869 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
875 testing::ValuesIn(kAllCompositingModes)); | 870 testing::ValuesIn(kAllCompositingModes)); |
876 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 871 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
877 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 872 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
878 testing::ValuesIn(kAllCompositingModes)); | 873 testing::ValuesIn(kAllCompositingModes)); |
879 | 874 |
880 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 875 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
881 | 876 |
882 } // namespace | 877 } // namespace |
883 } // namespace content | 878 } // namespace content |
OLD | NEW |