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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp

Issue 2749493003: Revert of Add support for flattening in GeometryMapper. (Closed)
Patch Set: Created 3 years, 9 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: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
index cdda820d20f10f760b776f9342acf6da1008d112..7c44f7b1c2c3b125fd45a24665f38b68954e5cba 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
@@ -276,32 +276,6 @@
*getTransform(transform1.get(), rootPropertyTreeState().transform()));
}
-TEST_F(GeometryMapperTest, NestedTransformsFlattening) {
- TransformationMatrix rotateTransform;
- rotateTransform.rotate3d(45, 0, 0);
- RefPtr<TransformPaintPropertyNode> transform1 =
- TransformPaintPropertyNode::create(rootPropertyTreeState().transform(),
- rotateTransform, FloatPoint3D());
-
- TransformationMatrix inverseRotateTransform;
- inverseRotateTransform.rotate3d(-45, 0, 0);
- RefPtr<TransformPaintPropertyNode> transform2 =
- TransformPaintPropertyNode::create(transform1, inverseRotateTransform,
- FloatPoint3D(),
- true); // Flattens
-
- PropertyTreeState localState = rootPropertyTreeState();
- localState.setTransform(transform2.get());
-
- FloatRect input(0, 0, 100, 100);
- rotateTransform.flattenTo2d();
- TransformationMatrix final = rotateTransform * inverseRotateTransform;
- FloatRect output = final.mapRect(input);
- bool hasRadius = false;
- CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), localState,
- rootPropertyTreeState(), hasRadius);
-}
-
TEST_F(GeometryMapperTest, NestedTransformsScaleAndTranslation) {
TransformationMatrix scaleTransform;
scaleTransform.scale(2);
@@ -845,11 +819,11 @@
EXPECT_EQ(FloatRect(-150, -150, 450, 450), output);
bool hasRadius = false;
- TransformationMatrix combinedTransform =
- transformAboveEffect->matrix() * transformBelowEffect->matrix();
- CHECK_MAPPINGS(input, output, FloatRect(0, 0, 300, 300), combinedTransform,
- FloatClipRect(FloatRect(30, 30, 270, 270)), localState,
- rootPropertyTreeState(), hasRadius);
+ CHECK_MAPPINGS(
+ input, output, FloatRect(0, 0, 300, 300),
+ transformAboveEffect->matrix() * transformBelowEffect->matrix(),
+ FloatClipRect(FloatRect(30, 30, 270, 270)), localState,
+ rootPropertyTreeState(), hasRadius);
}
TEST_F(GeometryMapperTest, ReflectionWithPaintOffset) {

Powered by Google App Engine
This is Rietveld 408576698