diff options
author | Steve Block <steveblock@google.com> | 2010-02-15 12:23:52 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-16 11:48:32 +0000 |
commit | 8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch) | |
tree | 73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/platform/graphics/skia | |
parent | bf14be70295513b8076f3fa47a268a7e42b2c478 (diff) | |
download | external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2 |
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/platform/graphics/skia')
-rw-r--r-- | WebCore/platform/graphics/skia/GradientSkia.cpp | 2 | ||||
-rw-r--r-- | WebCore/platform/graphics/skia/GraphicsContextSkia.cpp | 33 | ||||
-rw-r--r-- | WebCore/platform/graphics/skia/ImageSkia.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/graphics/skia/PathSkia.cpp | 5 | ||||
-rw-r--r-- | WebCore/platform/graphics/skia/PatternSkia.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/graphics/skia/SkiaFontWin.cpp | 4 |
6 files changed, 14 insertions, 38 deletions
diff --git a/WebCore/platform/graphics/skia/GradientSkia.cpp b/WebCore/platform/graphics/skia/GradientSkia.cpp index 268b17e..7370a49 100644 --- a/WebCore/platform/graphics/skia/GradientSkia.cpp +++ b/WebCore/platform/graphics/skia/GradientSkia.cpp @@ -187,7 +187,7 @@ void Gradient::fill(GraphicsContext* context, const FloatRect& rect) context->fillRect(rect); } -void Gradient::setPlatformGradientSpaceTransform(const TransformationMatrix& matrix) +void Gradient::setPlatformGradientSpaceTransform(const AffineTransform& matrix) { if (m_gradient) m_gradient->setLocalMatrix(m_gradientSpaceTransformation); diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp index bd97ca2..8986685 100644 --- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp +++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp @@ -42,7 +42,6 @@ #include "NativeImageSkia.h" #include "NotImplemented.h" #include "PlatformContextSkia.h" -#include "TransformationMatrix.h" #include "SkBitmap.h" #include "SkBlurDrawLooper.h" @@ -447,13 +446,6 @@ void GraphicsContext::concatCTM(const AffineTransform& affine) platformContext()->canvas()->concat(affine); } -void GraphicsContext::concatCTM(const TransformationMatrix& xform) -{ - if (paintingDisabled()) - return; - platformContext()->canvas()->concat(xform); -} - void GraphicsContext::drawConvexPolygon(size_t numPoints, const FloatPoint* points, bool shouldAntialias) @@ -813,26 +805,15 @@ void GraphicsContext::fillRoundedRect(const IntRect& rect, platformContext()->canvas()->drawPath(path, paint); } -AffineTransform GraphicsContext::getAffineCTM() const -{ - const SkMatrix& m = platformContext()->canvas()->getTotalMatrix(); - 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 -} - -TransformationMatrix GraphicsContext::getCTM() const +AffineTransform GraphicsContext::getCTM() const { const SkMatrix& m = platformContext()->canvas()->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()), + SkScalarToDouble(m.getSkewY()), + SkScalarToDouble(m.getSkewX()), + SkScalarToDouble(m.getScaleY()), + SkScalarToDouble(m.getTranslateX()), + SkScalarToDouble(m.getTranslateY())); } FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect) diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp index 6d8ed22..ba9f824 100644 --- a/WebCore/platform/graphics/skia/ImageSkia.cpp +++ b/WebCore/platform/graphics/skia/ImageSkia.cpp @@ -30,6 +30,7 @@ #include "config.h" +#include "AffineTransform.h" #include "BitmapImage.h" #include "BitmapImageSingleFrameSkia.h" #include "ChromiumBridge.h" @@ -43,7 +44,6 @@ #include "SkiaUtils.h" #include "SkRect.h" #include "SkShader.h" -#include "TransformationMatrix.h" #include "skia/ext/image_operations.h" #include "skia/ext/platform_canvas.h" @@ -300,7 +300,7 @@ PassRefPtr<Image> Image::loadPlatformResource(const char *name) void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect, - const TransformationMatrix& patternTransform, + const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, diff --git a/WebCore/platform/graphics/skia/PathSkia.cpp b/WebCore/platform/graphics/skia/PathSkia.cpp index fe4c3d0..a0d4c79 100644 --- a/WebCore/platform/graphics/skia/PathSkia.cpp +++ b/WebCore/platform/graphics/skia/PathSkia.cpp @@ -220,11 +220,6 @@ void Path::transform(const AffineTransform& xform) m_path->transform(xform); } -void Path::transform(const TransformationMatrix& xform) -{ - m_path->transform(xform); -} - String Path::debugString() const { String result; diff --git a/WebCore/platform/graphics/skia/PatternSkia.cpp b/WebCore/platform/graphics/skia/PatternSkia.cpp index b98825b..bd27b6a 100644 --- a/WebCore/platform/graphics/skia/PatternSkia.cpp +++ b/WebCore/platform/graphics/skia/PatternSkia.cpp @@ -29,9 +29,9 @@ #include "config.h" #include "Pattern.h" +#include "AffineTransform.h" #include "Image.h" #include "NativeImageSkia.h" -#include "TransformationMatrix.h" #include "SkCanvas.h" #include "SkColor.h" @@ -46,7 +46,7 @@ void Pattern::platformDestroy() m_pattern = 0; } -PlatformPatternPtr Pattern::platformPattern(const TransformationMatrix& patternTransform) +PlatformPatternPtr Pattern::platformPattern(const AffineTransform& patternTransform) { if (m_pattern) return m_pattern; diff --git a/WebCore/platform/graphics/skia/SkiaFontWin.cpp b/WebCore/platform/graphics/skia/SkiaFontWin.cpp index f1c5cdc..58fa7d3 100644 --- a/WebCore/platform/graphics/skia/SkiaFontWin.cpp +++ b/WebCore/platform/graphics/skia/SkiaFontWin.cpp @@ -31,13 +31,13 @@ #include "config.h" #include "SkiaFontWin.h" +#include "AffineTransform.h" #include "PlatformContextSkia.h" #include "Gradient.h" #include "Pattern.h" #include "SkCanvas.h" #include "SkPaint.h" #include "SkShader.h" -#include "TransformationMatrix.h" #include <wtf/ListHashSet.h> #include <wtf/Vector.h> @@ -237,7 +237,7 @@ bool windowsCanHandleTextDrawing(GraphicsContext* context) // in using Skia will show you the hinted outlines for the smaller size, // which look weird. All else being equal, it's better to use Windows' text // drawing, so we don't check for zooms. - const TransformationMatrix& matrix = context->getCTM(); + const AffineTransform& matrix = context->getCTM(); if (matrix.b() != 0 || matrix.c() != 0) // Check for skew. return false; |