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

Side by Side Diff: cc/output/gl_renderer_unittest.cc

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 RenderPass* root_pass; 1733 RenderPass* root_pass;
1734 1734
1735 gfx::Transform transform_preventing_aa; 1735 gfx::Transform transform_preventing_aa;
1736 transform_preventing_aa.ApplyPerspectiveDepth(40.0); 1736 transform_preventing_aa.ApplyPerspectiveDepth(40.0);
1737 transform_preventing_aa.RotateAboutYAxis(-20.0); 1737 transform_preventing_aa.RotateAboutYAxis(-20.0);
1738 transform_preventing_aa.Scale(30.0, 1.0); 1738 transform_preventing_aa.Scale(30.0, 1.0);
1739 1739
1740 // Verify that the test transform and test rect actually do cause the clipped 1740 // Verify that the test transform and test rect actually do cause the clipped
1741 // flag to trigger. Otherwise we are not testing the intended scenario. 1741 // flag to trigger. Otherwise we are not testing the intended scenario.
1742 bool clipped = false; 1742 bool clipped = false;
1743 MathUtil::MapQuad(transform_preventing_aa, gfx::QuadF(child_rect), &clipped); 1743 MathUtil::MapQuad(transform_preventing_aa, gfx::QuadF(gfx::RectF(child_rect)),
1744 &clipped);
1744 ASSERT_TRUE(clipped); 1745 ASSERT_TRUE(clipped);
1745 1746
1746 child_pass = AddRenderPass(&render_passes_in_draw_order_, 1747 child_pass = AddRenderPass(&render_passes_in_draw_order_,
1747 child_pass_id, 1748 child_pass_id,
1748 child_rect, 1749 child_rect,
1749 transform_preventing_aa); 1750 transform_preventing_aa);
1750 1751
1751 root_pass = AddRenderPass(&render_passes_in_draw_order_, 1752 root_pass = AddRenderPass(&render_passes_in_draw_order_,
1752 root_pass_id, 1753 root_pass_id,
1753 viewport_rect, 1754 viewport_rect,
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 EXPECT_CALL(overlay_scheduler, 2217 EXPECT_CALL(overlay_scheduler,
2217 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2218 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2218 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2219 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2219 2220
2220 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2221 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2221 viewport_rect, false); 2222 viewport_rect, false);
2222 } 2223 }
2223 2224
2224 } // namespace 2225 } // namespace
2225 } // namespace cc 2226 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698