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

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

Issue 2857923004: cc: Keep PaintImage in DrawImage. (Closed)
Patch Set: .. Created 3 years, 7 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/paint/discardable_image_map.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 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1456 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1457 return !layer_tree_impl()->IsRecycleTree(); 1457 return !layer_tree_impl()->IsRecycleTree();
1458 } 1458 }
1459 1459
1460 bool PictureLayerImpl::HasValidTilePriorities() const { 1460 bool PictureLayerImpl::HasValidTilePriorities() const {
1461 return IsOnActiveOrPendingTree() && (contributes_to_drawn_render_surface() || 1461 return IsOnActiveOrPendingTree() && (contributes_to_drawn_render_surface() ||
1462 raster_even_if_not_in_rsll()); 1462 raster_even_if_not_in_rsll());
1463 } 1463 }
1464 1464
1465 void PictureLayerImpl::InvalidateRegionForImages( 1465 void PictureLayerImpl::InvalidateRegionForImages(
1466 const ImageIdFlatSet& images_to_invalidate) { 1466 const PaintImageIdFlatSet& images_to_invalidate) {
1467 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages"); 1467 TRACE_EVENT_BEGIN0("cc", "PictureLayerImpl::InvalidateRegionForImages");
1468 1468
1469 InvalidationRegion image_invalidation; 1469 InvalidationRegion image_invalidation;
1470 for (auto image_id : images_to_invalidate) 1470 for (auto image_id : images_to_invalidate)
1471 image_invalidation.Union(raster_source_->GetRectForImage(image_id)); 1471 image_invalidation.Union(raster_source_->GetRectForImage(image_id));
1472 Region invalidation; 1472 Region invalidation;
1473 image_invalidation.Swap(&invalidation); 1473 image_invalidation.Swap(&invalidation);
1474 1474
1475 if (invalidation.IsEmpty()) { 1475 if (invalidation.IsEmpty()) {
1476 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1476 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1477 "Invalidation", invalidation.ToString()); 1477 "Invalidation", invalidation.ToString());
1478 return; 1478 return;
1479 } 1479 }
1480 1480
1481 invalidation_.Union(invalidation); 1481 invalidation_.Union(invalidation);
1482 tilings_->UpdateTilingsForImplSideInvalidation(invalidation); 1482 tilings_->UpdateTilingsForImplSideInvalidation(invalidation);
1483 SetNeedsPushProperties(); 1483 SetNeedsPushProperties();
1484 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages", 1484 TRACE_EVENT_END1("cc", "PictureLayerImpl::InvalidateRegionForImages",
1485 "Invalidation", invalidation.ToString()); 1485 "Invalidation", invalidation.ToString());
1486 } 1486 }
1487 1487
1488 } // namespace cc 1488 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/paint/discardable_image_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698