OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 * Empties the draw buffer of any queued up draws. This must not be called w
hile inside an | 56 * Empties the draw buffer of any queued up draws. This must not be called w
hile inside an |
57 * unbalanced pushGeometrySource(). The current draw state and clip are pres
erved. | 57 * unbalanced pushGeometrySource(). The current draw state and clip are pres
erved. |
58 */ | 58 */ |
59 void reset(); | 59 void reset(); |
60 | 60 |
61 /** | 61 /** |
62 * This plays the queued up draws to its GrGpu target. It also resets this o
bject (i.e. flushing | 62 * This plays the queued up draws to its GrGpu target. It also resets this o
bject (i.e. flushing |
63 * is destructive). This buffer must not have an active reserved vertex or i
ndex source. Any | 63 * is destructive). This buffer must not have an active reserved vertex or i
ndex source. Any |
64 * reserved geometry on the target will be finalized because it's geometry s
ource will be pushed | 64 * reserved geometry on the target will be finalized because it's geometry s
ource will be pushed |
65 * before flushing and popped afterwards. | 65 * before flushing and popped afterwards. |
66 * | |
67 * @return false if the playback trivially drew nothing because nothing was
recorded. | |
68 */ | 66 */ |
69 bool flush(); | 67 void flush(); |
70 | |
71 bool isFlushing() const { return fFlushing; } | |
72 | 68 |
73 // overrides from GrDrawTarget | 69 // overrides from GrDrawTarget |
74 virtual bool geometryHints(int* vertexCount, | 70 virtual bool geometryHints(int* vertexCount, |
75 int* indexCount) const SK_OVERRIDE; | 71 int* indexCount) const SK_OVERRIDE; |
76 virtual void clear(const GrIRect* rect, | 72 virtual void clear(const GrIRect* rect, |
77 GrColor color, | 73 GrColor color, |
78 GrRenderTarget* renderTarget = NULL) SK_OVERRIDE; | 74 GrRenderTarget* renderTarget = NULL) SK_OVERRIDE; |
79 | 75 |
80 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; | 76 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; |
81 | 77 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 size_t fUsedPoolIndexBytes; | 221 size_t fUsedPoolIndexBytes; |
226 }; | 222 }; |
227 SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack; | 223 SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> fGeoPoolStateStack; |
228 | 224 |
229 bool fFlushing; | 225 bool fFlushing; |
230 | 226 |
231 typedef GrDrawTarget INHERITED; | 227 typedef GrDrawTarget INHERITED; |
232 }; | 228 }; |
233 | 229 |
234 #endif | 230 #endif |
OLD | NEW |