| 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 // Make a frame with lots of damage. Then replace it with a frame with | 556 // Make a frame with lots of damage. Then replace it with a frame with |
| 557 // no damage. The entire layer should be damaged, but nothing more. | 557 // no damage. The entire layer should be damaged, but nothing more. |
| 558 SetFrameData( | 558 SetFrameData( |
| 559 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 10, 10))); | 559 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 10, 10))); |
| 560 SetFrameData( | 560 SetFrameData( |
| 561 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 0, 0))); | 561 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(0, 0, 0, 0))); |
| 562 break; | 562 break; |
| 563 case 17: | 563 case 17: |
| 564 // Make another layer that uses the same frame provider. The new layer | 564 // Make another layer that uses the same frame provider. The new layer |
| 565 // should be damaged. | 565 // should be damaged. |
| 566 delegated_copy_ = CreateDelegatedLayer(frame_provider_); | 566 delegated_copy_ = CreateDelegatedLayer(frame_provider_.get()); |
| 567 delegated_copy_->SetPosition(gfx::Point(5, 0)); | 567 delegated_copy_->SetPosition(gfx::Point(5, 0)); |
| 568 | 568 |
| 569 // Also set a new frame. | 569 // Also set a new frame. |
| 570 SetFrameData( | 570 SetFrameData( |
| 571 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(4, 0, 1, 1))); | 571 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(4, 0, 1, 1))); |
| 572 break; | 572 break; |
| 573 case 18: | 573 case 18: |
| 574 // Set another new frame, both layers should be damaged in the same | 574 // Set another new frame, both layers should be damaged in the same |
| 575 // ways. | 575 // ways. |
| 576 SetFrameData( | 576 SetFrameData( |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2192 } | 2192 } |
| 2193 | 2193 |
| 2194 scoped_refptr<DelegatedRendererLayer> delegated_thief_; | 2194 scoped_refptr<DelegatedRendererLayer> delegated_thief_; |
| 2195 }; | 2195 }; |
| 2196 | 2196 |
| 2197 SINGLE_AND_MULTI_THREAD_TEST_F( | 2197 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 2198 LayerTreeHostDelegatedTestRemoveAndChangeResources); | 2198 LayerTreeHostDelegatedTestRemoveAndChangeResources); |
| 2199 | 2199 |
| 2200 } // namespace | 2200 } // namespace |
| 2201 } // namespace cc | 2201 } // namespace cc |
| OLD | NEW |