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

Unified Diff: cc/quads/render_pass_draw_quad.cc

Issue 1647573002: cc cleanup: simplify mask_uv_scale and MaskUVRect(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/render_pass_draw_quad.cc
diff --git a/cc/quads/render_pass_draw_quad.cc b/cc/quads/render_pass_draw_quad.cc
index a0070d6991f059e4bc69108c0e43399ea2bda34e..a34669140483c740314bd5783dfe01015f6e4879 100644
--- a/cc/quads/render_pass_draw_quad.cc
+++ b/cc/quads/render_pass_draw_quad.cc
@@ -73,11 +73,7 @@ void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
}
gfx::RectF RenderPassDrawQuad::MaskUVRect() const {
- gfx::RectF mask_uv_rect((mask_uv_scale.x() * rect.x()) / rect.width(),
- (mask_uv_scale.y() * rect.y()) / rect.height(),
- mask_uv_scale.x(),
- mask_uv_scale.y());
- return mask_uv_rect;
+ return gfx::ScaleRect(gfx::RectF(rect), mask_uv_scale.x(), mask_uv_scale.y());
}
const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast(
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698