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

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

Issue 1110353003: Fix build warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code;… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | 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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 } 1547 }
1548 } 1548 }
1549 1549
1550 private: 1550 private:
1551 SkPath fTmpDst; 1551 SkPath fTmpDst;
1552 const SkPath& fSrc; 1552 const SkPath& fSrc;
1553 bool fSwapWithSrc; 1553 bool fSwapWithSrc;
1554 }; 1554 };
1555 1555
1556 void SkStroke::strokePath(const SkPath& src, SkPath* dst) const { 1556 void SkStroke::strokePath(const SkPath& src, SkPath* dst) const {
1557 SkASSERT(&src != NULL && dst != NULL); 1557 SkASSERT(dst);
1558 1558
1559 SkScalar radius = SkScalarHalf(fWidth); 1559 SkScalar radius = SkScalarHalf(fWidth);
1560 1560
1561 AutoTmpPath tmp(src, &dst); 1561 AutoTmpPath tmp(src, &dst);
1562 1562
1563 if (radius <= 0) { 1563 if (radius <= 0) {
1564 return; 1564 return;
1565 } 1565 }
1566 1566
1567 // If src is really a rect, call our specialty strokeRect() method 1567 // If src is really a rect, call our specialty strokeRect() method
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 default: 1740 default:
1741 break; 1741 break;
1742 } 1742 }
1743 1743
1744 if (fWidth < SkMinScalar(rw, rh) && !fDoFill) { 1744 if (fWidth < SkMinScalar(rw, rh) && !fDoFill) {
1745 r = rect; 1745 r = rect;
1746 r.inset(radius, radius); 1746 r.inset(radius, radius);
1747 dst->addRect(r, reverse_direction(dir)); 1747 dst->addRect(r, reverse_direction(dir));
1748 } 1748 }
1749 } 1749 }
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698