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

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

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: remove include 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
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/playback/image_hijack_canvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 1373
1374 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1374 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1375 return !layer_tree_impl()->IsRecycleTree(); 1375 return !layer_tree_impl()->IsRecycleTree();
1376 } 1376 }
1377 1377
1378 bool PictureLayerImpl::HasValidTilePriorities() const { 1378 bool PictureLayerImpl::HasValidTilePriorities() const {
1379 return IsOnActiveOrPendingTree() && 1379 return IsOnActiveOrPendingTree() &&
1380 is_drawn_render_surface_layer_list_member(); 1380 is_drawn_render_surface_layer_list_member();
1381 } 1381 }
1382 1382
1383 void PictureLayerImpl::InvalidateRegionForImages(
1384 const ImageIdFlatSet& images_to_invalidate) {
1385 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages");
1386
1387 InvalidationRegion image_invalidation;
1388 for (auto image_id : images_to_invalidate)
1389 image_invalidation.Union(raster_source_->GetRectForImage(image_id));
1390 Region invalidation;
1391 image_invalidation.Swap(&invalidation);
1392
1393 if (invalidation.IsEmpty()) {
1394 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1395 "Invalidation", invalidation.ToString());
1396 return;
1397 }
1398
1399 invalidation_.Union(invalidation);
1400 tilings_->UpdateTilingsForImplSideInvalidation(invalidation);
1401 SetNeedsPushProperties();
1402 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1403 "Invalidation", invalidation.ToString());
1404 }
1405
1383 } // namespace cc 1406 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/playback/image_hijack_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698