| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // Flushes state from GrPipeline to GL. Returns false if the state couldn't
be set. | 187 // Flushes state from GrPipeline to GL. Returns false if the state couldn't
be set. |
| 188 bool flushGLState(const DrawArgs&); | 188 bool flushGLState(const DrawArgs&); |
| 189 | 189 |
| 190 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 190 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
| 191 // an into the index buffer. It does not account for vertices.startIndex() b
ut rather the start | 191 // an into the index buffer. It does not account for vertices.startIndex() b
ut rather the start |
| 192 // index is relative to the returned offset. | 192 // index is relative to the returned offset. |
| 193 void setupGeometry(const GrPrimitiveProcessor&, | 193 void setupGeometry(const GrPrimitiveProcessor&, |
| 194 const GrNonInstancedVertices& vertices, | 194 const GrNonInstancedVertices& vertices, |
| 195 size_t* indexOffsetInBytes); | 195 size_t* indexOffsetInBytes); |
| 196 | 196 |
| 197 // Subclasses should call this to flush the blend state. | 197 void flushBlend(const GrXferProcessor::BlendInfo& blendInfo, bool swapConstR
edAndAlpha); |
| 198 void flushBlend(const GrXferProcessor::BlendInfo& blendInfo); | |
| 199 | 198 |
| 200 bool hasExtension(const char* ext) const { return fGLContext->hasExtension(e
xt); } | 199 bool hasExtension(const char* ext) const { return fGLContext->hasExtension(e
xt); } |
| 201 | 200 |
| 202 void copySurfaceAsDraw(GrSurface* dst, | 201 void copySurfaceAsDraw(GrSurface* dst, |
| 203 GrSurface* src, | 202 GrSurface* src, |
| 204 const SkIRect& srcRect, | 203 const SkIRect& srcRect, |
| 205 const SkIPoint& dstPoint); | 204 const SkIPoint& dstPoint); |
| 206 void copySurfaceAsCopyTexSubImage(GrSurface* dst, | 205 void copySurfaceAsCopyTexSubImage(GrSurface* dst, |
| 207 GrSurface* src, | 206 GrSurface* src, |
| 208 const SkIRect& srcRect, | 207 const SkIRect& srcRect, |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 540 |
| 542 // Mapping of pixel configs to known supported stencil formats to be used | 541 // Mapping of pixel configs to known supported stencil formats to be used |
| 543 // when adding a stencil buffer to a framebuffer. | 542 // when adding a stencil buffer to a framebuffer. |
| 544 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; | 543 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; |
| 545 | 544 |
| 546 typedef GrGpu INHERITED; | 545 typedef GrGpu INHERITED; |
| 547 friend class GrGLPathRendering; // For accessing setTextureUnit. | 546 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 548 }; | 547 }; |
| 549 | 548 |
| 550 #endif | 549 #endif |
| OLD | NEW |