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

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

Issue 1811113004: Store recording invalidations in DisplayListRecordingSource, save them via Update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 9 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/layers/picture_layer_impl_unittest.cc » ('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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 // To avoid an edge case after lost context where the tree is up to date but 641 // To avoid an edge case after lost context where the tree is up to date but
642 // the tilings have not been managed, request an update draw properties 642 // the tilings have not been managed, request an update draw properties
643 // to force tilings to get managed. 643 // to force tilings to get managed.
644 layer_tree_impl()->set_needs_update_draw_properties(); 644 layer_tree_impl()->set_needs_update_draw_properties();
645 } 645 }
646 646
647 skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() { 647 skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() {
648 return raster_source_->GetFlattenedPicture(); 648 return raster_source_->GetFlattenedPicture();
649 } 649 }
650 650
651 Region PictureLayerImpl::GetInvalidationRegion() { 651 Region PictureLayerImpl::GetInvalidationRegionForDebugging() {
652 // |invalidation_| gives the invalidation contained in the source frame, but 652 // |invalidation_| gives the invalidation contained in the source frame, but
653 // is not cleared after drawing from the layer. However, update_rect() is 653 // is not cleared after drawing from the layer. However, update_rect() is
654 // cleared once the invalidation is drawn, which is useful for debugging 654 // cleared once the invalidation is drawn, which is useful for debugging
655 // visualizations. This method intersects the two to give a more exact 655 // visualizations. This method intersects the two to give a more exact
656 // representation of what was invalidated that is cleared after drawing. 656 // representation of what was invalidated that is cleared after drawing.
657 return IntersectRegions(invalidation_, update_rect()); 657 return IntersectRegions(invalidation_, update_rect());
658 } 658 }
659 659
660 ScopedTilePtr PictureLayerImpl::CreateTile(const Tile::CreateInfo& info) { 660 ScopedTilePtr PictureLayerImpl::CreateTile(const Tile::CreateInfo& info) {
661 int flags = 0; 661 int flags = 0;
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 1250
1251 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1251 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1252 return !layer_tree_impl()->IsRecycleTree(); 1252 return !layer_tree_impl()->IsRecycleTree();
1253 } 1253 }
1254 1254
1255 bool PictureLayerImpl::HasValidTilePriorities() const { 1255 bool PictureLayerImpl::HasValidTilePriorities() const {
1256 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1256 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1257 } 1257 }
1258 1258
1259 } // namespace cc 1259 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698