| 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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 break; | 582 break; |
| 583 case 19: | 583 case 19: |
| 584 // Set another new frame, both layers should be damaged in the same | 584 // Set another new frame, both layers should be damaged in the same |
| 585 // ways. | 585 // ways. |
| 586 SetFrameData( | 586 SetFrameData( |
| 587 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(3, 3, 1, 1))); | 587 CreateFrameData(gfx::Rect(0, 0, 10, 10), gfx::Rect(3, 3, 1, 1))); |
| 588 } | 588 } |
| 589 first_draw_for_source_frame_ = true; | 589 first_draw_for_source_frame_ = true; |
| 590 } | 590 } |
| 591 | 591 |
| 592 virtual DrawSwapReadbackResult::DrawResult PrepareToDrawOnThread( | 592 virtual DrawResult PrepareToDrawOnThread( |
| 593 LayerTreeHostImpl* host_impl, | 593 LayerTreeHostImpl* host_impl, |
| 594 LayerTreeHostImpl::FrameData* frame, | 594 LayerTreeHostImpl::FrameData* frame, |
| 595 DrawSwapReadbackResult::DrawResult draw_result) OVERRIDE { | 595 DrawResult draw_result) OVERRIDE { |
| 596 EXPECT_EQ(DrawSwapReadbackResult::DRAW_SUCCESS, draw_result); | 596 EXPECT_EQ(DRAW_SUCCESS, draw_result); |
| 597 | 597 |
| 598 if (!first_draw_for_source_frame_) | 598 if (!first_draw_for_source_frame_) |
| 599 return draw_result; | 599 return draw_result; |
| 600 | 600 |
| 601 gfx::Rect damage_rect; | 601 gfx::Rect damage_rect; |
| 602 if (!frame->has_no_damage) { | 602 if (!frame->has_no_damage) { |
| 603 damage_rect = frame->render_passes.back()->damage_rect; | 603 damage_rect = frame->render_passes.back()->damage_rect; |
| 604 } else { | 604 } else { |
| 605 // If there is no damage, then we have no render passes to send. | 605 // If there is no damage, then we have no render passes to send. |
| 606 EXPECT_TRUE(frame->render_passes.empty()); | 606 EXPECT_TRUE(frame->render_passes.empty()); |
| (...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 scoped_refptr<DelegatedRendererLayer> delegated_thief_; | 2197 scoped_refptr<DelegatedRendererLayer> delegated_thief_; |
| 2198 }; | 2198 }; |
| 2199 | 2199 |
| 2200 SINGLE_AND_MULTI_THREAD_TEST_F( | 2200 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 2201 LayerTreeHostDelegatedTestRemoveAndChangeResources); | 2201 LayerTreeHostDelegatedTestRemoveAndChangeResources); |
| 2202 | 2202 |
| 2203 } // namespace | 2203 } // namespace |
| 2204 } // namespace cc | 2204 } // namespace cc |
| OLD | NEW |