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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 void notifyVertexBufferDelete(GrGLuint id) { | 87 void notifyVertexBufferDelete(GrGLuint id) { |
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 void notifyTextureDelete(GrGLTexture* texture); | 93 void notifyTextureDelete(GrGLTexture* texture); |
94 void notifyRenderTargetDelete(GrRenderTarget* renderTarget); | 94 void notifyRenderTargetDelete(GrRenderTarget* renderTarget); |
95 | 95 |
| 96 const GrStencilSettings& getPathStencilSettingsForFillType(SkPath::FillType
fill) SK_OVERRIDE; |
| 97 |
96 protected: | 98 protected: |
97 virtual bool onCopySurface(GrSurface* dst, | 99 virtual bool onCopySurface(GrSurface* dst, |
98 GrSurface* src, | 100 GrSurface* src, |
99 const SkIRect& srcRect, | 101 const SkIRect& srcRect, |
100 const SkIPoint& dstPoint) SK_OVERRIDE; | 102 const SkIPoint& dstPoint) SK_OVERRIDE; |
101 | 103 |
102 virtual bool onCanCopySurface(GrSurface* dst, | 104 virtual bool onCanCopySurface(GrSurface* dst, |
103 GrSurface* src, | 105 GrSurface* src, |
104 const SkIRect& srcRect, | 106 const SkIRect& srcRect, |
105 const SkIPoint& dstPoint) SK_OVERRIDE; | 107 const SkIPoint& dstPoint) SK_OVERRIDE; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 140 |
139 virtual bool onWriteTexturePixels(GrTexture* texture, | 141 virtual bool onWriteTexturePixels(GrTexture* texture, |
140 int left, int top, int width, int height, | 142 int left, int top, int width, int height, |
141 GrPixelConfig config, const void* buffer, | 143 GrPixelConfig config, const void* buffer, |
142 size_t rowBytes) SK_OVERRIDE; | 144 size_t rowBytes) SK_OVERRIDE; |
143 | 145 |
144 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 146 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
145 | 147 |
146 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; | 148 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; |
147 | 149 |
148 virtual void setStencilPathSettings(const GrPath&, | |
149 SkPath::FillType, | |
150 GrStencilSettings* settings) | |
151 SK_OVERRIDE; | |
152 virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; | 150 virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; |
| 151 virtual void onGpuFillPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; |
153 | 152 |
154 virtual void clearStencil() SK_OVERRIDE; | 153 virtual void clearStencil() SK_OVERRIDE; |
155 virtual void clearStencilClip(const SkIRect& rect, | 154 virtual void clearStencilClip(const SkIRect& rect, |
156 bool insideClip) SK_OVERRIDE; | 155 bool insideClip) SK_OVERRIDE; |
157 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop
y) SK_OVERRIDE; | 156 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop
y) SK_OVERRIDE; |
158 | 157 |
159 // binds texture unit in GL | 158 // binds texture unit in GL |
160 void setTextureUnit(int unitIdx); | 159 void setTextureUnit(int unitIdx); |
161 | 160 |
162 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 161 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 fMSAAEnabled = kUnknown_TriState; | 420 fMSAAEnabled = kUnknown_TriState; |
422 fSmoothLineEnabled = kUnknown_TriState; | 421 fSmoothLineEnabled = kUnknown_TriState; |
423 } | 422 } |
424 } fHWAAState; | 423 } fHWAAState; |
425 | 424 |
426 | 425 |
427 GrGLProgram::MatrixState fHWProjectionMatrixState; | 426 GrGLProgram::MatrixState fHWProjectionMatrixState; |
428 | 427 |
429 GrStencilSettings fHWStencilSettings; | 428 GrStencilSettings fHWStencilSettings; |
430 TriState fHWStencilTestEnabled; | 429 TriState fHWStencilTestEnabled; |
| 430 GrStencilSettings fHWPathStencilSettings; |
431 | 431 |
432 GrDrawState::DrawFace fHWDrawFace; | 432 GrDrawState::DrawFace fHWDrawFace; |
433 TriState fHWWriteToColor; | 433 TriState fHWWriteToColor; |
434 TriState fHWDitherEnabled; | 434 TriState fHWDitherEnabled; |
435 GrRenderTarget* fHWBoundRenderTarget; | 435 GrRenderTarget* fHWBoundRenderTarget; |
436 SkTArray<GrTexture*, true> fHWBoundTextures; | 436 SkTArray<GrTexture*, true> fHWBoundTextures; |
437 | 437 |
438 struct TexGenData { | 438 struct TexGenData { |
439 GrGLenum fMode; | 439 GrGLenum fMode; |
440 GrGLint fNumComponents; | 440 GrGLint fNumComponents; |
441 GrGLfloat fCoefficients[9]; | 441 GrGLfloat fCoefficients[9]; |
442 }; | 442 }; |
443 int fHWActiveTexGenUnits; | 443 int fHWActiveTexGenUnits; |
444 SkTArray<TexGenData, true> fHWTexGenSettings; | 444 SkTArray<TexGenData, true> fHWTexGenSettings; |
445 ///@} | 445 ///@} |
446 | 446 |
447 // we record what stencil format worked last time to hopefully exit early | 447 // we record what stencil format worked last time to hopefully exit early |
448 // from our loop that tries stencil formats and calls check fb status. | 448 // from our loop that tries stencil formats and calls check fb status. |
449 int fLastSuccessfulStencilFmtIdx; | 449 int fLastSuccessfulStencilFmtIdx; |
450 | 450 |
451 typedef GrGpu INHERITED; | 451 typedef GrGpu INHERITED; |
452 }; | 452 }; |
453 | 453 |
454 #endif | 454 #endif |
OLD | NEW |