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

Side by Side Diff: include/gpu/GrClip.h

Issue 956583002: probable fix for asan bot (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrClip.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 2010 Google Inc. 2 * Copyright 2010 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 #ifndef GrClip_DEFINED 8 #ifndef GrClip_DEFINED
9 #define GrClip_DEFINED 9 #define GrClip_DEFINED
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool operator!=(const GrClip& other) const { 86 bool operator!=(const GrClip& other) const {
87 return !(*this == other); 87 return !(*this == other);
88 } 88 }
89 89
90 const SkClipStack* clipStack() const { 90 const SkClipStack* clipStack() const {
91 SkASSERT(kClipStack_ClipType == fClipType); 91 SkASSERT(kClipStack_ClipType == fClipType);
92 return fClip.fStack; 92 return fClip.fStack;
93 } 93 }
94 94
95 void setClipStack(const SkClipStack* clipStack, const SkIPoint* origin = NUL L) { 95 void setClipStack(const SkClipStack* clipStack, const SkIPoint* origin = NUL L) {
96 this->reset();
96 if (clipStack->isWideOpen()) { 97 if (clipStack->isWideOpen()) {
97 fClipType = kWideOpen_ClipType; 98 fClipType = kWideOpen_ClipType;
98 fOrigin.setZero(); 99 fOrigin.setZero();
99 } else { 100 } else {
100 fClipType = kClipStack_ClipType; 101 fClipType = kClipStack_ClipType;
101 fClip.fStack = SkRef(clipStack); 102 fClip.fStack = SkRef(clipStack);
102 if (origin) { 103 if (origin) {
103 fOrigin = *origin; 104 fOrigin = *origin;
104 } else { 105 } else {
105 fOrigin.setZero(); 106 fOrigin.setZero();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 union Clip { 171 union Clip {
171 const SkClipStack* fStack; 172 const SkClipStack* fStack;
172 SkIRect fIRect; 173 SkIRect fIRect;
173 } fClip; 174 } fClip;
174 175
175 SkIPoint fOrigin; 176 SkIPoint fOrigin;
176 ClipType fClipType; 177 ClipType fClipType;
177 }; 178 };
178 179
179 #endif 180 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698