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

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: rebase 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
« no previous file with comments | « cc/layer_impl.h ('k') | cc/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 0c22ccf70556f5fc3951c10c50fee00f4f4c3d59..e1cf9d49fd8695871fa11f6bc3ce5511864c715a 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -29,8 +29,6 @@ LayerImpl::LayerImpl(LayerTreeImpl* treeImpl, int id)
, m_layerTreeImpl(treeImpl)
, m_anchorPoint(0.5, 0.5)
, m_anchorPointZ(0)
- , m_contentsScaleX(1.0)
- , m_contentsScaleY(1.0)
, m_scrollable(false)
, m_shouldScrollOnMainThread(false)
, m_haveWheelEventHandlers(false)
@@ -677,20 +675,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();
}
« no previous file with comments | « cc/layer_impl.h ('k') | cc/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698