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

Unified Diff: ui/gfx/transform.h

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
« cc/texture_draw_quad.cc ('K') | « cc/texture_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform.h
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 2be72efd0d7bf91c51409f574ac37f52a9820297..6e69c9df400ce89830f96393ef915dee4da15f0c 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -78,6 +78,15 @@ class UI_EXPORT Transform {
return !(matrix_.getType() & ~SkMatrix44::kTranslate_Mask);
}
+ // Returns trus if the matrix is either a scale and/or translation
+ bool IsPositiveScaleOrTranslation() const {
shawnsingh 2012/12/18 19:11:00 I would like to keep unit testing on gfx::transfor
whunt 2012/12/18 19:48:15 Assigning crbug to Shawn. On 2012/12/18 19:11:00,
+ if (!IsScaleOrTranslation())
+ return false;
+ return matrix_.getDouble(0, 0) > 0.0 &&
+ matrix_.getDouble(1, 1) > 0.0 &&
+ matrix_.getDouble(2, 2) > 0.0;
+ }
+
// Returns true if the matrix is either identity or pure, non-fractional
// translation.
bool IsIdentityOrIntegerTranslation() const;
« cc/texture_draw_quad.cc ('K') | « cc/texture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698