Changeset 145442 in webkit
- Timestamp:
- Mar 11, 2013, 5:45:33 PM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
- 2 copied
-
Platform/ChangeLog (modified) (1 diff)
-
Platform/chromium/public/WebLayer.h (modified) (2 diffs)
-
Platform/chromium/public/WebTransformAnimationCurve.h (modified) (2 diffs)
-
Platform/chromium/public/WebTransformOperations.h (modified) (2 diffs)
-
Platform/chromium/public/WebTransformationMatrix.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCore.gypi (modified) (1 diff)
-
WebCore/platform/chromium/support/WebTransformationMatrix.cpp (modified) (10 diffs)
-
WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp (modified) (4 diffs)
-
WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (modified) (2 diffs)
-
WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.cpp (copied) (copied from trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h ) (2 diffs)
-
WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.h (copied) (copied from trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r145279 r145442 1 2013-03-11 James Robinson <jamesr@chromium.org> 2 3 [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs 4 https://bugs.webkit.org/show_bug.cgi?id=111791 5 6 Reviewed by Adrienne Walker. 7 8 This adds SkMatrix44 overrides for animation APIs that deal with matrices and slims the interface 9 down for WebTransformationMatrix to the minimum needed to compile. With this patch, there are no 10 live codepaths that use WebTransformationMatrix but some downstream code still needs a type and a 11 few functions to compile. After the downstream code is patched this type can go away completely. 12 13 * chromium/public/WebLayer.h: 14 (WebKit): 15 (WebLayer): 16 * chromium/public/WebTransformAnimationCurve.h: 17 (WebTransformAnimationCurve): 18 * chromium/public/WebTransformOperations.h: 19 (WebTransformOperations): 20 * chromium/public/WebTransformationMatrix.h: 21 (WebTransformationMatrix): 22 1 23 2013-03-08 Harald Alvestrand <hta@chromium.org> 2 24 -
trunk/Source/Platform/chromium/public/WebLayer.h
r138831 r145442 43 43 class WebFilterOperations; 44 44 class WebLayerScrollClient; 45 class WebTransformationMatrix;46 45 struct WebFloatPoint; 47 46 struct WebFloatRect; … … 95 94 96 95 virtual void setSublayerTransform(const SkMatrix44&) = 0; 97 virtual void setSublayerTransform(const WebTransformationMatrix&) = 0;98 96 virtual SkMatrix44 sublayerTransform() const = 0; 99 97 100 98 virtual void setTransform(const SkMatrix44&) = 0; 101 virtual void setTransform(const WebTransformationMatrix&) = 0;102 99 virtual SkMatrix44 transform() const = 0; 103 100 -
trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h
r138831 r145442 30 30 #include "WebCommon.h" 31 31 #include "WebTransformKeyframe.h" 32 #include "WebTransformationMatrix.h"33 32 34 33 namespace WebKit { … … 45 44 // assumed that x0 = y0 = 0, and x3 = y3 = 1. 46 45 virtual void add(const WebTransformKeyframe&, double x1, double y1, double x2, double y2) = 0; 47 48 virtual WebTransformationMatrix getValue(double time) const = 0;49 50 46 }; 51 47 -
trunk/Source/Platform/chromium/public/WebTransformOperations.h
r140184 r145442 26 26 #define WebTransformOperations_h 27 27 28 #include "WebTransformationMatrix.h" 28 class SkMatrix44; 29 29 30 30 #define WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL 1 … … 46 46 virtual void appendSkew(double x, double y) = 0; 47 47 virtual void appendPerspective(double depth) = 0; 48 virtual void appendMatrix(const WebTransformationMatrix&) = 0;48 virtual void appendMatrix(const SkMatrix44&) = 0; 49 49 virtual void appendIdentity() = 0; 50 50 -
trunk/Source/Platform/chromium/public/WebTransformationMatrix.h
r138825 r145442 48 48 public: 49 49 WEBKIT_EXPORT WebTransformationMatrix(); 50 WEBKIT_EXPORT WebTransformationMatrix(double a, double b, double c, double d, double e, double f);51 WEBKIT_EXPORT WebTransformationMatrix(double m11, double m12, double m13, double m14,52 double m21, double m22, double m23, double m24,53 double m31, double m32, double m33, double m34,54 double m41, double m42, double m43, double m44);55 50 WEBKIT_EXPORT WebTransformationMatrix(const WebTransformationMatrix&); 56 51 ~WebTransformationMatrix() { reset(); } 57 52 58 53 WEBKIT_EXPORT void reset(); 59 60 // Operations that return a separate matrix and do not modify this one.61 WEBKIT_EXPORT WebTransformationMatrix inverse() const;62 WEBKIT_EXPORT WebTransformationMatrix to2dTransform() const;63 64 WEBKIT_EXPORT WebTransformationMatrix& operator=(const WebTransformationMatrix&);65 WEBKIT_EXPORT bool operator==(const WebTransformationMatrix&) const;66 WEBKIT_EXPORT WebTransformationMatrix operator*(const WebTransformationMatrix&) const;67 68 // Operations that modify this matrix69 WEBKIT_EXPORT void multiply(const WebTransformationMatrix&);70 WEBKIT_EXPORT void makeIdentity();71 WEBKIT_EXPORT void translate(double tx, double ty);72 WEBKIT_EXPORT void translate3d(double tx, double ty, double tz);73 WEBKIT_EXPORT void translateRight3d(double tx, double ty, double tz);74 WEBKIT_EXPORT void scale(double s);75 WEBKIT_EXPORT void scaleNonUniform(double sx, double sy);76 WEBKIT_EXPORT void scale3d(double sx, double sy, double sz);77 WEBKIT_EXPORT void rotate(double angle);78 WEBKIT_EXPORT void rotate3d(double rx, double ry, double rz);79 WEBKIT_EXPORT void rotate3d(double x, double y, double z, double angle);80 WEBKIT_EXPORT void skewX(double angle);81 WEBKIT_EXPORT void skewY(double angle);82 WEBKIT_EXPORT void applyPerspective(double p);83 WEBKIT_EXPORT bool blend(const WebTransformationMatrix& from, double progress);84 85 WEBKIT_EXPORT bool hasPerspective() const;86 WEBKIT_EXPORT bool isInvertible() const;87 WEBKIT_EXPORT bool isBackFaceVisible() const;88 WEBKIT_EXPORT bool isIdentity() const;89 WEBKIT_EXPORT bool isIdentityOrTranslation() const;90 WEBKIT_EXPORT bool isIntegerTranslation() const;91 54 92 55 // Accessors -
trunk/Source/WebCore/ChangeLog
r145441 r145442 1 2013-03-11 James Robinson <jamesr@chromium.org> 2 3 [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs 4 https://bugs.webkit.org/show_bug.cgi?id=111791 5 6 Reviewed by Adrienne Walker. 7 8 Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and 9 uses it in AnimationTranslationUtil and GraphicsLayerChromium. 10 11 * WebCore.gypi: 12 * platform/chromium/support/WebTransformationMatrix.cpp: 13 (WebKit::WebTransformationMatrix::WebTransformationMatrix): 14 * platform/graphics/chromium/AnimationTranslationUtil.cpp: 15 (WebCore::toWebTransformOperations): 16 * platform/graphics/chromium/GraphicsLayerChromium.cpp: 17 (WebCore::GraphicsLayerChromium::updateTransform): 18 (WebCore::GraphicsLayerChromium::updateChildrenTransform): 19 * platform/graphics/chromium/TransformSkMatrix44Conversions.cpp: 20 (WebCore::TransformSkMatrix44Conversions::convert): 21 * platform/graphics/chromium/TransformSkMatrix44Conversions.h: 22 (TransformSkMatrix44Conversions): 23 1 24 2013-03-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 25 -
trunk/Source/WebCore/WebCore.gypi
r145411 r145442 4055 4055 'platform/graphics/chromium/ThreadSafeDataTransport.cpp', 4056 4056 'platform/graphics/chromium/ThreadSafeDataTransport.h', 4057 'platform/graphics/chromium/TransformSkMatrix44Conversions.cpp', 4058 'platform/graphics/chromium/TransformSkMatrix44Conversions.h', 4057 4059 'platform/graphics/chromium/TransparencyWin.cpp', 4058 4060 'platform/graphics/chromium/TransparencyWin.h', -
trunk/Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp
r138825 r145442 38 38 } 39 39 40 WebTransformationMatrix::WebTransformationMatrix(double a, double b, double c, double d, double e, double f) 41 : m_private(new TransformationMatrix(a, b, c, d, e, f)) 42 { 43 } 44 45 WebTransformationMatrix::WebTransformationMatrix(double m11, double m12, double m13, double m14, 46 double m21, double m22, double m23, double m24, 47 double m31, double m32, double m33, double m34, 48 double m41, double m42, double m43, double m44) 49 : m_private(new TransformationMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44)) 50 { 51 } 52 53 WebTransformationMatrix::WebTransformationMatrix(const WebTransformationMatrix& t) 54 : m_private(new TransformationMatrix(*t.m_private.get())) 40 WebTransformationMatrix::WebTransformationMatrix(const WebTransformationMatrix& matrix) 41 : m_private(new TransformationMatrix(*matrix.m_private.get())) 55 42 { 56 43 } … … 66 53 } 67 54 68 WebTransformationMatrix& WebTransformationMatrix::operator=(const WebTransformationMatrix& t)69 {70 m_private.reset(new TransformationMatrix(*t.m_private.get()));71 return *this;72 }73 74 bool WebTransformationMatrix::operator==(const WebTransformationMatrix& t) const75 {76 return *m_private.get() == *t.m_private.get();77 }78 79 WebTransformationMatrix WebTransformationMatrix::operator*(const WebTransformationMatrix& t) const80 {81 WebTransformationMatrix result = *this;82 result.multiply(t);83 return result;84 }85 86 WebTransformationMatrix WebTransformationMatrix::inverse() const87 {88 return WebTransformationMatrix(m_private->inverse());89 }90 91 WebTransformationMatrix WebTransformationMatrix::to2dTransform() const92 {93 WebTransformationMatrix result;94 result.m_private.reset(new TransformationMatrix(m_private->to2dTransform()));95 return result;96 }97 98 void WebTransformationMatrix::multiply(const WebTransformationMatrix& t)99 {100 m_private->multiply(*t.m_private.get());101 }102 103 void WebTransformationMatrix::makeIdentity()104 {105 m_private->makeIdentity();106 }107 108 void WebTransformationMatrix::translate(double tx, double ty)109 {110 m_private->translate(tx, ty);111 }112 113 void WebTransformationMatrix::translate3d(double tx, double ty, double tz)114 {115 m_private->translate3d(tx, ty, tz);116 }117 118 void WebTransformationMatrix::translateRight3d(double tx, double ty, double tz)119 {120 m_private->translateRight3d(tx, ty, tz);121 }122 123 void WebTransformationMatrix::scale(double s)124 {125 m_private->scale(s);126 }127 128 void WebTransformationMatrix::scaleNonUniform(double sx, double sy)129 {130 m_private->scaleNonUniform(sx, sy);131 }132 133 void WebTransformationMatrix::scale3d(double sx, double sy, double sz)134 {135 m_private->scale3d(sx, sy, sz);136 }137 138 void WebTransformationMatrix::rotate(double angle)139 {140 m_private->rotate(angle);141 }142 143 void WebTransformationMatrix::rotate3d(double rx, double ry, double rz)144 {145 m_private->rotate3d(rx, ry, rz);146 }147 148 void WebTransformationMatrix::rotate3d(double x, double y, double z, double angle)149 {150 m_private->rotate3d(x, y, z, angle);151 }152 153 void WebTransformationMatrix::skewX(double angle)154 {155 m_private->skewX(angle);156 }157 158 void WebTransformationMatrix::skewY(double angle)159 {160 m_private->skewY(angle);161 }162 163 void WebTransformationMatrix::applyPerspective(double p)164 {165 m_private->applyPerspective(p);166 }167 168 bool WebTransformationMatrix::blend(const WebTransformationMatrix& from, double progress)169 {170 WebCore::TransformationMatrix::DecomposedType dummy;171 if (!m_private->decompose(dummy) || !from.m_private->decompose(dummy))172 return false;173 m_private->blend(*from.m_private.get(), progress);174 return true;175 }176 177 bool WebTransformationMatrix::hasPerspective() const178 {179 return m_private->hasPerspective();180 }181 182 bool WebTransformationMatrix::isInvertible() const183 {184 return m_private->isInvertible();185 }186 187 bool WebTransformationMatrix::isBackFaceVisible() const188 {189 return m_private->isBackFaceVisible();190 }191 192 bool WebTransformationMatrix::isIdentity() const193 {194 return m_private->isIdentity();195 }196 197 bool WebTransformationMatrix::isIdentityOrTranslation() const198 {199 return m_private->isIdentityOrTranslation();200 }201 202 bool WebTransformationMatrix::isIntegerTranslation() const203 {204 return m_private->isIntegerTranslation();205 }206 207 55 double WebTransformationMatrix::m11() const 208 56 { 209 57 return m_private->m11(); 210 }211 212 void WebTransformationMatrix::setM11(double f)213 {214 m_private->setM11(f);215 58 } 216 59 … … 220 63 } 221 64 222 void WebTransformationMatrix::setM12(double f)223 {224 m_private->setM12(f);225 }226 227 65 double WebTransformationMatrix::m13() const 228 66 { 229 67 return m_private->m13(); 230 }231 232 void WebTransformationMatrix::setM13(double f)233 {234 m_private->setM13(f);235 68 } 236 69 … … 240 73 } 241 74 242 void WebTransformationMatrix::setM14(double f)243 {244 m_private->setM14(f);245 }246 247 75 double WebTransformationMatrix::m21() const 248 76 { 249 77 return m_private->m21(); 250 }251 252 void WebTransformationMatrix::setM21(double f)253 {254 m_private->setM21(f);255 78 } 256 79 … … 260 83 } 261 84 262 void WebTransformationMatrix::setM22(double f)263 {264 m_private->setM22(f);265 }266 267 85 double WebTransformationMatrix::m23() const 268 86 { 269 87 return m_private->m23(); 270 }271 272 void WebTransformationMatrix::setM23(double f)273 {274 m_private->setM23(f);275 88 } 276 89 … … 280 93 } 281 94 282 void WebTransformationMatrix::setM24(double f)283 {284 m_private->setM24(f);285 }286 287 95 double WebTransformationMatrix::m31() const 288 96 { 289 97 return m_private->m31(); 290 }291 292 void WebTransformationMatrix::setM31(double f)293 {294 m_private->setM31(f);295 98 } 296 99 … … 300 103 } 301 104 302 void WebTransformationMatrix::setM32(double f)303 {304 m_private->setM32(f);305 }306 307 105 double WebTransformationMatrix::m33() const 308 106 { 309 107 return m_private->m33(); 310 }311 312 void WebTransformationMatrix::setM33(double f)313 {314 m_private->setM33(f);315 108 } 316 109 … … 320 113 } 321 114 322 void WebTransformationMatrix::setM34(double f)323 {324 m_private->setM34(f);325 }326 327 115 double WebTransformationMatrix::m41() const 328 116 { 329 117 return m_private->m41(); 330 }331 332 void WebTransformationMatrix::setM41(double f)333 {334 m_private->setM41(f);335 118 } 336 119 … … 340 123 } 341 124 342 void WebTransformationMatrix::setM42(double f)343 {344 m_private->setM42(f);345 }346 347 125 double WebTransformationMatrix::m43() const 348 126 { 349 127 return m_private->m43(); 350 }351 352 void WebTransformationMatrix::setM43(double f)353 {354 m_private->setM43(f);355 128 } 356 129 … … 360 133 } 361 134 362 void WebTransformationMatrix::setM44(double f)363 {364 m_private->setM44(f);365 }366 367 double WebTransformationMatrix::a() const368 {369 return m_private->a();370 }371 372 void WebTransformationMatrix::setA(double a)373 {374 m_private->setA(a);375 }376 377 double WebTransformationMatrix::b() const378 {379 return m_private->b();380 }381 382 void WebTransformationMatrix::setB(double b)383 {384 m_private->setB(b);385 }386 387 double WebTransformationMatrix::c() const388 {389 return m_private->c();390 }391 392 void WebTransformationMatrix::setC(double c)393 {394 m_private->setC(c);395 }396 397 double WebTransformationMatrix::d() const398 {399 return m_private->d();400 }401 402 void WebTransformationMatrix::setD(double d)403 {404 m_private->setD(d);405 }406 407 double WebTransformationMatrix::e() const408 {409 return m_private->e();410 }411 412 void WebTransformationMatrix::setE(double e)413 {414 m_private->setE(e);415 }416 417 double WebTransformationMatrix::f() const418 {419 return m_private->f();420 }421 422 void WebTransformationMatrix::setF(double f)423 {424 m_private->setF(f);425 }426 427 TransformationMatrix WebTransformationMatrix::toWebCoreTransform() const428 {429 return *m_private.get();430 }431 432 135 } // namespace WebKit -
trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp
r140184 r145442 37 37 #include "RotateTransformOperation.h" 38 38 #include "ScaleTransformOperation.h" 39 #include "SkMatrix44.h" 39 40 #include "SkewTransformOperation.h" 40 41 #include "TransformOperations.h" 42 #include "TransformSkMatrix44Conversions.h" 41 43 #include "TranslateTransformOperation.h" 42 44 … … 48 50 #include <public/WebTransformAnimationCurve.h> 49 51 #include <public/WebTransformOperations.h> 50 #include <public/WebTransformationMatrix.h>51 52 52 53 #include <wtf/OwnPtr.h> … … 103 104 MatrixTransformOperation* transform = static_cast<MatrixTransformOperation*>(transformOperations.operations()[j].get()); 104 105 TransformationMatrix m = transform->matrix(); 105 webTransformOperations->appendMatrix( WebTransformationMatrix(m));106 webTransformOperations->appendMatrix(TransformSkMatrix44Conversions::convert(m)); 106 107 break; 107 108 } … … 109 110 Matrix3DTransformOperation* transform = static_cast<Matrix3DTransformOperation*>(transformOperations.operations()[j].get()); 110 111 TransformationMatrix m = transform->matrix(); 111 webTransformOperations->appendMatrix( WebTransformationMatrix(m));112 webTransformOperations->appendMatrix(TransformSkMatrix44Conversions::convert(m)); 112 113 break; 113 114 } -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
r145131 r145442 60 60 #include "SkiaImageFilterBuilder.h" 61 61 #include "SystemTime.h" 62 #include "TransformSkMatrix44Conversions.h" 62 63 #include <public/Platform.h> 63 64 #include <public/WebAnimation.h> … … 702 703 } 703 704 704 static SkMatrix44 transformToSkMatrix44(const TransformationMatrix& matrix)705 {706 SkMatrix44 ret(SkMatrix44::kUninitialized_Constructor);707 ret.setDouble(0, 0, matrix.m11());708 ret.setDouble(0, 1, matrix.m21());709 ret.setDouble(0, 2, matrix.m31());710 ret.setDouble(0, 3, matrix.m41());711 ret.setDouble(1, 0, matrix.m12());712 ret.setDouble(1, 1, matrix.m22());713 ret.setDouble(1, 2, matrix.m32());714 ret.setDouble(1, 3, matrix.m42());715 ret.setDouble(2, 0, matrix.m13());716 ret.setDouble(2, 1, matrix.m23());717 ret.setDouble(2, 2, matrix.m33());718 ret.setDouble(2, 3, matrix.m43());719 ret.setDouble(3, 0, matrix.m14());720 ret.setDouble(3, 1, matrix.m24());721 ret.setDouble(3, 2, matrix.m34());722 ret.setDouble(3, 3, matrix.m44());723 return ret;724 }725 726 705 void GraphicsLayerChromium::updateTransform() 727 706 { 728 platformLayer()->setTransform( transformToSkMatrix44(m_transform));707 platformLayer()->setTransform(TransformSkMatrix44Conversions::convert(m_transform)); 729 708 } 730 709 731 710 void GraphicsLayerChromium::updateChildrenTransform() 732 711 { 733 platformLayer()->setSublayerTransform( transformToSkMatrix44(m_childrenTransform));712 platformLayer()->setSublayerTransform(TransformSkMatrix44Conversions::convert(m_childrenTransform)); 734 713 } 735 714 -
trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.cpp
r145441 r145442 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 23 23 */ 24 24 25 #ifndef WebTransformAnimationCurve_h 26 #define WebTransformAnimationCurve_h 25 #include "config.h" 27 26 28 #include " WebAnimationCurve.h"27 #include "TransformSkMatrix44Conversions.h" 29 28 30 #include "WebCommon.h" 31 #include "WebTransformKeyframe.h" 32 #include "WebTransformationMatrix.h" 29 #include "TransformationMatrix.h" 33 30 34 namespace Web Kit{31 namespace WebCore { 35 32 36 // A keyframed transform animation curve. 37 class WebTransformAnimationCurve : public WebAnimationCurve { 38 public: 39 virtual ~WebTransformAnimationCurve() { } 33 SkMatrix44 TransformSkMatrix44Conversions::convert(const TransformationMatrix& matrix) 34 { 35 SkMatrix44 ret(SkMatrix44::kUninitialized_Constructor); 36 ret.setDouble(0, 0, matrix.m11()); 37 ret.setDouble(0, 1, matrix.m21()); 38 ret.setDouble(0, 2, matrix.m31()); 39 ret.setDouble(0, 3, matrix.m41()); 40 ret.setDouble(1, 0, matrix.m12()); 41 ret.setDouble(1, 1, matrix.m22()); 42 ret.setDouble(1, 2, matrix.m32()); 43 ret.setDouble(1, 3, matrix.m42()); 44 ret.setDouble(2, 0, matrix.m13()); 45 ret.setDouble(2, 1, matrix.m23()); 46 ret.setDouble(2, 2, matrix.m33()); 47 ret.setDouble(2, 3, matrix.m43()); 48 ret.setDouble(3, 0, matrix.m14()); 49 ret.setDouble(3, 1, matrix.m24()); 50 ret.setDouble(3, 2, matrix.m34()); 51 ret.setDouble(3, 3, matrix.m44()); 52 return ret; 53 } 40 54 41 // Adds the keyframe with the default timing function (ease). 42 virtual void add(const WebTransformKeyframe&) = 0; 43 virtual void add(const WebTransformKeyframe&, TimingFunctionType) = 0; 44 // Adds the keyframe with a custom, bezier timing function. Note, it is 45 // assumed that x0 = y0 = 0, and x3 = y3 = 1. 46 virtual void add(const WebTransformKeyframe&, double x1, double y1, double x2, double y2) = 0; 47 48 virtual WebTransformationMatrix getValue(double time) const = 0; 49 50 }; 51 52 } // namespace WebKit 53 54 #endif // WebTransformAnimationCurve_h 55 } // namespace WebCore -
trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.h
r145441 r145442 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 23 23 */ 24 24 25 #ifndef WebTransformAnimationCurve_h 26 #define WebTransformAnimationCurve_h 25 #include "SkMatrix44.h" 27 26 28 #include "WebAnimationCurve.h" 27 namespace WebCore { 29 28 30 #include "WebCommon.h" 31 #include "WebTransformKeyframe.h" 32 #include "WebTransformationMatrix.h" 29 class TransformationMatrix; 33 30 34 namespace WebKit { 35 36 // A keyframed transform animation curve. 37 class WebTransformAnimationCurve : public WebAnimationCurve { 31 class TransformSkMatrix44Conversions { 38 32 public: 39 virtual ~WebTransformAnimationCurve() { } 40 41 // Adds the keyframe with the default timing function (ease). 42 virtual void add(const WebTransformKeyframe&) = 0; 43 virtual void add(const WebTransformKeyframe&, TimingFunctionType) = 0; 44 // Adds the keyframe with a custom, bezier timing function. Note, it is 45 // assumed that x0 = y0 = 0, and x3 = y3 = 1. 46 virtual void add(const WebTransformKeyframe&, double x1, double y1, double x2, double y2) = 0; 47 48 virtual WebTransformationMatrix getValue(double time) const = 0; 49 33 static SkMatrix44 convert(const TransformationMatrix&); 50 34 }; 51 35 52 } // namespace WebKit 53 54 #endif // WebTransformAnimationCurve_h 36 } // namespace WebCore
Note:
See TracChangeset
for help on using the changeset viewer.