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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 505473002: cc: Small cleanup to use an existing function instead of tilings search (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 0ec80686b8dc87069fd123bd1cb5cffb7084c3ef..7e12ac4eec8c2a5cb361ffbd03c4ccc790faf749 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -603,11 +603,7 @@ const PictureLayerTiling* PictureLayerImpl::GetTwinTiling(
const PictureLayerTiling* tiling) const {
if (!twin_layer_)
return NULL;
- for (size_t i = 0; i < twin_layer_->tilings_->num_tilings(); ++i)
- if (twin_layer_->tilings_->tiling_at(i)->contents_scale() ==
- tiling->contents_scale())
- return twin_layer_->tilings_->tiling_at(i);
- return NULL;
+ return twin_layer_->tilings_->TilingAtScale(tiling->contents_scale());
}
size_t PictureLayerImpl::GetMaxTilesForInterestArea() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698