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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 virtual bool onWriteTexturePixels(GrTexture* texture, | 139 virtual bool onWriteTexturePixels(GrTexture* texture, |
140 int left, int top, int width, int height, | 140 int left, int top, int width, int height, |
141 GrPixelConfig config, const void* buffer, | 141 GrPixelConfig config, const void* buffer, |
142 size_t rowBytes) SK_OVERRIDE; | 142 size_t rowBytes) SK_OVERRIDE; |
143 | 143 |
144 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 144 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
145 | 145 |
146 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; | 146 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; |
147 | 147 |
148 virtual void setStencilPathSettings(const GrPath&, | 148 |
149 SkPath::FillType, | 149 const GrStencilSettings& getStencilPathSettings(const GrPath&, SkPath::FillT
ype fill) SK_OVERRIDE; |
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 onGpuDrawPath(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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 void invalidate() { | 419 void invalidate() { |
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; |
| 429 GrStencilSettings fHWStencilPathSettings; |
430 TriState fHWStencilTestEnabled; | 430 TriState fHWStencilTestEnabled; |
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[6]; | 441 GrGLfloat fCoefficients[6]; |
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 |