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

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: adding a unit test and renaming adding a unit test and renaming can_clip_self" Created 8 years 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/texture_draw_quad.cc
diff --git a/cc/texture_draw_quad.cc b/cc/texture_draw_quad.cc
index 5ad73b69dc28731925dcf31518cd61148feedc72..f5788d84dddb5b44dc0c4933f30bb897440cc407 100644
--- a/cc/texture_draw_quad.cc
+++ b/cc/texture_draw_quad.cc
@@ -61,19 +61,17 @@ const TextureDrawQuad* TextureDrawQuad::MaterialCast(
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));
shawnsingh 2012/12/18 19:11:00 don't forget to make these variables double as jam
whunt 2012/12/18 19:48:15 This is a slightly different piece of code than Ja
+ 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));
+ 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;

Powered by Google App Engine
This is Rietveld 408576698