aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-16 23:20:39 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-16 23:20:39 +0000
commite344564ae832bcad0d0cb234d6f9e527f7f76b44 (patch)
treebe9dacfddace62fdbad0e722154454109229e499
parentc96e5c2720e03dbcad6cd9eb55073fb2f40e89e3 (diff)
need to apply the prepathmatrix (or perhaps push it on our mv stack)
git-svn-id: http://skia.googlecode.com/svn/trunk@804 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/gpu/SkGpuDevice.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 606d197d24..22d5b20208 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -755,27 +755,18 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath);
bool doFill = true;
SkPath tmpPath;
- SkMatrix tmpMatrix;
- const SkMatrix* matrix = draw.fMatrix;
if (prePathMatrix) {
- if (paint.getPathEffect() || paint.getStyle() != SkPaint::kFill_Style ||
- paint.getRasterizer()) {
- SkPath* result = pathPtr;
+ SkPath* result = pathPtr;
- if (!pathIsMutable) {
- result = &tmpPath;
- pathIsMutable = true;
- }
- pathPtr->transform(*prePathMatrix, result);
- pathPtr = result;
- } else {
- if (!tmpMatrix.setConcat(*matrix, *prePathMatrix)) {
- // overflow
- return;
- }
- matrix = &tmpMatrix;
+ if (!pathIsMutable) {
+ result = &tmpPath;
+ pathIsMutable = true;
}
+ // should I push prePathMatrix on our MV stack temporarily, instead
+ // of applying it here? See SkDraw.cpp
+ pathPtr->transform(*prePathMatrix, result);
+ pathPtr = result;
}
// at this point we're done with prePathMatrix
SkDEBUGCODE(prePathMatrix = (const SkMatrix*)0x50FF8001;)
@@ -792,7 +783,7 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
SkPath* devPathPtr = pathIsMutable ? pathPtr : &tmpPath;
// transform the path into device space
- pathPtr->transform(*matrix, devPathPtr);
+ pathPtr->transform(*draw.fMatrix, devPathPtr);
drawWithMaskFilter(fContext, *devPathPtr, paint.getMaskFilter(),
*draw.fMatrix, *draw.fClip, draw.fBounder, &grPaint);