OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 AddDamageRect(layer_damage_rect); | 652 AddDamageRect(layer_damage_rect); |
653 } | 653 } |
654 if (tile->draw_info().NeedsRaster()) { | 654 if (tile->draw_info().NeedsRaster()) { |
655 PictureLayerTiling* tiling = | 655 PictureLayerTiling* tiling = |
656 tilings_->FindTilingWithScale(tile->contents_scale()); | 656 tilings_->FindTilingWithScale(tile->contents_scale()); |
657 if (tiling) | 657 if (tiling) |
658 tiling->set_all_tiles_done(false); | 658 tiling->set_all_tiles_done(false); |
659 } | 659 } |
660 } | 660 } |
661 | 661 |
| 662 void PictureLayerImpl::ForceRecalculateRasterScales() { |
| 663 ResetRasterScale(); |
| 664 } |
| 665 |
662 void PictureLayerImpl::DidBeginTracing() { | 666 void PictureLayerImpl::DidBeginTracing() { |
663 raster_source_->DidBeginTracing(); | 667 raster_source_->DidBeginTracing(); |
664 } | 668 } |
665 | 669 |
666 void PictureLayerImpl::ReleaseResources() { | 670 void PictureLayerImpl::ReleaseResources() { |
667 // Recreate tilings with new settings, since some of those might change when | 671 // Recreate tilings with new settings, since some of those might change when |
668 // we release resources. | 672 // we release resources. |
669 tilings_ = nullptr; | 673 tilings_ = nullptr; |
670 ResetRasterScale(); | 674 ResetRasterScale(); |
671 } | 675 } |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1339 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1336 return !layer_tree_impl()->IsRecycleTree(); | 1340 return !layer_tree_impl()->IsRecycleTree(); |
1337 } | 1341 } |
1338 | 1342 |
1339 bool PictureLayerImpl::HasValidTilePriorities() const { | 1343 bool PictureLayerImpl::HasValidTilePriorities() const { |
1340 return IsOnActiveOrPendingTree() && | 1344 return IsOnActiveOrPendingTree() && |
1341 is_drawn_render_surface_layer_list_member(); | 1345 is_drawn_render_surface_layer_list_member(); |
1342 } | 1346 } |
1343 | 1347 |
1344 } // namespace cc | 1348 } // namespace cc |
OLD | NEW |