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

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

Issue 1754353002: Revert of Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « gyp/gpu.gypi ('k') | include/gpu/GrDrawContext.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 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 fClipType = kClipStack_ClipType; 107 fClipType = kClipStack_ClipType;
108 fClip.fStack = SkRef(clipStack); 108 fClip.fStack = SkRef(clipStack);
109 if (origin) { 109 if (origin) {
110 fOrigin = *origin; 110 fOrigin = *origin;
111 } else { 111 } else {
112 fOrigin.setZero(); 112 fOrigin.setZero();
113 } 113 }
114 } 114 }
115 } 115 }
116 116
117 void setIRect(const SkIRect& irect) {
118 this->reset();
119 fClipType = kIRect_ClipType;
120 fOrigin.setZero();
121 fClip.fIRect = irect;
122 }
123
124 const SkIRect& irect() const { 117 const SkIRect& irect() const {
125 SkASSERT(kIRect_ClipType == fClipType); 118 SkASSERT(kIRect_ClipType == fClipType);
126 return fClip.fIRect; 119 return fClip.fIRect;
127 } 120 }
128 121
129 void reset() { 122 void reset() {
130 if (kClipStack_ClipType == fClipType) { 123 if (kClipStack_ClipType == fClipType) {
131 fClip.fStack->unref(); 124 fClip.fStack->unref();
132 fClip.fStack = NULL; 125 fClip.fStack = NULL;
133 } 126 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 union Clip { 176 union Clip {
184 const SkClipStack* fStack; 177 const SkClipStack* fStack;
185 SkIRect fIRect; 178 SkIRect fIRect;
186 } fClip; 179 } fClip;
187 180
188 SkIPoint fOrigin; 181 SkIPoint fOrigin;
189 ClipType fClipType; 182 ClipType fClipType;
190 }; 183 };
191 184
192 #endif 185 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrDrawContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698