| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, | 121 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, |
| 122 int width, | 122 int width, |
| 123 int height) SK_OVERRIDE; | 123 int height) SK_OVERRIDE; |
| 124 virtual bool attachStencilBufferToRenderTarget( | 124 virtual bool attachStencilBufferToRenderTarget( |
| 125 GrStencilBuffer* sb, | 125 GrStencilBuffer* sb, |
| 126 GrRenderTarget* rt) SK_OVERRIDE; | 126 GrRenderTarget* rt) SK_OVERRIDE; |
| 127 | 127 |
| 128 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, | 128 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, |
| 129 bool canIgnoreRect) SK_OVERRIDE; | 129 bool canIgnoreRect) SK_OVERRIDE; |
| 130 | 130 |
| 131 virtual void onClearStencilClip(GrRenderTarget*, |
| 132 const SkIRect& rect, |
| 133 bool insideClip) SK_OVERRIDE; |
| 134 |
| 131 virtual bool onReadPixels(GrRenderTarget* target, | 135 virtual bool onReadPixels(GrRenderTarget* target, |
| 132 int left, int top, | 136 int left, int top, |
| 133 int width, int height, | 137 int width, int height, |
| 134 GrPixelConfig, | 138 GrPixelConfig, |
| 135 void* buffer, | 139 void* buffer, |
| 136 size_t rowBytes) SK_OVERRIDE; | 140 size_t rowBytes) SK_OVERRIDE; |
| 137 | 141 |
| 138 virtual bool onWriteTexturePixels(GrTexture* texture, | 142 virtual bool onWriteTexturePixels(GrTexture* texture, |
| 139 int left, int top, int width, int height, | 143 int left, int top, int width, int height, |
| 140 GrPixelConfig config, const void* buffer, | 144 GrPixelConfig config, const void* buffer, |
| 141 size_t rowBytes) SK_OVERRIDE; | 145 size_t rowBytes) SK_OVERRIDE; |
| 142 | 146 |
| 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 147 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
| 144 | 148 |
| 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; | 149 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; |
| 146 | 150 |
| 147 | 151 |
| 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; | 152 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; |
| 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, | |
| 150 bool insideClip) SK_OVERRIDE; | |
| 151 virtual bool flushGraphicsState(DrawType, | 153 virtual bool flushGraphicsState(DrawType, |
| 152 const ScissorState&, | 154 const GrClipMaskManager::ScissorState&, |
| 153 const GrDeviceCoordTexture* dstCopy) SK_OVER
RIDE; | 155 const GrDeviceCoordTexture* dstCopy) SK_OVER
RIDE; |
| 154 | 156 |
| 155 // GrDrawTarget overrides | 157 // GrDrawTarget overrides |
| 156 virtual void didAddGpuTraceMarker() SK_OVERRIDE; | 158 virtual void didAddGpuTraceMarker() SK_OVERRIDE; |
| 157 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; | 159 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; |
| 158 | 160 |
| 159 // binds texture unit in GL | 161 // binds texture unit in GL |
| 160 void setTextureUnit(int unitIdx); | 162 void setTextureUnit(int unitIdx); |
| 161 | 163 |
| 162 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 164 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 int fCacheMisses; | 217 int fCacheMisses; |
| 216 int fHashMisses; // cache hit but hash table mis
sed | 218 int fHashMisses; // cache hit but hash table mis
sed |
| 217 #endif | 219 #endif |
| 218 }; | 220 }; |
| 219 | 221 |
| 220 // flushes dithering, color-mask, and face culling stat | 222 // flushes dithering, color-mask, and face culling stat |
| 221 void flushMiscFixedFunctionState(const GrOptDrawState&); | 223 void flushMiscFixedFunctionState(const GrOptDrawState&); |
| 222 | 224 |
| 223 // flushes the scissor. see the note on flushBoundTextureAndParams about | 225 // flushes the scissor. see the note on flushBoundTextureAndParams about |
| 224 // flushing the scissor after that function is called. | 226 // flushing the scissor after that function is called. |
| 225 void flushScissor(const ScissorState&, | 227 void flushScissor(const GrClipMaskManager::ScissorState&, |
| 226 const GrGLIRect& rtViewport, | 228 const GrGLIRect& rtViewport, |
| 227 GrSurfaceOrigin rtOrigin); | 229 GrSurfaceOrigin rtOrigin); |
| 228 | 230 |
| 229 // disables the scissor | 231 // disables the scissor |
| 230 void disableScissor(); | 232 void disableScissor(); |
| 231 | 233 |
| 232 void initFSAASupport(); | 234 void initFSAASupport(); |
| 233 | 235 |
| 234 // determines valid stencil formats | 236 // determines valid stencil formats |
| 235 void initStencilFormats(); | 237 void initStencilFormats(); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 447 |
| 446 // 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 |
| 447 // 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. |
| 448 int fLastSuccessfulStencilFmtIdx; | 450 int fLastSuccessfulStencilFmtIdx; |
| 449 | 451 |
| 450 typedef GrGpu INHERITED; | 452 typedef GrGpu INHERITED; |
| 451 friend class GrGLPathRendering; // For accessing setTextureUnit. | 453 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 452 }; | 454 }; |
| 453 | 455 |
| 454 #endif | 456 #endif |
| OLD | NEW |