OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkDraw.h" | 8 #include "SkDraw.h" |
9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 // nothing to draw | 1004 // nothing to draw |
1005 if (fRC->isEmpty()) { | 1005 if (fRC->isEmpty()) { |
1006 return; | 1006 return; |
1007 } | 1007 } |
1008 | 1008 |
1009 SkPath* pathPtr = (SkPath*)&origSrcPath; | 1009 SkPath* pathPtr = (SkPath*)&origSrcPath; |
1010 bool doFill = true; | 1010 bool doFill = true; |
1011 SkPath tmpPath; | 1011 SkPath tmpPath; |
1012 SkMatrix tmpMatrix; | 1012 SkMatrix tmpMatrix; |
1013 const SkMatrix* matrix = fMatrix; | 1013 const SkMatrix* matrix = fMatrix; |
| 1014 tmpPath.setIsVolatile(true); |
1014 | 1015 |
1015 if (prePathMatrix) { | 1016 if (prePathMatrix) { |
1016 if (origPaint.getPathEffect() || origPaint.getStyle() != SkPaint::kFill_
Style || | 1017 if (origPaint.getPathEffect() || origPaint.getStyle() != SkPaint::kFill_
Style || |
1017 origPaint.getRasterizer()) { | 1018 origPaint.getRasterizer()) { |
1018 SkPath* result = pathPtr; | 1019 SkPath* result = pathPtr; |
1019 | 1020 |
1020 if (!pathIsMutable) { | 1021 if (!pathIsMutable) { |
1021 result = &tmpPath; | 1022 result = &tmpPath; |
1022 pathIsMutable = true; | 1023 pathIsMutable = true; |
1023 } | 1024 } |
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 mask->fImage = SkMask::AllocImage(size); | 2377 mask->fImage = SkMask::AllocImage(size); |
2377 memset(mask->fImage, 0, mask->computeImageSize()); | 2378 memset(mask->fImage, 0, mask->computeImageSize()); |
2378 } | 2379 } |
2379 | 2380 |
2380 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2381 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2381 draw_into_mask(*mask, devPath, style); | 2382 draw_into_mask(*mask, devPath, style); |
2382 } | 2383 } |
2383 | 2384 |
2384 return true; | 2385 return true; |
2385 } | 2386 } |
OLD | NEW |