| 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 GrGpuGL_DEFINED | 8 #ifndef GrGpuGL_DEFINED |
| 9 #define GrGpuGL_DEFINED | 9 #define GrGpuGL_DEFINED |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 size_t rowBytes) SK_OVERRIDE; | 141 size_t rowBytes) SK_OVERRIDE; |
| 142 | 142 |
| 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
| 144 | 144 |
| 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; | 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; |
| 146 | 146 |
| 147 | 147 |
| 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; | 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; |
| 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, | 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, |
| 150 bool insideClip) SK_OVERRIDE; | 150 bool insideClip) SK_OVERRIDE; |
| 151 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop
y) SK_OVERRIDE; | 151 virtual bool flushGraphicsState(DrawType, |
| 152 const ScissorState&, |
| 153 const GrDeviceCoordTexture* dstCopy) SK_OVER
RIDE; |
| 152 | 154 |
| 153 // GrDrawTarget overrides | 155 // GrDrawTarget overrides |
| 154 virtual void didAddGpuTraceMarker() SK_OVERRIDE; | 156 virtual void didAddGpuTraceMarker() SK_OVERRIDE; |
| 155 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; | 157 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; |
| 156 | 158 |
| 157 // binds texture unit in GL | 159 // binds texture unit in GL |
| 158 void setTextureUnit(int unitIdx); | 160 void setTextureUnit(int unitIdx); |
| 159 | 161 |
| 160 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 162 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
| 161 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start | 163 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 int fCacheMisses; | 215 int fCacheMisses; |
| 214 int fHashMisses; // cache hit but hash table mis
sed | 216 int fHashMisses; // cache hit but hash table mis
sed |
| 215 #endif | 217 #endif |
| 216 }; | 218 }; |
| 217 | 219 |
| 218 // flushes dithering, color-mask, and face culling stat | 220 // flushes dithering, color-mask, and face culling stat |
| 219 void flushMiscFixedFunctionState(const GrOptDrawState&); | 221 void flushMiscFixedFunctionState(const GrOptDrawState&); |
| 220 | 222 |
| 221 // flushes the scissor. see the note on flushBoundTextureAndParams about | 223 // flushes the scissor. see the note on flushBoundTextureAndParams about |
| 222 // flushing the scissor after that function is called. | 224 // flushing the scissor after that function is called. |
| 223 void flushScissor(const GrGLIRect& rtViewport, GrSurfaceOrigin rtOrigin); | 225 void flushScissor(const ScissorState&, |
| 226 const GrGLIRect& rtViewport, |
| 227 GrSurfaceOrigin rtOrigin); |
| 228 |
| 229 // disables the scissor |
| 230 void disableScissor(); |
| 224 | 231 |
| 225 void initFSAASupport(); | 232 void initFSAASupport(); |
| 226 | 233 |
| 227 // determines valid stencil formats | 234 // determines valid stencil formats |
| 228 void initStencilFormats(); | 235 void initStencilFormats(); |
| 229 | 236 |
| 230 // sets a texture unit to use for texture operations other than binding a te
xture to a program. | 237 // sets a texture unit to use for texture operations other than binding a te
xture to a program. |
| 231 // ensures that such operations don't negatively interact with tracking boun
d textures. | 238 // ensures that such operations don't negatively interact with tracking boun
d textures. |
| 232 void setScratchTextureUnit(); | 239 void setScratchTextureUnit(); |
| 233 | 240 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 447 |
| 441 // we record what stencil format worked last time to hopefully exit early | 448 // we record what stencil format worked last time to hopefully exit early |
| 442 // from our loop that tries stencil formats and calls check fb status. | 449 // from our loop that tries stencil formats and calls check fb status. |
| 443 int fLastSuccessfulStencilFmtIdx; | 450 int fLastSuccessfulStencilFmtIdx; |
| 444 | 451 |
| 445 typedef GrGpu INHERITED; | 452 typedef GrGpu INHERITED; |
| 446 friend class GrGLPathRendering; // For accessing setTextureUnit. | 453 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 447 }; | 454 }; |
| 448 | 455 |
| 449 #endif | 456 #endif |
| OLD | NEW |