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

Unified Diff: cc/render_pass_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: Rebased to tip of tree and addressed feedback 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
Index: cc/render_pass_unittest.cc
diff --git a/cc/render_pass_unittest.cc b/cc/render_pass_unittest.cc
index f18f0f1823da3a528b556fdb1561d76101a75b90..13c58ca38923d5a0f899077562d21e5c30d2c9d1 100644
--- a/cc/render_pass_unittest.cc
+++ b/cc/render_pass_unittest.cc
@@ -4,17 +4,19 @@
#include "cc/render_pass.h"
+#include <public/WebFilterOperations.h>
+
#include "cc/checkerboard_draw_quad.h"
+#include "cc/math_util.h"
#include "cc/test/geometry_test_utils.h"
#include "cc/test/render_pass_test_common.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/effects/SkBlurImageFilter.h"
-#include <public/WebFilterOperations.h>
-#include <public/WebTransformationMatrix.h>
+#include "ui/gfx/transform.h"
using WebKit::WebFilterOperation;
using WebKit::WebFilterOperations;
-using WebKit::WebTransformationMatrix;
+using gfx::Transform;
using WebKitTests::TestRenderPass;
namespace cc {
@@ -25,7 +27,7 @@ struct RenderPassSize {
RenderPass::Id m_id;
QuadList m_quadList;
SharedQuadStateList m_sharedQuadStateList;
- WebKit::WebTransformationMatrix m_transformToRootTarget;
+ gfx::Transform m_transformToRootTarget;
gfx::Rect m_outputRect;
gfx::RectF m_damageRect;
bool m_hasTransparentBackground;
@@ -39,7 +41,7 @@ TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads)
{
RenderPass::Id id(3, 2);
gfx::Rect outputRect(45, 22, 120, 13);
- WebTransformationMatrix transformToRoot(1, 0.5, 0.5, -0.5, -1, 0);
+ Transform transformToRoot = MathUtil::createGfxTransform(1, 0.5, 0.5, -0.5, -1, 0);
gfx::Rect damageRect(56, 123, 19, 43);
bool hasTransparentBackground = true;
bool hasOcclusionFromOutsideTargetSurface = true;
@@ -63,7 +65,7 @@ TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads)
// Stick a quad in the pass, this should not get copied.
scoped_ptr<SharedQuadState> sharedState = SharedQuadState::Create();
- sharedState->SetAll(WebTransformationMatrix(), gfx::Rect(), gfx::Rect(), gfx::Rect(), false, 1);
+ sharedState->SetAll(Transform(), gfx::Rect(), gfx::Rect(), gfx::Rect(), false, 1);
pass->AppendSharedQuadState(sharedState.Pass());
scoped_ptr<CheckerboardDrawQuad> checkerboardQuad = CheckerboardDrawQuad::Create();

Powered by Google App Engine
This is Rietveld 408576698