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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 years, 6 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
Index: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index bd1c772ade42f038f5969308e0f4e6f40f99dd54..7a39fe0b2e86b55dfee829f73fd3f8823b07a5a8 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -96,20 +96,6 @@ void WebLayerImpl::removeFromParent() { layer_->RemoveFromParent(); }
void WebLayerImpl::removeAllChildren() { layer_->RemoveAllChildren(); }
-void WebLayerImpl::setAnchorPoint(const WebFloatPoint& anchor_point) {
- layer_->SetAnchorPoint(anchor_point);
-}
-
-WebFloatPoint WebLayerImpl::anchorPoint() const {
- return layer_->anchor_point();
-}
-
-void WebLayerImpl::setAnchorPointZ(float anchor_point_z) {
- layer_->SetAnchorPointZ(anchor_point_z);
-}
-
-float WebLayerImpl::anchorPointZ() const { return layer_->anchor_point_z(); }
-
void WebLayerImpl::setBounds(const WebSize& size) { layer_->SetBounds(size); }
WebSize WebLayerImpl::bounds() const { return layer_->bounds(); }
@@ -166,6 +152,27 @@ void WebLayerImpl::setTransform(const SkMatrix44& matrix) {
layer_->SetTransform(transform);
}
+void WebLayerImpl::setTransformOrigin(const blink::WebFloatPoint3D& point) {
+ gfx::Point3F gfx_point = point;
+ layer_->SetTransformOrigin(gfx_point);
+}
+
+blink::WebFloatPoint3D WebLayerImpl::transformOrigin() const {
+ return layer_->transform_origin();
+}
+
+void WebLayerImpl::setAnchorPoint(const blink::WebFloatPoint&) {}
+
+blink::WebFloatPoint WebLayerImpl::anchorPoint() const {
+ return blink::WebFloatPoint();
+}
+
+void WebLayerImpl::setAnchorPointZ(float) {}
+
+float WebLayerImpl::anchorPointZ() const {
+ return 0.f;
+};
+
SkMatrix44 WebLayerImpl::transform() const {
return layer_->transform().matrix();
}

Powered by Google App Engine
This is Rietveld 408576698