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

Side by Side Diff: src/gpu/GrShape.cpp

Issue 1953473002: Fix ASAN errors. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 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 | « no previous file | src/gpu/GrStyle.h » ('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 2016 Google Inc. 2 * Copyright 2016 Google Inc.
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 "GrShape.h" 8 #include "GrShape.h"
9 9
10 GrShape& GrShape::operator=(const GrShape& that) { 10 GrShape& GrShape::operator=(const GrShape& that) {
(...skipping 14 matching lines...) Expand all
25 break; 25 break;
26 case Type::kPath: 26 case Type::kPath:
27 if (wasPath) { 27 if (wasPath) {
28 *fPath.get() = *that.fPath.get(); 28 *fPath.get() = *that.fPath.get();
29 } else { 29 } else {
30 fPath.set(*that.fPath.get()); 30 fPath.set(*that.fPath.get());
31 } 31 }
32 break; 32 break;
33 } 33 }
34 fInheritedKey.reset(that.fInheritedKey.count()); 34 fInheritedKey.reset(that.fInheritedKey.count());
35 memcpy(fInheritedKey.get(), that.fInheritedKey.get(), 35 sk_careful_memcpy(fInheritedKey.get(), that.fInheritedKey.get(),
36 sizeof(uint32_t) * fInheritedKey.count()); 36 sizeof(uint32_t) * fInheritedKey.count());
37 return *this; 37 return *this;
38 } 38 }
39 39
40 int GrShape::unstyledKeySize() const { 40 int GrShape::unstyledKeySize() const {
41 if (fInheritedKey.count()) { 41 if (fInheritedKey.count()) {
42 return fInheritedKey.count(); 42 return fInheritedKey.count();
43 } 43 }
44 switch (fType) { 44 switch (fType) {
45 case Type::kEmpty: 45 case Type::kEmpty:
46 return 1; 46 return 1;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 srcForStrokeRec = tmpPath.init(); 210 srcForStrokeRec = tmpPath.init();
211 parent.asPath(tmpPath.get()); 211 parent.asPath(tmpPath.get());
212 } 212 }
213 SkASSERT(parent.fStyle.strokeRec().needToApply()); 213 SkASSERT(parent.fStyle.strokeRec().needToApply());
214 SkAssertResult(parent.fStyle.strokeRec().applyToPath(fPath.get(), *srcFo rStrokeRec)); 214 SkAssertResult(parent.fStyle.strokeRec().applyToPath(fPath.get(), *srcFo rStrokeRec));
215 fStyle.resetToInitStyle(SkStrokeRec::kFill_InitStyle); 215 fStyle.resetToInitStyle(SkStrokeRec::kFill_InitStyle);
216 } 216 }
217 this->attemptToReduceFromPath(); 217 this->attemptToReduceFromPath();
218 this->setInheritedKey(*parentForKey, apply); 218 this->setInheritedKey(*parentForKey, apply);
219 } 219 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698