Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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())
vmpstr 2017/02/10 19:25:42 Should we just check if (images_to_invalidate.empt
Khushal 2017/02/10 22:09:19 Good point. That check should be in LayerTreeImpl
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 SetNeedsPushProperties();
1389 }
1390
1372 } // namespace cc 1391 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698