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

Side by Side Diff: src/core/SkStroke.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: Init fIsVolatile Created 6 years, 1 month 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
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 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 "SkStrokerPriv.h" 8 #include "SkStrokerPriv.h"
9 #include "SkGeometry.h" 9 #include "SkGeometry.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 fSegmentCount = -1; 373 fSegmentCount = -1;
374 fPrevIsLine = false; 374 fPrevIsLine = false;
375 375
376 // Need some estimate of how large our final result (fOuter) 376 // Need some estimate of how large our final result (fOuter)
377 // and our per-contour temp (fInner) will be, so we don't spend 377 // and our per-contour temp (fInner) will be, so we don't spend
378 // extra time repeatedly growing these arrays. 378 // extra time repeatedly growing these arrays.
379 // 379 //
380 // 3x for result == inner + outer + join (swag) 380 // 3x for result == inner + outer + join (swag)
381 // 1x for inner == 'wag' (worst contour length would be better guess) 381 // 1x for inner == 'wag' (worst contour length would be better guess)
382 fOuter.incReserve(src.countPoints() * 3); 382 fOuter.incReserve(src.countPoints() * 3);
383 fOuter.setIsVolatile(true);
383 fInner.incReserve(src.countPoints()); 384 fInner.incReserve(src.countPoints());
385 fInner.setIsVolatile(true);
384 #if QUAD_STROKE_APPROXIMATION 386 #if QUAD_STROKE_APPROXIMATION
385 #ifdef SK_DEBUG 387 #ifdef SK_DEBUG
386 if (!gDebugStrokerErrorSet) { 388 if (!gDebugStrokerErrorSet) {
387 gDebugStrokerError = error; 389 gDebugStrokerError = error;
388 } 390 }
389 fError = gDebugStrokerError; 391 fError = gDebugStrokerError;
390 #else 392 #else
391 fError = error; 393 fError = error;
392 #endif 394 #endif
393 fRecursionDepth = 0; 395 fRecursionDepth = 0;
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 default: 1586 default:
1585 break; 1587 break;
1586 } 1588 }
1587 1589
1588 if (fWidth < SkMinScalar(rw, rh) && !fDoFill) { 1590 if (fWidth < SkMinScalar(rw, rh) && !fDoFill) {
1589 r = rect; 1591 r = rect;
1590 r.inset(radius, radius); 1592 r.inset(radius, radius);
1591 dst->addRect(r, reverse_direction(dir)); 1593 dst->addRect(r, reverse_direction(dir));
1592 } 1594 }
1593 } 1595 }
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698