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

Unified Diff: cc/resources/picture_layer_tiling_set.cc

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_layer_tiling_set_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling_set.cc
diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc
index 1806ebc01c06b61ecdd318e2b7b1bdf793558c3b..96b47a66963e2cd6fbd985bd1a4ef6bd0d933975 100644
--- a/cc/resources/picture_layer_tiling_set.cc
+++ b/cc/resources/picture_layer_tiling_set.cc
@@ -19,12 +19,8 @@ class LargestToSmallestScaleFunctor {
} // namespace
-
-PictureLayerTilingSet::PictureLayerTilingSet(
- PictureLayerTilingClient* client,
- const gfx::Size& layer_bounds)
- : client_(client),
- layer_bounds_(layer_bounds) {
+PictureLayerTilingSet::PictureLayerTilingSet(PictureLayerTilingClient* client)
+ : client_(client) {
}
PictureLayerTilingSet::~PictureLayerTilingSet() {
@@ -47,7 +43,6 @@ bool PictureLayerTilingSet::SyncTilings(const PictureLayerTilingSet& other,
float minimum_contents_scale) {
if (new_layer_bounds.IsEmpty()) {
RemoveAllTilings();
- layer_bounds_ = new_layer_bounds;
return false;
}
@@ -99,17 +94,17 @@ bool PictureLayerTilingSet::SyncTilings(const PictureLayerTilingSet& other,
}
tilings_.sort(LargestToSmallestScaleFunctor());
- layer_bounds_ = new_layer_bounds;
return have_high_res_tiling;
}
-PictureLayerTiling* PictureLayerTilingSet::AddTiling(float contents_scale) {
+PictureLayerTiling* PictureLayerTilingSet::AddTiling(
+ float contents_scale,
+ const gfx::Size& layer_bounds) {
for (size_t i = 0; i < tilings_.size(); ++i)
DCHECK_NE(tilings_[i]->contents_scale(), contents_scale);
- tilings_.push_back(PictureLayerTiling::Create(contents_scale,
- layer_bounds_,
- client_));
+ tilings_.push_back(
+ PictureLayerTiling::Create(contents_scale, layer_bounds, client_));
PictureLayerTiling* appended = tilings_.back();
tilings_.sort(LargestToSmallestScaleFunctor());
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_layer_tiling_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698