Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: src/core/SkDraw.cpp

Issue 677463002: Set temporary paths volatile so we don't cache them. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698