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

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

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: all tests 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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 1360
1361 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1361 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1362 return !layer_tree_impl()->IsRecycleTree(); 1362 return !layer_tree_impl()->IsRecycleTree();
1363 } 1363 }
1364 1364
1365 bool PictureLayerImpl::HasValidTilePriorities() const { 1365 bool PictureLayerImpl::HasValidTilePriorities() const {
1366 return IsOnActiveOrPendingTree() && 1366 return IsOnActiveOrPendingTree() &&
1367 is_drawn_render_surface_layer_list_member(); 1367 is_drawn_render_surface_layer_list_member();
1368 } 1368 }
1369 1369
1370 void PictureLayerImpl::InvalidateRegionForImages(
1371 const std::unordered_set<ImageId>& images_to_invalidate) {
1372 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages");
1373
1374 InvalidationRegion image_invalidation;
1375 for (auto image_id : images_to_invalidate)
1376 image_invalidation.Union(raster_source_->GetRectForImage(image_id));
1377 Region invalidation;
1378 image_invalidation.Swap(&invalidation);
1379
1380 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
vmpstr 2017/02/13 22:49:30 Hmm, this doesn't capture the duration of the Unio
Khushal 2017/02/14 05:10:22 Done.
1381 "Invalidation", invalidation.ToString());
1382
1383 if (invalidation.IsEmpty())
1384 return;
1385 invalidation_.Union(invalidation);
1386 tilings_->UpdateTilingsForImplSideInvalidation(invalidation);
1387 SetNeedsPushProperties();
1388 }
1389
1370 } // namespace cc 1390 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698