Chromium Code Reviews| 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; |