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

Unified Diff: cc/texture_draw_quad.cc

Issue 11567034: Changes subtreeShouldRenderToSeparateSurface logic to account for explicit clipping (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: very minor change Created 7 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/layer_tree_host_common_unittest.cc ('k') | cc/texture_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_draw_quad.cc
diff --git a/cc/texture_draw_quad.cc b/cc/texture_draw_quad.cc
index adce50fb648676c5c6c4637da6b047e79e3e2092..f652707f6cd3555803f6c3fdc2fdfe3bdd25451c 100644
--- a/cc/texture_draw_quad.cc
+++ b/cc/texture_draw_quad.cc
@@ -64,18 +64,17 @@ const TextureDrawQuad* TextureDrawQuad::MaterialCast(const DrawQuad* quad) {
bool TextureDrawQuad::PerformClipping() {
// This only occurs if the rect is only scaled and translated (and thus still
// axis aligned).
- if (!quadTransform().IsScaleOrTranslation())
+ if (!quadTransform().IsPositiveScaleOrTranslation())
return false;
// Grab our scale and make sure it's positive.
- float x_scale = quadTransform().matrix().getDouble(0, 0);
- float y_scale = quadTransform().matrix().getDouble(1, 1);
- if (x_scale <= 0.0f || y_scale <= 0.0f)
- return false;
+ float x_scale = static_cast<float>(quadTransform().matrix().getDouble(0, 0));
+ float y_scale = static_cast<float>(quadTransform().matrix().getDouble(1, 1));
// Grab our offset.
- gfx::Vector2dF offset(quadTransform().matrix().getDouble(0, 3),
- quadTransform().matrix().getDouble(1, 3));
+ gfx::Vector2dF offset(
+ static_cast<float>(quadTransform().matrix().getDouble(0, 3)),
+ static_cast<float>(quadTransform().matrix().getDouble(1, 3)));
// Transform the rect by the scale and offset.
gfx::RectF rectF = rect;
« no previous file with comments | « cc/layer_tree_host_common_unittest.cc ('k') | cc/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698