Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2113 FROM_HERE, | 2113 FROM_HERE, |
| 2114 base::Bind( | 2114 base::Bind( |
| 2115 &LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor:: | 2115 &LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor:: |
| 2116 CallOnDraw, | 2116 CallOnDraw, |
| 2117 base::Unretained(this))); | 2117 base::Unretained(this))); |
| 2118 } | 2118 } |
| 2119 | 2119 |
| 2120 void CallOnDraw() { | 2120 void CallOnDraw() { |
| 2121 // Synchronous compositor does not draw unless told to do so by the output | 2121 // Synchronous compositor does not draw unless told to do so by the output |
| 2122 // surface. | 2122 // surface. |
| 2123 output_surface()->client()->OnDraw(); | 2123 gfx::Transform identity; |
| 2124 gfx::Rect empty_rect; | |
| 2125 bool resourceless_software_draw = false; | |
| 2126 output_surface()->client()->OnDraw(identity, empty_rect, empty_rect, | |
| 2127 resourceless_software_draw); | |
| 2124 } | 2128 } |
| 2125 }; | 2129 }; |
| 2126 | 2130 |
| 2127 MULTI_THREAD_TEST_F( | 2131 MULTI_THREAD_TEST_F( |
| 2128 LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor); | 2132 LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor); |
| 2129 | 2133 |
| 2130 class LayerTreeHostTestAbortedCommitDoesntStallDisabledVsync | 2134 class LayerTreeHostTestAbortedCommitDoesntStallDisabledVsync |
| 2131 : public LayerTreeHostTestAbortedCommitDoesntStall { | 2135 : public LayerTreeHostTestAbortedCommitDoesntStall { |
| 2132 void InitializeSettings(LayerTreeSettings* settings) override { | 2136 void InitializeSettings(LayerTreeSettings* settings) override { |
| 2133 LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings); | 2137 LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2477 } | 2481 } |
| 2478 return draw_result; | 2482 return draw_result; |
| 2479 } | 2483 } |
| 2480 | 2484 |
| 2481 void SwapBuffersCompleteOnThread(LayerTreeHostImpl* host_impl) override { | 2485 void SwapBuffersCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
| 2482 swap_count_++; | 2486 swap_count_++; |
| 2483 switch (swap_count_) { | 2487 switch (swap_count_) { |
| 2484 case 1: { | 2488 case 1: { |
| 2485 gfx::Transform identity; | 2489 gfx::Transform identity; |
| 2486 gfx::Rect empty_rect; | 2490 gfx::Rect empty_rect; |
| 2491 host_impl->SetExternalTilePriorityConstraints(empty_rect, identity); | |
|
boliu
2015/12/16 01:17:47
Also rewrote this test to not need this, but actua
| |
| 2487 bool resourceless_software_draw = true; | 2492 bool resourceless_software_draw = true; |
| 2488 host_impl->SetExternalDrawConstraints(identity, empty_rect, empty_rect, | 2493 host_impl->SetResourcelessSoftwareDrawForTesting( |
| 2489 empty_rect, identity, | 2494 resourceless_software_draw); |
| 2490 resourceless_software_draw); | |
| 2491 host_impl->SetFullRootLayerDamage(); | 2495 host_impl->SetFullRootLayerDamage(); |
| 2492 host_impl->SetNeedsRedraw(); | 2496 host_impl->SetNeedsRedraw(); |
| 2493 break; | 2497 break; |
| 2494 } | 2498 } |
| 2495 case 2: | 2499 case 2: |
| 2496 EndTest(); | 2500 EndTest(); |
| 2497 break; | 2501 break; |
| 2498 default: | 2502 default: |
| 2499 NOTREACHED(); | 2503 NOTREACHED(); |
| 2500 } | 2504 } |
| (...skipping 4044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6545 EndTest(); | 6549 EndTest(); |
| 6546 } | 6550 } |
| 6547 | 6551 |
| 6548 void AfterTest() override {} | 6552 void AfterTest() override {} |
| 6549 }; | 6553 }; |
| 6550 | 6554 |
| 6551 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6555 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
| 6552 | 6556 |
| 6553 } // namespace | 6557 } // namespace |
| 6554 } // namespace cc | 6558 } // namespace cc |
| OLD | NEW |