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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 fHWGeometryState.notifyVertexBufferDelete(id); | 88 fHWGeometryState.notifyVertexBufferDelete(id); |
89 } | 89 } |
90 void notifyIndexBufferDelete(GrGLuint id) { | 90 void notifyIndexBufferDelete(GrGLuint id) { |
91 fHWGeometryState.notifyIndexBufferDelete(id); | 91 fHWGeometryState.notifyIndexBufferDelete(id); |
92 } | 92 } |
93 | 93 |
94 void buildProgramDesc(GrProgramDesc*, | 94 void buildProgramDesc(GrProgramDesc*, |
95 const GrPrimitiveProcessor&, | 95 const GrPrimitiveProcessor&, |
96 const GrPipeline&) const override; | 96 const GrPipeline&) const override; |
97 | 97 |
| 98 // id and type (GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER) of buffer to bin
d |
| 99 void bindBuffer(GrGLuint id, GrGLenum type); |
| 100 |
| 101 void releaseBuffer(GrGLuint id, GrGLenum type); |
| 102 |
| 103 // sizes are in bytes |
| 104 void* mapBuffer(GrGLuint id, GrGLenum type, bool dynamic, size_t currentSize
, |
| 105 size_t requestedSize); |
| 106 |
| 107 void unmapBuffer(GrGLuint id, GrGLenum type, void* mapPtr); |
| 108 |
| 109 void bufferData(GrGLuint id, GrGLenum type, bool dynamic, size_t currentSize
, |
| 110 const void* src, size_t srcSizeInBytes); |
| 111 |
98 const GrGLContext* glContextForTesting() const override { | 112 const GrGLContext* glContextForTesting() const override { |
99 return &this->glContext(); | 113 return &this->glContext(); |
100 } | 114 } |
101 | 115 |
102 void clearStencil(GrRenderTarget*) override; | 116 void clearStencil(GrRenderTarget*) override; |
103 | 117 |
104 void invalidateBoundRenderTarget() { | 118 void invalidateBoundRenderTarget() { |
105 fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID; | 119 fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID; |
106 } | 120 } |
107 | 121 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 521 |
508 // Mapping of pixel configs to known supported stencil formats to be used | 522 // Mapping of pixel configs to known supported stencil formats to be used |
509 // when adding a stencil buffer to a framebuffer. | 523 // when adding a stencil buffer to a framebuffer. |
510 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; | 524 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; |
511 | 525 |
512 typedef GrGpu INHERITED; | 526 typedef GrGpu INHERITED; |
513 friend class GrGLPathRendering; // For accessing setTextureUnit. | 527 friend class GrGLPathRendering; // For accessing setTextureUnit. |
514 }; | 528 }; |
515 | 529 |
516 #endif | 530 #endif |
OLD | NEW |