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 <map> | 5 #include <map> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "cc/resources/picture_pile.h" | 8 #include "cc/resources/picture_pile.h" |
9 #include "cc/test/fake_content_layer_client.h" | 9 #include "cc/test/fake_content_layer_client.h" |
10 #include "cc/test/fake_rendering_stats_instrumentation.h" | 10 #include "cc/test/fake_rendering_stats_instrumentation.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 gfx::Rect tiling_rect() const { return pile_->tiling_rect(); } | 52 gfx::Rect tiling_rect() const { return pile_->tiling_rect(); } |
53 | 53 |
54 bool Update(const Region& invalidation, const gfx::Rect& visible_layer_rect) { | 54 bool Update(const Region& invalidation, const gfx::Rect& visible_layer_rect) { |
55 frame_number_++; | 55 frame_number_++; |
56 return pile_->Update(&client_, | 56 return pile_->Update(&client_, |
57 background_color_, | 57 background_color_, |
58 contents_opaque_, | 58 contents_opaque_, |
59 false, | 59 false, |
| 60 false, |
60 invalidation, | 61 invalidation, |
61 visible_layer_rect, | 62 visible_layer_rect, |
62 frame_number_, | 63 frame_number_, |
63 Picture::RECORD_NORMALLY, | 64 Picture::RECORD_NORMALLY, |
64 &stats_instrumentation_); | 65 &stats_instrumentation_); |
65 } | 66 } |
66 | 67 |
67 bool UpdateWholePile() { return Update(tiling_rect(), tiling_rect()); } | 68 bool UpdateWholePile() { return Update(tiling_rect(), tiling_rect()); } |
68 | 69 |
69 FakeContentLayerClient client_; | 70 FakeContentLayerClient client_; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 Update(gfx::Rect(gfx::Rect(0, 0, 1, 1)), tiling_rect()); | 323 Update(gfx::Rect(gfx::Rect(0, 0, 1, 1)), tiling_rect()); |
323 EXPECT_TRUE(!pile_->recorded_viewport().IsEmpty()); | 324 EXPECT_TRUE(!pile_->recorded_viewport().IsEmpty()); |
324 | 325 |
325 // No invalidation, changing viewport. | 326 // No invalidation, changing viewport. |
326 Update(gfx::Rect(), gfx::Rect(5, 5, 5, 5)); | 327 Update(gfx::Rect(), gfx::Rect(5, 5, 5, 5)); |
327 EXPECT_TRUE(!pile_->recorded_viewport().IsEmpty()); | 328 EXPECT_TRUE(!pile_->recorded_viewport().IsEmpty()); |
328 } | 329 } |
329 | 330 |
330 } // namespace | 331 } // namespace |
331 } // namespace cc | 332 } // namespace cc |
OLD | NEW |