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

Unified Diff: cc/float_quad_unittest.cc

Issue 12472028: Part 1 of cc/ directory shuffles: base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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: cc/float_quad_unittest.cc
diff --git a/cc/float_quad_unittest.cc b/cc/float_quad_unittest.cc
deleted file mode 100644
index a13c582cb633a7862ae6c3d008808487918c10ef..0000000000000000000000000000000000000000
--- a/cc/float_quad_unittest.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/math_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gfx/rect_f.h"
-#include "ui/gfx/quad_f.h"
-#include "ui/gfx/transform.h"
-
-namespace cc {
-namespace {
-
-// TODO(danakj) Move this test to ui/gfx/ when we don't need MathUtil::mapQuad.
-TEST(FloatQuadTest, IsRectilinearTest)
-{
- const int numRectilinear = 8;
- gfx::Transform 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, 0.00001);
- rectilinearTrans[6].Rotate(180);
- rectilinearTrans[7].Scale(100000, 100000);
- rectilinearTrans[7].Rotate(180);
-
- for (int i = 0; i < numRectilinear; ++i) {
- bool clipped = false;
- gfx::QuadF quad = MathUtil::mapQuad(rectilinearTrans[i], gfx::QuadF(gfx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)), clipped);
- ASSERT_TRUE(!clipped);
- EXPECT_TRUE(quad.IsRectilinear());
- }
-
- const int numNonRectilinear = 10;
- gfx::Transform 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);
-
- for (int i = 0; i < numNonRectilinear; ++i) {
- bool clipped = false;
- gfx::QuadF quad = MathUtil::mapQuad(nonRectilinearTrans[i], gfx::QuadF(gfx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)), clipped);
- ASSERT_TRUE(!clipped);
- EXPECT_FALSE(quad.IsRectilinear());
- }
-}
-
-} // namespace
-} // namespace cc
« cc/cc.gyp ('K') | « cc/fake_web_graphics_context_3d.h ('k') | cc/frame_rate_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698