OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |