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

Unified Diff: cc/animation/transform_operations.h

Issue 23043011: cc: Use SkMScalar instead of doubles everywhere in cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: danakj review Created 7 years, 3 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/animation/transform_operation.cc ('k') | cc/animation/transform_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/transform_operations.h
diff --git a/cc/animation/transform_operations.h b/cc/animation/transform_operations.h
index 96bf1d172015938bc48f7932559dd20e11cf5f38..7c509349092b11d0f6b5ac584558ca24bfdc76a9 100644
--- a/cc/animation/transform_operations.h
+++ b/cc/animation/transform_operations.h
@@ -44,7 +44,8 @@ class CC_EXPORT TransformOperations {
// transforms are baked to matrices (using apply), and the matrices are
// then decomposed and interpolated. For more information, see
// http://www.w3.org/TR/2011/WD-css3-2d-transforms-20111215/#matrix-decomposition.
- gfx::Transform Blend(const TransformOperations& from, double progress) const;
+ gfx::Transform Blend(const TransformOperations& from,
+ SkMScalar progress) const;
// Sets |bounds| be the bounding box for the region within which |box| will
// exist when it is transformed by the result of calling Blend on |from| and
@@ -52,8 +53,8 @@ class CC_EXPORT TransformOperations {
// cannot be computed, returns false.
bool BlendedBoundsForBox(const gfx::BoxF& box,
const TransformOperations& from,
- double min_progress,
- double max_progress,
+ SkMScalar min_progress,
+ SkMScalar max_progress,
gfx::BoxF* bounds) const;
// Returns true if this operation and its descendants have the same types
@@ -65,17 +66,18 @@ class CC_EXPORT TransformOperations {
// fails (this can happen if either matrix cannot be decomposed).
bool CanBlendWith(const TransformOperations& other) const;
- void AppendTranslate(double x, double y, double z);
- void AppendRotate(double x, double y, double z, double degrees);
- void AppendScale(double x, double y, double z);
- void AppendSkew(double x, double y);
- void AppendPerspective(double depth);
+ void AppendTranslate(SkMScalar x, SkMScalar y, SkMScalar z);
+ void AppendRotate(SkMScalar x, SkMScalar y, SkMScalar z, SkMScalar degrees);
+ void AppendScale(SkMScalar x, SkMScalar y, SkMScalar z);
+ void AppendSkew(SkMScalar x, SkMScalar y);
+ void AppendPerspective(SkMScalar depth);
void AppendMatrix(const gfx::Transform& matrix);
void AppendIdentity();
bool IsIdentity() const;
private:
- bool BlendInternal(const TransformOperations& from, double progress,
+ bool BlendInternal(const TransformOperations& from,
+ SkMScalar progress,
gfx::Transform* result) const;
std::vector<TransformOperation> operations_;
« no previous file with comments | « cc/animation/transform_operation.cc ('k') | cc/animation/transform_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698