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

Side by Side Diff: cc/base/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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/math_util.h" 5 #include "cc/base/math_util.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/gfx/quad_f.h"
7 #include "ui/gfx/rect_f.h" 8 #include "ui/gfx/rect_f.h"
8 #include "ui/gfx/quad_f.h"
9 #include "ui/gfx/transform.h" 9 #include "ui/gfx/transform.h"
10 10
11 namespace cc { 11 namespace cc {
12 namespace { 12 namespace {
13 13
14 // TODO(danakj) Move this test to ui/gfx/ when we don't need MathUtil::mapQuad. 14 // TODO(danakj) Move this test to ui/gfx/ when we don't need MathUtil::mapQuad.
15 TEST(FloatQuadTest, IsRectilinearTest) 15 TEST(FloatQuadTest, IsRectilinearTest)
16 { 16 {
17 const int numRectilinear = 8; 17 const int numRectilinear = 8;
18 gfx::Transform rectilinearTrans[numRectilinear]; 18 gfx::Transform rectilinearTrans[numRectilinear];
(...skipping 30 matching lines...) Expand all
49 for (int i = 0; i < numNonRectilinear; ++i) { 49 for (int i = 0; i < numNonRectilinear; ++i) {
50 bool clipped = false; 50 bool clipped = false;
51 gfx::QuadF quad = MathUtil::mapQuad(nonRectilinearTrans[i], gfx::QuadF(g fx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)), clipped); 51 gfx::QuadF quad = MathUtil::mapQuad(nonRectilinearTrans[i], gfx::QuadF(g fx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)), clipped);
52 ASSERT_TRUE(!clipped); 52 ASSERT_TRUE(!clipped);
53 EXPECT_FALSE(quad.IsRectilinear()); 53 EXPECT_FALSE(quad.IsRectilinear());
54 } 54 }
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 } // namespace cc 58 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/completion_event.h ('k') | cc/base/hash_pair.h » ('j') | cc/cc.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698