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

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: rectfconvert-cc: rebase-and-sandwich-strategy 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
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_candidate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 RenderPass* root_pass; 1734 RenderPass* root_pass;
1735 1735
1736 gfx::Transform transform_preventing_aa; 1736 gfx::Transform transform_preventing_aa;
1737 transform_preventing_aa.ApplyPerspectiveDepth(40.0); 1737 transform_preventing_aa.ApplyPerspectiveDepth(40.0);
1738 transform_preventing_aa.RotateAboutYAxis(-20.0); 1738 transform_preventing_aa.RotateAboutYAxis(-20.0);
1739 transform_preventing_aa.Scale(30.0, 1.0); 1739 transform_preventing_aa.Scale(30.0, 1.0);
1740 1740
1741 // Verify that the test transform and test rect actually do cause the clipped 1741 // Verify that the test transform and test rect actually do cause the clipped
1742 // flag to trigger. Otherwise we are not testing the intended scenario. 1742 // flag to trigger. Otherwise we are not testing the intended scenario.
1743 bool clipped = false; 1743 bool clipped = false;
1744 MathUtil::MapQuad(transform_preventing_aa, gfx::QuadF(child_rect), &clipped); 1744 MathUtil::MapQuad(transform_preventing_aa, gfx::QuadF(gfx::RectF(child_rect)),
1745 &clipped);
1745 ASSERT_TRUE(clipped); 1746 ASSERT_TRUE(clipped);
1746 1747
1747 child_pass = AddRenderPass(&render_passes_in_draw_order_, 1748 child_pass = AddRenderPass(&render_passes_in_draw_order_,
1748 child_pass_id, 1749 child_pass_id,
1749 child_rect, 1750 child_rect,
1750 transform_preventing_aa); 1751 transform_preventing_aa);
1751 1752
1752 root_pass = AddRenderPass(&render_passes_in_draw_order_, 1753 root_pass = AddRenderPass(&render_passes_in_draw_order_,
1753 root_pass_id, 1754 root_pass_id,
1754 viewport_rect, 1755 viewport_rect,
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 EXPECT_CALL(overlay_scheduler, 2226 EXPECT_CALL(overlay_scheduler,
2226 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2227 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2227 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2228 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2228 2229
2229 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2230 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2230 viewport_rect, false); 2231 viewport_rect, false);
2231 } 2232 }
2232 2233
2233 } // namespace 2234 } // namespace
2234 } // namespace cc 2235 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_candidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698