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_->FindTilingWithScaleKey(tile->contents_scale()); | 656 tilings_->FindTilingWithScaleKey(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 SimpleEnclosedRegion PictureLayerImpl::VisibleOpaqueRegion() const { |
| 663 if (use_transformed_rasterization_) |
| 664 return SimpleEnclosedRegion(); |
| 665 return LayerImpl::VisibleOpaqueRegion(); |
| 666 } |
| 667 |
662 void PictureLayerImpl::DidBeginTracing() { | 668 void PictureLayerImpl::DidBeginTracing() { |
663 raster_source_->DidBeginTracing(); | 669 raster_source_->DidBeginTracing(); |
664 } | 670 } |
665 | 671 |
666 void PictureLayerImpl::ReleaseResources() { | 672 void PictureLayerImpl::ReleaseResources() { |
667 // Recreate tilings with new settings, since some of those might change when | 673 // Recreate tilings with new settings, since some of those might change when |
668 // we release resources. | 674 // we release resources. |
669 tilings_ = nullptr; | 675 tilings_ = nullptr; |
670 ResetRasterScale(); | 676 ResetRasterScale(); |
671 } | 677 } |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 } | 1408 } |
1403 | 1409 |
1404 invalidation_.Union(invalidation); | 1410 invalidation_.Union(invalidation); |
1405 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); | 1411 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); |
1406 SetNeedsPushProperties(); | 1412 SetNeedsPushProperties(); |
1407 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", | 1413 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", |
1408 "Invalidation", invalidation.ToString()); | 1414 "Invalidation", invalidation.ToString()); |
1409 } | 1415 } |
1410 | 1416 |
1411 } // namespace cc | 1417 } // namespace cc |
OLD | NEW |