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

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

Issue 947933004: move static init to cpp file to fix linux builder (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') | src/gpu/GrClip.cpp » ('J')
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 SkIRect* devResult, 140 SkIRect* devResult,
141 bool* isIntersectionOfRects = NULL) const { 141 bool* isIntersectionOfRects = NULL) const {
142 this->getConservativeBounds(surface->width(), surface->height(), 142 this->getConservativeBounds(surface->width(), surface->height(),
143 devResult, isIntersectionOfRects); 143 devResult, isIntersectionOfRects);
144 } 144 }
145 145
146 void getConservativeBounds(int width, int height, 146 void getConservativeBounds(int width, int height,
147 SkIRect* devResult, 147 SkIRect* devResult,
148 bool* isIntersectionOfRects = NULL) const; 148 bool* isIntersectionOfRects = NULL) const;
149 149
150 static const GrClip& WideOpen() { 150 static const GrClip& WideOpen();
151 static GrClip clip;
152 return clip;
153 }
154 151
155 enum ClipType { 152 enum ClipType {
156 kClipStack_ClipType, 153 kClipStack_ClipType,
157 kWideOpen_ClipType, 154 kWideOpen_ClipType,
158 kIRect_ClipType, 155 kIRect_ClipType,
159 }; 156 };
160 157
161 ClipType clipType() const { return fClipType; } 158 ClipType clipType() const { return fClipType; }
162 159
163 private: 160 private:
164 union Clip { 161 union Clip {
165 struct ClipStack { 162 struct ClipStack {
166 const SkClipStack* fStack; 163 const SkClipStack* fStack;
167 SkIPoint fOrigin; 164 SkIPoint fOrigin;
168 } fClipStack; 165 } fClipStack;
169 SkIRect fIRect; 166 SkIRect fIRect;
170 } fClip; 167 } fClip;
171 168
172 ClipType fClipType; 169 ClipType fClipType;
173 }; 170 };
174 171
175 #endif 172 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrClip.cpp » ('j') | src/gpu/GrClip.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698