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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 * before flushing and popped afterwards. | 68 * before flushing and popped afterwards. |
69 */ | 69 */ |
70 void flush(); | 70 void flush(); |
71 | 71 |
72 // tracking for draws | 72 // tracking for draws |
73 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); } | 73 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); } |
74 | 74 |
75 // overrides from GrDrawTarget | 75 // overrides from GrDrawTarget |
76 virtual bool geometryHints(int* vertexCount, | 76 virtual bool geometryHints(int* vertexCount, |
77 int* indexCount) const SK_OVERRIDE; | 77 int* indexCount) const SK_OVERRIDE; |
| 78 |
78 virtual void clear(const SkIRect* rect, | 79 virtual void clear(const SkIRect* rect, |
79 GrColor color, | 80 GrColor color, |
80 bool canIgnoreRect, | 81 bool canIgnoreRect, |
81 GrRenderTarget* renderTarget) SK_OVERRIDE; | 82 GrRenderTarget* renderTarget) SK_OVERRIDE; |
82 | 83 |
| 84 virtual void clearStencilClip(const SkIRect& rect, |
| 85 bool insideClip, |
| 86 GrRenderTarget* renderTarget) SK_OVERRIDE; |
| 87 |
83 virtual void discard(GrRenderTarget*) SK_OVERRIDE; | 88 virtual void discard(GrRenderTarget*) SK_OVERRIDE; |
84 | 89 |
85 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; | 90 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; |
86 | 91 |
87 protected: | 92 protected: |
88 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE; | 93 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE; |
89 | 94 |
90 private: | 95 private: |
91 enum { | 96 enum { |
92 kDraw_Cmd = 1, | 97 kDraw_Cmd = 1, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 virtual void execute(GrDrawTarget*); | 186 virtual void execute(GrDrawTarget*); |
182 | 187 |
183 SkIRect fRect; | 188 SkIRect fRect; |
184 GrColor fColor; | 189 GrColor fColor; |
185 bool fCanIgnoreRect; | 190 bool fCanIgnoreRect; |
186 | 191 |
187 private: | 192 private: |
188 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; | 193 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; |
189 }; | 194 }; |
190 | 195 |
| 196 // This command is ONLY used by the clip mask manager to clear the stencil c
lip bits |
| 197 struct ClearStencilClip : public Cmd { |
| 198 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt
) {} |
| 199 |
| 200 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); } |
| 201 |
| 202 virtual void execute(GrDrawTarget*); |
| 203 |
| 204 SkIRect fRect; |
| 205 bool fInsideClip; |
| 206 |
| 207 private: |
| 208 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; |
| 209 }; |
| 210 |
191 struct CopySurface : public Cmd { | 211 struct CopySurface : public Cmd { |
192 CopySurface(GrSurface* dst, GrSurface* src) : Cmd(kCopySurface_Cmd), fDs
t(dst), fSrc(src) {} | 212 CopySurface(GrSurface* dst, GrSurface* src) : Cmd(kCopySurface_Cmd), fDs
t(dst), fSrc(src) {} |
193 | 213 |
194 GrSurface* dst() const { return fDst.get(); } | 214 GrSurface* dst() const { return fDst.get(); } |
195 GrSurface* src() const { return fSrc.get(); } | 215 GrSurface* src() const { return fSrc.get(); } |
196 | 216 |
197 virtual void execute(GrDrawTarget*); | 217 virtual void execute(GrDrawTarget*); |
198 | 218 |
199 SkIPoint fDstPoint; | 219 SkIPoint fDstPoint; |
200 SkIRect fSrcRect; | 220 SkIRect fSrcRect; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateS
tack; | 349 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateS
tack; |
330 | 350 |
331 GeoPoolStateStack fGeoPoolStateStack; | 351 GeoPoolStateStack fGeoPoolStateStack; |
332 bool fFlushing; | 352 bool fFlushing; |
333 uint32_t fDrawID; | 353 uint32_t fDrawID; |
334 | 354 |
335 typedef GrDrawTarget INHERITED; | 355 typedef GrDrawTarget INHERITED; |
336 }; | 356 }; |
337 | 357 |
338 #endif | 358 #endif |
OLD | NEW |