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

Side by Side Diff: cc/resources/picture_layer_tiling_set.cc

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_pile_impl.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/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 skewport_extrapolation_limit_in_content_pixels), 49 skewport_extrapolation_limit_in_content_pixels),
50 client_(client) { 50 client_(client) {
51 } 51 }
52 52
53 PictureLayerTilingSet::~PictureLayerTilingSet() { 53 PictureLayerTilingSet::~PictureLayerTilingSet() {
54 } 54 }
55 55
56 void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSource( 56 void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSource(
57 RasterSource* raster_source, 57 RasterSource* raster_source,
58 const PictureLayerTilingSet* twin_set, 58 const PictureLayerTilingSet* twin_set,
59 const gfx::Size& layer_bounds,
60 const Region& layer_invalidation, 59 const Region& layer_invalidation,
61 float minimum_contents_scale) { 60 float minimum_contents_scale) {
62 RemoveTilingsBelowScale(minimum_contents_scale); 61 RemoveTilingsBelowScale(minimum_contents_scale);
63 62
63 gfx::Size layer_bounds = raster_source->GetSize();
64
64 // Copy over tilings that are shared with the |twin_set| tiling set (if it 65 // Copy over tilings that are shared with the |twin_set| tiling set (if it
65 // exists). 66 // exists).
66 if (twin_set) { 67 if (twin_set) {
67 for (PictureLayerTiling* twin_tiling : twin_set->tilings_) { 68 for (PictureLayerTiling* twin_tiling : twin_set->tilings_) {
68 float contents_scale = twin_tiling->contents_scale(); 69 float contents_scale = twin_tiling->contents_scale();
69 DCHECK_GE(contents_scale, minimum_contents_scale); 70 DCHECK_GE(contents_scale, minimum_contents_scale);
70 71
71 PictureLayerTiling* this_tiling = FindTilingWithScale(contents_scale); 72 PictureLayerTiling* this_tiling = FindTilingWithScale(contents_scale);
72 if (!this_tiling) { 73 if (!this_tiling) {
73 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create( 74 scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create(
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 case LOWER_THAN_LOW_RES: 602 case LOWER_THAN_LOW_RES:
602 range = TilingRange(low_res_range.end, tilings_.size()); 603 range = TilingRange(low_res_range.end, tilings_.size());
603 break; 604 break;
604 } 605 }
605 606
606 DCHECK_LE(range.start, range.end); 607 DCHECK_LE(range.start, range.end);
607 return range; 608 return range;
608 } 609 }
609 610
610 } // namespace cc 611 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698