summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-10 18:18:34 +0000
committerSteve Block <steveblock@google.com>2010-02-15 10:54:06 +0000
commit1267f612f1953a309f53dad9bf7cecefbee193b5 (patch)
tree6314ebb619f46b691026e947a76e4b4457e81570 /WebCore/platform
parent39cf4a175628e4fd54a93c2c642df8af6325c148 (diff)
downloadexternal_webkit-1267f612f1953a309f53dad9bf7cecefbee193b5.zip
external_webkit-1267f612f1953a309f53dad9bf7cecefbee193b5.tar.gz
external_webkit-1267f612f1953a309f53dad9bf7cecefbee193b5.tar.bz2
Merge webkit.org at r54340 : Implement new GraphicsContext::concatCTM and Path::transform methods for Android
We copy the Skia implementations See http://trac.webkit.org/changeset/54112 Change-Id: I7575b7fe2690b0eacf4c3da2cc9fd6645d8d2c6f
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp23
-rw-r--r--WebCore/platform/graphics/android/PathAndroid.cpp13
2 files changed, 24 insertions, 12 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index c150ff4..0f8758b 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -24,28 +24,28 @@
*/
#include "config.h"
-#include "Gradient.h"
#include "GraphicsContext.h"
+
+#include "AffineTransform.h"
+#include "Gradient.h"
#include "GraphicsContextPrivate.h"
#include "NotImplemented.h"
#include "Path.h"
#include "Pattern.h"
-
+#include "PlatformGraphicsContext.h"
+#include "SkBitmapRef.h"
#include "SkBlurDrawLooper.h"
#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
#include "SkDashPathEffect.h"
#include "SkDevice.h"
-#include "SkPaint.h"
-#include "PlatformGraphicsContext.h"
-#include "TransformationMatrix.h"
-
-#include "android_graphics.h"
#include "SkGradientShader.h"
-#include "SkBitmapRef.h"
+#include "SkPaint.h"
#include "SkString.h"
#include "SkiaUtils.h"
+#include "TransformationMatrix.h"
+#include "android_graphics.h"
using namespace std;
@@ -1026,6 +1026,13 @@ void GraphicsContext::translate(float x, float y)
GC2Canvas(this)->translate(SkFloatToScalar(x), SkFloatToScalar(y));
}
+void GraphicsContext::concatCTM(const AffineTransform& affine)
+{
+ if (paintingDisabled())
+ return;
+ GC2Canvas(this)->concat(affine);
+}
+
void GraphicsContext::concatCTM(const TransformationMatrix& xform)
{
if (paintingDisabled())
diff --git a/WebCore/platform/graphics/android/PathAndroid.cpp b/WebCore/platform/graphics/android/PathAndroid.cpp
index 4fdda23..e20cc26 100644
--- a/WebCore/platform/graphics/android/PathAndroid.cpp
+++ b/WebCore/platform/graphics/android/PathAndroid.cpp
@@ -25,16 +25,16 @@
#include "config.h"
#include "Path.h"
+
+#include "AffineTransform.h"
#include "FloatRect.h"
#include "GraphicsContext.h"
#include "ImageBuffer.h"
-#include "StrokeStyleApplier.h"
-#include "TransformationMatrix.h"
-
#include "SkPaint.h"
#include "SkPath.h"
#include "SkRegion.h"
-
+#include "StrokeStyleApplier.h"
+#include "TransformationMatrix.h"
#include "android_graphics.h"
namespace WebCore {
@@ -265,6 +265,11 @@ void Path::apply(void* info, PathApplierFunction function) const
}
}
+void Path::transform(const AffineTransform& xform)
+{
+ m_path->transform(xform);
+}
+
void Path::transform(const TransformationMatrix& xform)
{
m_path->transform(xform);