| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 virtual bool canCopySurface(const GrSurface* dst, | 103 virtual bool canCopySurface(const GrSurface* dst, |
| 104 const GrSurface* src, | 104 const GrSurface* src, |
| 105 const SkIRect& srcRect, | 105 const SkIRect& srcRect, |
| 106 const SkIPoint& dstPoint) SK_OVERRIDE; | 106 const SkIPoint& dstPoint) SK_OVERRIDE; |
| 107 | 107 |
| 108 protected: | 108 protected: |
| 109 virtual void buildProgramDesc(const GrOptDrawState&, | 109 virtual void buildProgramDesc(const GrOptDrawState&, |
| 110 const GrProgramDesc::DescInfo&, | 110 const GrProgramDesc::DescInfo&, |
| 111 GrGpu::DrawType, | 111 GrGpu::DrawType, |
| 112 const GrDeviceCoordTexture* dstCopy, | |
| 113 GrProgramDesc*) SK_OVERRIDE; | 112 GrProgramDesc*) SK_OVERRIDE; |
| 114 | 113 |
| 115 private: | 114 private: |
| 116 // GrGpu overrides | 115 // GrGpu overrides |
| 117 virtual void onResetContext(uint32_t resetBits) SK_OVERRIDE; | 116 virtual void onResetContext(uint32_t resetBits) SK_OVERRIDE; |
| 118 | 117 |
| 119 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, | 118 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, |
| 120 const void* srcData, | 119 const void* srcData, |
| 121 size_t rowBytes) SK_OVERRIDE; | 120 size_t rowBytes) SK_OVERRIDE; |
| 122 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 121 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 150 int left, int top, int width, int height, | 149 int left, int top, int width, int height, |
| 151 GrPixelConfig config, const void* buffer, | 150 GrPixelConfig config, const void* buffer, |
| 152 size_t rowBytes) SK_OVERRIDE; | 151 size_t rowBytes) SK_OVERRIDE; |
| 153 | 152 |
| 154 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 153 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
| 155 | 154 |
| 156 virtual void onDraw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&) SK
_OVERRIDE; | 155 virtual void onDraw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&) SK
_OVERRIDE; |
| 157 | 156 |
| 158 | 157 |
| 159 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; | 158 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; |
| 160 virtual bool flushGraphicsState(const GrOptDrawState&, | 159 virtual bool flushGraphicsState(const GrOptDrawState&, DrawType) SK_OVERRIDE
; |
| 161 DrawType, | |
| 162 const GrDeviceCoordTexture* dstCopy) SK_OVER
RIDE; | |
| 163 | 160 |
| 164 // GrDrawTarget overrides | 161 // GrDrawTarget overrides |
| 165 virtual void didAddGpuTraceMarker() SK_OVERRIDE; | 162 virtual void didAddGpuTraceMarker() SK_OVERRIDE; |
| 166 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; | 163 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; |
| 167 | 164 |
| 168 // binds texture unit in GL | 165 // binds texture unit in GL |
| 169 void setTextureUnit(int unitIdx); | 166 void setTextureUnit(int unitIdx); |
| 170 | 167 |
| 171 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 168 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
| 172 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start | 169 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 449 |
| 453 // we record what stencil format worked last time to hopefully exit early | 450 // we record what stencil format worked last time to hopefully exit early |
| 454 // from our loop that tries stencil formats and calls check fb status. | 451 // from our loop that tries stencil formats and calls check fb status. |
| 455 int fLastSuccessfulStencilFmtIdx; | 452 int fLastSuccessfulStencilFmtIdx; |
| 456 | 453 |
| 457 typedef GrGpu INHERITED; | 454 typedef GrGpu INHERITED; |
| 458 friend class GrGLPathRendering; // For accessing setTextureUnit. | 455 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 459 }; | 456 }; |
| 460 | 457 |
| 461 #endif | 458 #endif |
| OLD | NEW |