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) | 249 // A frame might not be available yet. So, wait for it. |
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 | |
255 // available yet. So, wait for it. | |
256 WaitForCopySourceReady(); | 250 WaitForCopySourceReady(); |
257 return true; | 251 return true; |
258 } | 252 } |
259 | 253 |
260 private: | 254 private: |
261 const CompositingMode compositing_mode_; | 255 const CompositingMode compositing_mode_; |
262 | 256 |
263 DISALLOW_COPY_AND_ASSIGN(CompositingRenderWidgetHostViewBrowserTest); | 257 DISALLOW_COPY_AND_ASSIGN(CompositingRenderWidgetHostViewBrowserTest); |
264 }; | 258 }; |
265 | 259 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 CompositingRenderWidgetHostViewBrowserTestTabCapture, | 868 CompositingRenderWidgetHostViewBrowserTestTabCapture, |
875 testing::ValuesIn(kAllCompositingModes)); | 869 testing::ValuesIn(kAllCompositingModes)); |
876 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, | 870 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, |
877 CompositingRenderWidgetHostViewTabCaptureHighDPI, | 871 CompositingRenderWidgetHostViewTabCaptureHighDPI, |
878 testing::ValuesIn(kAllCompositingModes)); | 872 testing::ValuesIn(kAllCompositingModes)); |
879 | 873 |
880 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 874 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
881 | 875 |
882 } // namespace | 876 } // namespace |
883 } // namespace content | 877 } // namespace content |
OLD | NEW |