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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1362 | 1362 |
1363 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1363 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1364 return !layer_tree_impl()->IsRecycleTree(); | 1364 return !layer_tree_impl()->IsRecycleTree(); |
1365 } | 1365 } |
1366 | 1366 |
1367 bool PictureLayerImpl::HasValidTilePriorities() const { | 1367 bool PictureLayerImpl::HasValidTilePriorities() const { |
1368 return IsOnActiveOrPendingTree() && | 1368 return IsOnActiveOrPendingTree() && |
1369 is_drawn_render_surface_layer_list_member(); | 1369 is_drawn_render_surface_layer_list_member(); |
1370 } | 1370 } |
1371 | 1371 |
1372 void PictureLayerImpl::InvalidateRegionForImages( | |
1373 const std::unordered_set<ImageId>& images_to_invalidate) { | |
1374 InvalidationRegion image_invalidation; | |
1375 for (auto image_id : images_to_invalidate) { | |
1376 image_invalidation.Union(raster_source_->GetRectForImage(image_id)); | |
1377 } | |
1378 | |
1379 if (image_invalidation.IsEmpty()) | |
1380 return; | |
1381 | |
1382 Region invalidation; | |
1383 image_invalidation.Swap(&invalidation); | |
1384 TRACE_EVENT1("cc", "PictureLayerImpl::InvalidatingForImages", "invalidation", | |
1385 invalidation.ToString()); | |
1386 invalidation_.Union(invalidation); | |
1387 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); | |
1388 layer_tree_impl()->AddLayerShouldPushProperties(this); | |
vmpstr
2017/02/03 23:42:31
SetNeedsPushProperties();
Khushal
2017/02/07 00:25:32
Done.
| |
1389 } | |
1390 | |
1372 } // namespace cc | 1391 } // namespace cc |
OLD | NEW |