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 #ifndef GrGpu_DEFINED | 10 #ifndef GrGpu_DEFINED |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 /** | 133 /** |
134 * Returns an index buffer that can be used to render quads. | 134 * Returns an index buffer that can be used to render quads. |
135 * Six indices per quad: 0, 1, 2, 0, 2, 3, etc. | 135 * Six indices per quad: 0, 1, 2, 0, 2, 3, etc. |
136 * The max number of quads can be queried using GrIndexBuffer::maxQuads(). | 136 * The max number of quads can be queried using GrIndexBuffer::maxQuads(). |
137 * Draw with kTriangles_GrPrimitiveType | 137 * Draw with kTriangles_GrPrimitiveType |
138 * @ return the quad index buffer | 138 * @ return the quad index buffer |
139 */ | 139 */ |
140 const GrIndexBuffer* getQuadIndexBuffer() const; | 140 const GrIndexBuffer* getQuadIndexBuffer() const; |
141 | 141 |
142 /** | 142 /** |
143 * Returns a vertex buffer with four position-only vertices [(0,0), (1,0), | |
144 * (1,1), (0,1)]. | |
145 * @ return unit square vertex buffer | |
146 */ | |
147 const GrVertexBuffer* getUnitSquareVertexBuffer() const; | |
148 | |
149 /** | |
150 * Resolves MSAA. | 143 * Resolves MSAA. |
151 */ | 144 */ |
152 void resolveRenderTarget(GrRenderTarget* target); | 145 void resolveRenderTarget(GrRenderTarget* target); |
153 | 146 |
154 /** | 147 /** |
155 * Ensures that the current render target is actually set in the | 148 * Ensures that the current render target is actually set in the |
156 * underlying 3D API. Used when client wants to use 3D API to directly | 149 * underlying 3D API. Used when client wants to use 3D API to directly |
157 * render to the RT. | 150 * render to the RT. |
158 */ | 151 */ |
159 void forceRenderTargetFlush(); | 152 void forceRenderTargetFlush(); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 }; | 514 }; |
522 typedef SkTInternalLList<GrResource> ResourceList; | 515 typedef SkTInternalLList<GrResource> ResourceList; |
523 SkSTArray<kPreallocGeomPoolStateStackCnt, GeometryPoolState, true> fGeomPoo
lStateStack; | 516 SkSTArray<kPreallocGeomPoolStateStackCnt, GeometryPoolState, true> fGeomPoo
lStateStack; |
524 ResetTimestamp fResetTi
mestamp; | 517 ResetTimestamp fResetTi
mestamp; |
525 GrVertexBufferAllocPool* fVertexP
ool; | 518 GrVertexBufferAllocPool* fVertexP
ool; |
526 GrIndexBufferAllocPool* fIndexPo
ol; | 519 GrIndexBufferAllocPool* fIndexPo
ol; |
527 // counts number of uses of vertex/index pool in the geometry stack | 520 // counts number of uses of vertex/index pool in the geometry stack |
528 int fVertexP
oolUseCnt; | 521 int fVertexP
oolUseCnt; |
529 int fIndexPo
olUseCnt; | 522 int fIndexPo
olUseCnt; |
530 // these are mutable so they can be created on-demand | 523 // these are mutable so they can be created on-demand |
531 mutable GrVertexBuffer* fUnitSqu
areVertexBuffer; | |
532 mutable GrIndexBuffer* fQuadInd
exBuffer; | 524 mutable GrIndexBuffer* fQuadInd
exBuffer; |
533 bool fContext
IsDirty; | 525 bool fContext
IsDirty; |
534 ResourceList fResourc
eList; | 526 ResourceList fResourc
eList; |
535 | 527 |
536 typedef GrDrawTarget INHERITED; | 528 typedef GrDrawTarget INHERITED; |
537 }; | 529 }; |
538 | 530 |
539 #endif | 531 #endif |
OLD | NEW |