diff options
author | Steve Block <steveblock@google.com> | 2010-02-11 14:59:15 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-16 11:48:33 +0000 |
commit | 5deb7f56f14127415f226e241dbb608d51562d6a (patch) | |
tree | c0bdc1cb7426648dda2efd4f93319363301a841d /WebCore/platform | |
parent | 43396d591529f979331569892250611eb2b2e8a3 (diff) | |
download | external_webkit-5deb7f56f14127415f226e241dbb608d51562d6a.zip external_webkit-5deb7f56f14127415f226e241dbb608d51562d6a.tar.gz external_webkit-5deb7f56f14127415f226e241dbb608d51562d6a.tar.bz2 |
Merge webkit.org at r54731 : Update Android graphics to reflect addition of AffineTransform class
See http://trac.webkit.org/changeset/54503
Change-Id: Ib14c0f2cce4f63aab2e047a1c4725d1e62b059ba
Diffstat (limited to 'WebCore/platform')
4 files changed, 10 insertions, 24 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index 0f8758b..93b7562 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -334,7 +334,7 @@ static void extactShader(SkPaint* paint, Pattern* pat, Gradient* grad) { if (pat) { // platformPattern() returns a cached obj - paint->setShader(pat->platformPattern(TransformationMatrix())); + paint->setShader(pat->platformPattern(AffineTransform())); } else if (grad) { // grad->getShader() returns a cached obj GradientSpreadMethod sm = grad->spreadMethod(); @@ -1033,15 +1033,6 @@ void GraphicsContext::concatCTM(const AffineTransform& affine) GC2Canvas(this)->concat(affine); } -void GraphicsContext::concatCTM(const TransformationMatrix& xform) -{ - if (paintingDisabled()) - return; - -//printf("-------------- GraphicsContext::concatCTM\n"); - GC2Canvas(this)->concat((SkMatrix) xform); -} - /* This is intended to round the rect to device pixels (through the CTM) and then invert the result back into source space, with the hope that when it is drawn (through the matrix), it will land in the "right" place (i.e. @@ -1094,15 +1085,15 @@ void GraphicsContext::setPlatformShouldAntialias(bool useAA) m_data->mState->mUseAA = useAA; } -TransformationMatrix GraphicsContext::getCTM() const +AffineTransform GraphicsContext::getCTM() const { const SkMatrix& m = GC2Canvas(this)->getTotalMatrix(); - return TransformationMatrix(SkScalarToDouble(m.getScaleX()), // a - SkScalarToDouble(m.getSkewY()), // b - SkScalarToDouble(m.getSkewX()), // c - SkScalarToDouble(m.getScaleY()), // d - SkScalarToDouble(m.getTranslateX()), // e - SkScalarToDouble(m.getTranslateY())); // f + return AffineTransform(SkScalarToDouble(m.getScaleX()), // a + SkScalarToDouble(m.getSkewY()), // b + SkScalarToDouble(m.getSkewX()), // c + SkScalarToDouble(m.getScaleY()), // d + SkScalarToDouble(m.getTranslateX()), // e + SkScalarToDouble(m.getTranslateY())); // f } /////////////////////////////////////////////////////////////////////////////// diff --git a/WebCore/platform/graphics/android/ImageAndroid.cpp b/WebCore/platform/graphics/android/ImageAndroid.cpp index 486200d..01fe272 100644 --- a/WebCore/platform/graphics/android/ImageAndroid.cpp +++ b/WebCore/platform/graphics/android/ImageAndroid.cpp @@ -249,7 +249,7 @@ void BitmapImage::setURL(const String& str) /////////////////////////////////////////////////////////////////////////////// void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& srcRect, - const TransformationMatrix& patternTransform, + const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator compositeOp, const FloatRect& destRect) { diff --git a/WebCore/platform/graphics/android/PathAndroid.cpp b/WebCore/platform/graphics/android/PathAndroid.cpp index e20cc26..c1fe8a8 100644 --- a/WebCore/platform/graphics/android/PathAndroid.cpp +++ b/WebCore/platform/graphics/android/PathAndroid.cpp @@ -270,11 +270,6 @@ void Path::transform(const AffineTransform& xform) m_path->transform(xform); } -void Path::transform(const TransformationMatrix& xform) -{ - m_path->transform(xform); -} - #if ENABLE(SVG) String Path::debugString() const { diff --git a/WebCore/platform/graphics/android/PatternAndroid.cpp b/WebCore/platform/graphics/android/PatternAndroid.cpp index c80e0d1..5a3fd8f 100644 --- a/WebCore/platform/graphics/android/PatternAndroid.cpp +++ b/WebCore/platform/graphics/android/PatternAndroid.cpp @@ -46,7 +46,7 @@ void Pattern::platformDestroy() m_pattern = 0; } -SkShader* Pattern::platformPattern(const TransformationMatrix& ) +SkShader* Pattern::platformPattern(const AffineTransform&) { if (m_pattern) return m_pattern; |