| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 // no damage. The entire layer should be damaged, but nothing more. | 605 // no damage. The entire layer should be damaged, but nothing more. |
| 606 SetFrameData( | 606 SetFrameData( |
| 607 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 10, 10))); | 607 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 10, 10))); |
| 608 SetFrameData( | 608 SetFrameData( |
| 609 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 0, 0))); | 609 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 0, 0))); |
| 610 break; | 610 break; |
| 611 case 17: | 611 case 17: |
| 612 // Make another layer that uses the same frame provider. The new layer | 612 // Make another layer that uses the same frame provider. The new layer |
| 613 // should be damaged. | 613 // should be damaged. |
| 614 delegated_copy_ = CreateDelegatedLayer(frame_provider_.get()); | 614 delegated_copy_ = CreateDelegatedLayer(frame_provider_.get()); |
| 615 delegated_copy_->SetPosition(gfx::Point(5, 0)); | 615 delegated_copy_->SetPosition(gfx::PointF(5.f, 0.f)); |
| 616 | 616 |
| 617 // Also set a new frame. | 617 // Also set a new frame. |
| 618 SetFrameData( | 618 SetFrameData( |
| 619 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(4, 0, 1, 1))); | 619 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(4, 0, 1, 1))); |
| 620 break; | 620 break; |
| 621 case 18: | 621 case 18: |
| 622 // Set another new frame, both layers should be damaged in the same | 622 // Set another new frame, both layers should be damaged in the same |
| 623 // ways. | 623 // ways. |
| 624 SetFrameData( | 624 SetFrameData( |
| 625 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(3, 3, 1, 1))); | 625 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(3, 3, 1, 1))); |
| (...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2277 } | 2277 } |
| 2278 | 2278 |
| 2279 bool drew_with_pending_tree_; | 2279 bool drew_with_pending_tree_; |
| 2280 }; | 2280 }; |
| 2281 | 2281 |
| 2282 // This test blocks activation which is not supported for single thread mode. | 2282 // This test blocks activation which is not supported for single thread mode. |
| 2283 MULTI_THREAD_BLOCKNOTIFY_TEST_F(LayerTreeHostDelegatedTestActiveFrameIsValid); | 2283 MULTI_THREAD_BLOCKNOTIFY_TEST_F(LayerTreeHostDelegatedTestActiveFrameIsValid); |
| 2284 | 2284 |
| 2285 } // namespace | 2285 } // namespace |
| 2286 } // namespace cc | 2286 } // namespace cc |
| OLD | NEW |