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

Unified Diff: cc/float_quad_unittest.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/draw_quad_unittest.cc ('k') | cc/gl_renderer.h » ('j') | cc/gl_renderer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/float_quad_unittest.cc
diff --git a/cc/float_quad_unittest.cc b/cc/float_quad_unittest.cc
index 93ebc6028c548d576a8b99f399182a7ef655ab0a..2b5afd620c8017207dffb7b66a3cda3949f11060 100644
--- a/cc/float_quad_unittest.cc
+++ b/cc/float_quad_unittest.cc
@@ -6,27 +6,27 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect_f.h"
#include "ui/gfx/quad_f.h"
-#include <public/WebTransformationMatrix.h>
+#include "ui/gfx/transform.h"
-using WebKit::WebTransformationMatrix;
+using gfx::Transform;
namespace cc {
namespace {
-// TODO(danakj) Move this test to ui/gfx/ when we don't use WebTransformationMatrix.
+// TODO(danakj) Move this test to ui/gfx/ when we don't use Transform.
Ian Vollick 2012/11/21 22:07:09 Could this test move now, then?
shawnsingh 2012/11/23 08:10:45 It still requires gfx::Transform to support someth
TEST(FloatQuadTest, IsRectilinearTest)
{
const int numRectilinear = 8;
- WebTransformationMatrix rectilinearTrans[numRectilinear];
- rectilinearTrans[1].rotate(90);
- rectilinearTrans[2].rotate(180);
- rectilinearTrans[3].rotate(270);
- rectilinearTrans[4].skewX(0.00000000001);
- rectilinearTrans[5].skewY(0.00000000001);
- rectilinearTrans[6].scale(0.00001);
- rectilinearTrans[6].rotate(180);
- rectilinearTrans[7].scale(100000);
- rectilinearTrans[7].rotate(180);
+ Transform rectilinearTrans[numRectilinear];
+ rectilinearTrans[1].PreconcatRotate(90);
+ rectilinearTrans[2].PreconcatRotate(180);
+ rectilinearTrans[3].PreconcatRotate(270);
+ rectilinearTrans[4].PreconcatSkewX(0.00000000001);
+ rectilinearTrans[5].PreconcatSkewY(0.00000000001);
+ rectilinearTrans[6].PreconcatScale(0.00001, 0.00001);
+ rectilinearTrans[6].PreconcatRotate(180);
+ rectilinearTrans[7].PreconcatScale(100000, 100000);
+ rectilinearTrans[7].PreconcatRotate(180);
for (int i = 0; i < numRectilinear; ++i) {
bool clipped = false;
@@ -36,17 +36,17 @@ TEST(FloatQuadTest, IsRectilinearTest)
}
const int numNonRectilinear = 10;
- WebTransformationMatrix nonRectilinearTrans[numNonRectilinear];
- nonRectilinearTrans[0].rotate(359.999);
- nonRectilinearTrans[1].rotate(0.0000001);
- nonRectilinearTrans[2].rotate(89.999999);
- nonRectilinearTrans[3].rotate(90.0000001);
- nonRectilinearTrans[4].rotate(179.999999);
- nonRectilinearTrans[5].rotate(180.0000001);
- nonRectilinearTrans[6].rotate(269.999999);
- nonRectilinearTrans[7].rotate(270.0000001);
- nonRectilinearTrans[8].skewX(0.00001);
- nonRectilinearTrans[9].skewY(0.00001);
+ Transform nonRectilinearTrans[numNonRectilinear];
+ nonRectilinearTrans[0].PreconcatRotate(359.999);
+ nonRectilinearTrans[1].PreconcatRotate(0.0000001);
+ nonRectilinearTrans[2].PreconcatRotate(89.999999);
+ nonRectilinearTrans[3].PreconcatRotate(90.0000001);
+ nonRectilinearTrans[4].PreconcatRotate(179.999999);
+ nonRectilinearTrans[5].PreconcatRotate(180.0000001);
+ nonRectilinearTrans[6].PreconcatRotate(269.999999);
+ nonRectilinearTrans[7].PreconcatRotate(270.0000001);
+ nonRectilinearTrans[8].PreconcatSkewX(0.00001);
+ nonRectilinearTrans[9].PreconcatSkewY(0.00001);
for (int i = 0; i < numNonRectilinear; ++i) {
bool clipped = false;
« no previous file with comments | « cc/draw_quad_unittest.cc ('k') | cc/gl_renderer.h » ('j') | cc/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698