| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (this->clipStack() && other.clipStack()) { | 78 if (this->clipStack() && other.clipStack()) { |
| 79 return *this->clipStack() == *other.clipStack(); | 79 return *this->clipStack() == *other.clipStack(); |
| 80 } else { | 80 } else { |
| 81 return this->clipStack() == other.clipStack(); | 81 return this->clipStack() == other.clipStack(); |
| 82 } | 82 } |
| 83 break; | 83 break; |
| 84 case kIRect_ClipType: | 84 case kIRect_ClipType: |
| 85 return this->irect() == other.irect(); | 85 return this->irect() == other.irect(); |
| 86 break; | 86 break; |
| 87 } | 87 } |
| 88 SkFAIL("This should not occur\n"); |
| 89 return false; |
| 88 } | 90 } |
| 89 | 91 |
| 90 bool operator!=(const GrClip& other) const { | 92 bool operator!=(const GrClip& other) const { |
| 91 return !(*this == other); | 93 return !(*this == other); |
| 92 } | 94 } |
| 93 | 95 |
| 94 const SkClipStack* clipStack() const { | 96 const SkClipStack* clipStack() const { |
| 95 SkASSERT(kClipStack_ClipType == fClipType); | 97 SkASSERT(kClipStack_ClipType == fClipType); |
| 96 return fClip.fStack; | 98 return fClip.fStack; |
| 97 } | 99 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 union Clip { | 176 union Clip { |
| 175 const SkClipStack* fStack; | 177 const SkClipStack* fStack; |
| 176 SkIRect fIRect; | 178 SkIRect fIRect; |
| 177 } fClip; | 179 } fClip; |
| 178 | 180 |
| 179 SkIPoint fOrigin; | 181 SkIPoint fOrigin; |
| 180 ClipType fClipType; | 182 ClipType fClipType; |
| 181 }; | 183 }; |
| 182 | 184 |
| 183 #endif | 185 #endif |
| OLD | NEW |