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

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

Issue 958843004: Fix for 424682: Draw correct repaint regions instead of a conservative bounding box (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted twin-layer check as it does not solve it Created 5 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') | no next file » | 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 <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // To avoid an edge case after lost context where the tree is up to date but 598 // To avoid an edge case after lost context where the tree is up to date but
599 // the tilings have not been managed, request an update draw properties 599 // the tilings have not been managed, request an update draw properties
600 // to force tilings to get managed. 600 // to force tilings to get managed.
601 layer_tree_impl()->set_needs_update_draw_properties(); 601 layer_tree_impl()->set_needs_update_draw_properties();
602 } 602 }
603 603
604 skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() { 604 skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() {
605 return raster_source_->GetFlattenedPicture(); 605 return raster_source_->GetFlattenedPicture();
606 } 606 }
607 607
608 Region PictureLayerImpl::GetInvalidationRegion() {
609 return invalidation_;
danakj 2015/02/27 21:10:48 you can intersect it here
danakj 2015/02/27 21:25:35 With a comment explaining why you're doing so base
610 }
611
608 scoped_refptr<Tile> PictureLayerImpl::CreateTile( 612 scoped_refptr<Tile> PictureLayerImpl::CreateTile(
609 float contents_scale, 613 float contents_scale,
610 const gfx::Rect& content_rect) { 614 const gfx::Rect& content_rect) {
611 int flags = 0; 615 int flags = 0;
612 616
613 // We don't handle solid color masks, so we shouldn't bother analyzing those. 617 // We don't handle solid color masks, so we shouldn't bother analyzing those.
614 // Otherwise, always analyze to maximize memory savings. 618 // Otherwise, always analyze to maximize memory savings.
615 if (!is_mask_) 619 if (!is_mask_)
616 flags = Tile::USE_PICTURE_ANALYSIS; 620 flags = Tile::USE_PICTURE_ANALYSIS;
617 621
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1223
1220 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1224 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1221 return !layer_tree_impl()->IsRecycleTree(); 1225 return !layer_tree_impl()->IsRecycleTree();
1222 } 1226 }
1223 1227
1224 bool PictureLayerImpl::HasValidTilePriorities() const { 1228 bool PictureLayerImpl::HasValidTilePriorities() const {
1225 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1229 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1226 } 1230 }
1227 1231
1228 } // namespace cc 1232 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698