Changeset 91880 in webkit
- Timestamp:
- Jul 27, 2011 4:18:34 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91879 r91880 1 2011-07-27 Levi Weintraub <leviw@chromium.org> 2 3 Switch transform operations to FloatSize 4 https://bugs.webkit.org/show_bug.cgi?id=64301 5 6 Reviewed by Simon Fraser. 7 8 Changing TransformOperation and its progeny to operate on FloatSizes instead of IntSizes. 9 10 * platform/graphics/transforms/IdentityTransformOperation.h: 11 (WebCore::IdentityTransformOperation::apply): 12 * platform/graphics/transforms/Matrix3DTransformOperation.cpp: 13 (WebCore::Matrix3DTransformOperation::blend): 14 * platform/graphics/transforms/Matrix3DTransformOperation.h: 15 (WebCore::Matrix3DTransformOperation::apply): 16 * platform/graphics/transforms/MatrixTransformOperation.cpp: 17 (WebCore::MatrixTransformOperation::blend): 18 * platform/graphics/transforms/MatrixTransformOperation.h: 19 (WebCore::MatrixTransformOperation::apply): 20 * platform/graphics/transforms/PerspectiveTransformOperation.h: 21 (WebCore::PerspectiveTransformOperation::apply): 22 * platform/graphics/transforms/RotateTransformOperation.h: 23 (WebCore::RotateTransformOperation::apply): 24 * platform/graphics/transforms/ScaleTransformOperation.h: 25 (WebCore::ScaleTransformOperation::apply): 26 * platform/graphics/transforms/SkewTransformOperation.h: 27 (WebCore::SkewTransformOperation::apply): 28 * platform/graphics/transforms/TransformOperation.h: 29 * platform/graphics/transforms/TransformOperations.h: 30 (WebCore::TransformOperations::apply): 31 * platform/graphics/transforms/TranslateTransformOperation.h: 32 (WebCore::TranslateTransformOperation::x): 33 (WebCore::TranslateTransformOperation::y): 34 (WebCore::TranslateTransformOperation::z): 35 (WebCore::TranslateTransformOperation::apply): 36 1 37 2011-07-27 Levi Weintraub <leviw@chromium.org> 2 38 -
trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h
r39635 r91880 47 47 } 48 48 49 virtual bool apply(TransformationMatrix&, const IntSize&) const49 virtual bool apply(TransformationMatrix&, const FloatSize&) const 50 50 { 51 51 return false; -
trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp
r46590 r91880 39 39 40 40 // Convert the TransformOperations into matrices 41 IntSize size;41 FloatSize size; 42 42 TransformationMatrix fromT; 43 43 TransformationMatrix toT; -
trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h
r76537 r91880 54 54 } 55 55 56 virtual bool apply(TransformationMatrix& transform, const IntSize&) const56 virtual bool apply(TransformationMatrix& transform, const FloatSize&) const 57 57 { 58 58 transform.multiply(TransformationMatrix(m_matrix)); -
trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp
r46590 r91880 35 35 36 36 // convert the TransformOperations into matrices 37 IntSize size;37 FloatSize size; 38 38 TransformationMatrix fromT; 39 39 TransformationMatrix toT(m_a, m_b, m_c, m_d, m_e, m_f); -
trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h
r76537 r91880 60 60 } 61 61 62 virtual bool apply(TransformationMatrix& transform, const IntSize&) const62 virtual bool apply(TransformationMatrix& transform, const FloatSize&) const 63 63 { 64 64 TransformationMatrix matrix(m_a, m_b, m_c, m_d, m_e, m_f); -
trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h
r76568 r91880 54 54 } 55 55 56 virtual bool apply(TransformationMatrix& transform, const IntSize&) const56 virtual bool apply(TransformationMatrix& transform, const FloatSize&) const 57 57 { 58 58 transform.applyPerspective(m_p.calcFloatValue(1)); -
trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h
r69884 r91880 61 61 } 62 62 63 virtual bool apply(TransformationMatrix& transform, const IntSize& /*borderBoxSize*/) const63 virtual bool apply(TransformationMatrix& transform, const FloatSize& /*borderBoxSize*/) const 64 64 { 65 65 transform.rotate3d(m_x, m_y, m_z, m_angle); -
trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h
r40939 r91880 60 60 } 61 61 62 virtual bool apply(TransformationMatrix& transform, const IntSize&) const62 virtual bool apply(TransformationMatrix& transform, const FloatSize&) const 63 63 { 64 64 transform.scale3d(m_x, m_y, m_z); -
trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h
r69884 r91880 53 53 } 54 54 55 virtual bool apply(TransformationMatrix& transform, const IntSize&) const55 virtual bool apply(TransformationMatrix& transform, const FloatSize&) const 56 56 { 57 57 transform.skew(m_angleX, m_angleY); -
trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h
r40939 r91880 26 26 #define TransformOperation_h 27 27 28 #include "FloatSize.h" 28 29 #include "TransformationMatrix.h" 29 #include "IntSize.h"30 30 #include <wtf/PassRefPtr.h> 31 31 #include <wtf/RefCounted.h> … … 60 60 61 61 // Return true if the borderBoxSize was used in the computation, false otherwise. 62 virtual bool apply(TransformationMatrix&, const IntSize& borderBoxSize) const = 0;62 virtual bool apply(TransformationMatrix&, const FloatSize& borderBoxSize) const = 0; 63 63 64 64 virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) = 0; -
trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h
r76248 r91880 43 43 } 44 44 45 void apply(const IntSize& sz, TransformationMatrix& t) const45 void apply(const FloatSize& sz, TransformationMatrix& t) const 46 46 { 47 47 for (unsigned i = 0; i < m_operations.size(); ++i) -
trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h
r69884 r91880 43 43 } 44 44 45 double x(const IntSize& borderBoxSize) const { return m_x.calcFloatValue(borderBoxSize.width()); }46 double y(const IntSize& borderBoxSize) const { return m_y.calcFloatValue(borderBoxSize.height()); }47 double z(const IntSize&) const { return m_z.calcFloatValue(1); }45 double x(const FloatSize& borderBoxSize) const { return m_x.calcFloatValue(borderBoxSize.width()); } 46 double y(const FloatSize& borderBoxSize) const { return m_y.calcFloatValue(borderBoxSize.height()); } 47 double z(const FloatSize&) const { return m_z.calcFloatValue(1); } 48 48 49 49 Length x() const { return m_x; } … … 65 65 } 66 66 67 virtual bool apply(TransformationMatrix& transform, const IntSize& borderBoxSize) const67 virtual bool apply(TransformationMatrix& transform, const FloatSize& borderBoxSize) const 68 68 { 69 69 transform.translate3d(x(borderBoxSize), y(borderBoxSize), z(borderBoxSize));
Note: See TracChangeset
for help on using the changeset viewer.