| 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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
| 9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 fHWGeometryState.notifyVertexBufferDelete(id); | 92 fHWGeometryState.notifyVertexBufferDelete(id); |
| 93 } | 93 } |
| 94 void notifyIndexBufferDelete(GrGLuint id) { | 94 void notifyIndexBufferDelete(GrGLuint id) { |
| 95 fHWGeometryState.notifyIndexBufferDelete(id); | 95 fHWGeometryState.notifyIndexBufferDelete(id); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void buildProgramDesc(GrProgramDesc*, | 98 void buildProgramDesc(GrProgramDesc*, |
| 99 const GrPrimitiveProcessor&, | 99 const GrPrimitiveProcessor&, |
| 100 const GrPipeline&) const override; | 100 const GrPipeline&) const override; |
| 101 | 101 |
| 102 // id and type (GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER) of buffer to bin
d | 102 // id and type (GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, etc.) of buffer to
bind |
| 103 void bindBuffer(GrGLuint id, GrGLenum type); | 103 void bindBuffer(GrGLuint id, GrGLenum type); |
| 104 | 104 |
| 105 void releaseBuffer(GrGLuint id, GrGLenum type); | 105 void releaseBuffer(GrGLuint id, GrGLenum type); |
| 106 | 106 |
| 107 // sizes are in bytes | 107 // sizes are in bytes |
| 108 void* mapBuffer(GrGLuint id, GrGLenum type, GrGLBufferImpl::Usage usage, siz
e_t currentSize, | 108 void* mapBuffer(GrGLuint id, GrGLenum type, GrGLBufferImpl::Usage usage, siz
e_t currentSize, |
| 109 size_t requestedSize); | 109 size_t requestedSize); |
| 110 | 110 |
| 111 void unmapBuffer(GrGLuint id, GrGLenum type, void* mapPtr); | 111 void unmapBuffer(GrGLuint id, GrGLenum type, void* mapPtr); |
| 112 | 112 |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 bool fDefaultVertexArrayBoundIndexBufferIDIsValid; | 535 bool fDefaultVertexArrayBoundIndexBufferIDIsValid; |
| 536 // We return a non-const pointer to this from bindArrayAndBuffersToDraw
when vertex array 0 | 536 // We return a non-const pointer to this from bindArrayAndBuffersToDraw
when vertex array 0 |
| 537 // is bound. However, this class is internal to GrGLGpu and this object
never leaks out of | 537 // is bound. However, this class is internal to GrGLGpu and this object
never leaks out of |
| 538 // GrGLGpu. | 538 // GrGLGpu. |
| 539 GrGLAttribArrayState fDefaultVertexArrayAttribState; | 539 GrGLAttribArrayState fDefaultVertexArrayAttribState; |
| 540 | 540 |
| 541 // This is used when we're using a core profile and the vertices are in
a VBO. | 541 // This is used when we're using a core profile and the vertices are in
a VBO. |
| 542 GrGLVertexArray* fVBOVertexArray; | 542 GrGLVertexArray* fVBOVertexArray; |
| 543 } fHWGeometryState; | 543 } fHWGeometryState; |
| 544 | 544 |
| 545 GrGLuint fHWBoundTextureBufferID; |
| 546 GrGLuint fHWBoundDrawIndirectBufferID; |
| 547 bool fHWBoundTextureBufferIDIsValid; |
| 548 bool fHWBoundDrawIndirectBufferIDIsValid; |
| 549 |
| 545 struct { | 550 struct { |
| 546 GrBlendEquation fEquation; | 551 GrBlendEquation fEquation; |
| 547 GrBlendCoeff fSrcCoeff; | 552 GrBlendCoeff fSrcCoeff; |
| 548 GrBlendCoeff fDstCoeff; | 553 GrBlendCoeff fDstCoeff; |
| 549 GrColor fConstColor; | 554 GrColor fConstColor; |
| 550 bool fConstColorValid; | 555 bool fConstColorValid; |
| 551 TriState fEnabled; | 556 TriState fEnabled; |
| 552 | 557 |
| 553 void invalidate() { | 558 void invalidate() { |
| 554 fEquation = static_cast<GrBlendEquation>(-1); | 559 fEquation = static_cast<GrBlendEquation>(-1); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 } fPLSSetupProgram; | 618 } fPLSSetupProgram; |
| 614 | 619 |
| 615 bool fHWPLSEnabled; | 620 bool fHWPLSEnabled; |
| 616 bool fPLSHasBeenUsed; | 621 bool fPLSHasBeenUsed; |
| 617 | 622 |
| 618 typedef GrGpu INHERITED; | 623 typedef GrGpu INHERITED; |
| 619 friend class GrGLPathRendering; // For accessing setTextureUnit. | 624 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 620 }; | 625 }; |
| 621 | 626 |
| 622 #endif | 627 #endif |
| OLD | NEW |