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

Unified Diff: cc/layer_impl.cc

Issue 11503005: cc: Refactor content scale/bounds into draw properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 48cdec0d6d5b0346cf14f6657f3a9ccc811ce084..598a8a35a347ab28e945e916b51d3f9a8ec025ed 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -673,20 +673,20 @@ bool LayerImpl::transformIsAnimating() const
void LayerImpl::setContentBounds(const gfx::Size& contentBounds)
{
- if (m_contentBounds == contentBounds)
+ if (this->contentBounds() == contentBounds)
return;
- m_contentBounds = contentBounds;
+ m_drawProperties.content_bounds = contentBounds;
noteLayerPropertyChanged();
}
void LayerImpl::setContentsScale(float contentsScaleX, float contentsScaleY)
{
- if (m_contentsScaleX == contentsScaleX && m_contentsScaleY == contentsScaleY)
+ if (this->contentsScaleX() == contentsScaleX && this->contentsScaleY() == contentsScaleY)
return;
- m_contentsScaleX = contentsScaleX;
- m_contentsScaleY = contentsScaleY;
+ m_drawProperties.contents_scale_x = contentsScaleX;
+ m_drawProperties.contents_scale_y = contentsScaleY;
noteLayerPropertyChanged();
}

Powered by Google App Engine
This is Rietveld 408576698