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

Side by Side Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 364823004: Combine clip stack and clip origin into one struct in GrIODB. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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/GrInOrderDrawBuffer.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 2011 Google Inc. 2 * Copyright 2011 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 GrInOrderDrawBuffer_DEFINED 8 #ifndef GrInOrderDrawBuffer_DEFINED
9 #define GrInOrderDrawBuffer_DEFINED 9 #define GrInOrderDrawBuffer_DEFINED
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 GrRenderTarget* fRenderTarget; 138 GrRenderTarget* fRenderTarget;
139 }; 139 };
140 140
141 struct CopySurface : public ::SkNoncopyable { 141 struct CopySurface : public ::SkNoncopyable {
142 SkAutoTUnref<GrSurface> fDst; 142 SkAutoTUnref<GrSurface> fDst;
143 SkAutoTUnref<GrSurface> fSrc; 143 SkAutoTUnref<GrSurface> fSrc;
144 SkIRect fSrcRect; 144 SkIRect fSrcRect;
145 SkIPoint fDstPoint; 145 SkIPoint fDstPoint;
146 }; 146 };
147 147
148 struct Clip : public ::SkNoncopyable {
149 SkClipStack fStack;
150 SkIPoint fOrigin;
151 };
152
148 // overrides from GrDrawTarget 153 // overrides from GrDrawTarget
149 virtual void onDraw(const DrawInfo&) SK_OVERRIDE; 154 virtual void onDraw(const DrawInfo&) SK_OVERRIDE;
150 virtual void onDrawRect(const SkRect& rect, 155 virtual void onDrawRect(const SkRect& rect,
151 const SkMatrix* matrix, 156 const SkMatrix* matrix,
152 const SkRect* localRect, 157 const SkRect* localRect,
153 const SkMatrix* localMatrix) SK_OVERRIDE; 158 const SkMatrix* localMatrix) SK_OVERRIDE;
154 159
155 virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; 160 virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
156 virtual void onDrawPath(const GrPath*, SkPath::FillType, 161 virtual void onDrawPath(const GrPath*, SkPath::FillType,
157 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE; 162 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 kCopySurfacePreallocCnt = 4, 228 kCopySurfacePreallocCnt = 4,
224 }; 229 };
225 230
226 typedef GrTAllocator<DrawRecord> DrawAllocator; 231 typedef GrTAllocator<DrawRecord> DrawAllocator;
227 typedef GrTAllocator<StencilPath> StencilPathAllocator ; 232 typedef GrTAllocator<StencilPath> StencilPathAllocator ;
228 typedef GrTAllocator<DrawPath> DrawPathAllocator; 233 typedef GrTAllocator<DrawPath> DrawPathAllocator;
229 typedef GrTAllocator<DrawPaths> DrawPathsAllocator; 234 typedef GrTAllocator<DrawPaths> DrawPathsAllocator;
230 typedef GrTAllocator<GrDrawState::DeferredState> StateAllocator; 235 typedef GrTAllocator<GrDrawState::DeferredState> StateAllocator;
231 typedef GrTAllocator<Clear> ClearAllocator; 236 typedef GrTAllocator<Clear> ClearAllocator;
232 typedef GrTAllocator<CopySurface> CopySurfaceAllocator ; 237 typedef GrTAllocator<CopySurface> CopySurfaceAllocator ;
233 typedef GrTAllocator<SkClipStack> ClipAllocator; 238 typedef GrTAllocator<Clip> ClipAllocator;
234 typedef GrTAllocator<SkIPoint> ClipOriginAllocator;
235 239
236 GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws; 240 GrSTAllocator<kDrawPreallocCnt, DrawRecord> fDraws;
237 GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilP aths; 241 GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilP aths;
238 GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath ; 242 GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath ;
239 GrSTAllocator<kDrawPathsPreallocCnt, DrawPaths> fDrawPath s; 243 GrSTAllocator<kDrawPathsPreallocCnt, DrawPaths> fDrawPath s;
240 GrSTAllocator<kStatePreallocCnt, GrDrawState::DeferredState> fStates; 244 GrSTAllocator<kStatePreallocCnt, GrDrawState::DeferredState> fStates;
241 GrSTAllocator<kClearPreallocCnt, Clear> fClears; 245 GrSTAllocator<kClearPreallocCnt, Clear> fClears;
242 GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurf aces; 246 GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurf aces;
243 GrSTAllocator<kClipPreallocCnt, SkClipStack> fClips; 247 GrSTAllocator<kClipPreallocCnt, Clip> fClips;
244 GrSTAllocator<kClipPreallocCnt, SkIPoint> fClipOrig ins;
245 248
246 SkTArray<GrTraceMarkerSet, false> fGpuCmdMa rkers; 249 SkTArray<GrTraceMarkerSet, false> fGpuCmdMa rkers;
247 250
248 SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds; 251 SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
249 252
250 GrDrawTarget* fDstGpu; 253 GrDrawTarget* fDstGpu;
251 254
252 bool fClipSet; 255 bool fClipSet;
253 256
254 enum ClipProxyState { 257 enum ClipProxyState {
(...skipping 25 matching lines...) Expand all
280 283
281 void addToCmdBuffer(uint8_t cmd); 284 void addToCmdBuffer(uint8_t cmd);
282 285
283 bool fFlushing; 286 bool fFlushing;
284 uint32_t fDrawID; 287 uint32_t fDrawID;
285 288
286 typedef GrDrawTarget INHERITED; 289 typedef GrDrawTarget INHERITED;
287 }; 290 };
288 291
289 #endif 292 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698