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

Unified Diff: sky/engine/core/rendering/RenderBox.h

Issue 965013003: Move transforms from RenderLayer to RenderBox. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.h
diff --git a/sky/engine/core/rendering/RenderBox.h b/sky/engine/core/rendering/RenderBox.h
index 0948df5d05e6acf988b7c7d9e31fe2e92451b6b7..f83578c03095947043a6963fc3284e6e3757e507 100644
--- a/sky/engine/core/rendering/RenderBox.h
+++ b/sky/engine/core/rendering/RenderBox.h
@@ -33,6 +33,7 @@ struct LayerPaintingInfo;
struct PaintInfo;
class HitTestingTransformState;
class RenderBlockFlow;
+class TransformationMatrix;
enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorderPadding };
@@ -217,6 +218,10 @@ public:
void updateLayerTransformAfterLayout();
+ // This transform has the transform-origin baked in.
+ TransformationMatrix* transform() const { return m_transform.get(); }
+ bool has3DTransform() const { return m_transform && !m_transform->isAffine(); }
+
LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - paddingRight(); }
LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - paddingBottom(); }
LayoutUnit contentLogicalWidth() const { return contentWidth(); }
@@ -485,6 +490,8 @@ protected:
void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalHeight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight; }
private:
+ void updateTransformationMatrix();
+ void updateTransform(const RenderStyle* oldStyle);
void updateFromStyle();
void updateFilters();
@@ -557,7 +564,9 @@ protected:
// Our overflow information.
OwnPtr<RenderOverflow> m_overflow;
+ // TODO(ojan): Move these two into RenderBoxRareData.
OwnPtr<FilterEffectRenderer> m_filterRenderer;
+ OwnPtr<TransformationMatrix> m_transform;
private:
OwnPtr<RenderLayer> m_layer;
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698