Here are gyp targets and stubs for compiling libcc and the webkit_compositor bindings in chromium. Everything is guarded behind the off-by-default use_libcc_for_compositor gyp variable. I haven't included the actual code here, but there are scripts to sync. I plan to land + manually sync the code into place until we're ready to flip the gyp switch.
Snapshot from r126652
BUG=
Review URL: https://chromiumcodereview.appspot.com/10828381
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153354 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/CCLayerQuadTest.cpp b/cc/CCLayerQuadTest.cpp
new file mode 100644
index 0000000..eb4a1f0
--- /dev/null
+++ b/cc/CCLayerQuadTest.cpp
@@ -0,0 +1,45 @@
+// 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 "config.h"
+
+#include "CCLayerQuad.h"
+
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+
+namespace {
+
+TEST(CCLayerQuadTest, FloatQuadConversion)
+{
+ FloatPoint p1(-0.5, -0.5);
+ FloatPoint p2( 0.5, -0.5);
+ FloatPoint p3( 0.5, 0.5);
+ FloatPoint p4(-0.5, 0.5);
+
+ FloatQuad quadCW(p1, p2, p3, p4);
+ CCLayerQuad layerQuadCW(quadCW);
+ EXPECT_TRUE(layerQuadCW.floatQuad() == quadCW);
+
+ FloatQuad quadCCW(p1, p4, p3, p2);
+ CCLayerQuad layerQuadCCW(quadCCW);
+ EXPECT_TRUE(layerQuadCCW.floatQuad() == quadCCW);
+}
+
+TEST(CCLayerQuadTest, Inflate)
+{
+ FloatPoint p1(-0.5, -0.5);
+ FloatPoint p2( 0.5, -0.5);
+ FloatPoint p3( 0.5, 0.5);
+ FloatPoint p4(-0.5, 0.5);
+
+ FloatQuad quad(p1, p2, p3, p4);
+ CCLayerQuad layerQuad(quad);
+ quad.scale(2, 2);
+ layerQuad.inflate(0.5);
+ EXPECT_TRUE(layerQuad.floatQuad() == quad);
+}
+
+} // namespace