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

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

Issue 1754563003: Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fAuditTrail uses 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
117 const SkIRect& irect() const { 124 const SkIRect& irect() const {
118 SkASSERT(kIRect_ClipType == fClipType); 125 SkASSERT(kIRect_ClipType == fClipType);
119 return fClip.fIRect; 126 return fClip.fIRect;
120 } 127 }
121 128
122 void reset() { 129 void reset() {
123 if (kClipStack_ClipType == fClipType) { 130 if (kClipStack_ClipType == fClipType) {
124 fClip.fStack->unref(); 131 fClip.fStack->unref();
125 fClip.fStack = NULL; 132 fClip.fStack = NULL;
126 } 133 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 union Clip { 183 union Clip {
177 const SkClipStack* fStack; 184 const SkClipStack* fStack;
178 SkIRect fIRect; 185 SkIRect fIRect;
179 } fClip; 186 } fClip;
180 187
181 SkIPoint fOrigin; 188 SkIPoint fOrigin;
182 ClipType fClipType; 189 ClipType fClipType;
183 }; 190 };
184 191
185 #endif 192 #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