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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 const SkISize& renderTargetSize, | 43 const SkISize& renderTargetSize, |
44 GrSurfaceOrigin renderTargetOrigin); | 44 GrSurfaceOrigin renderTargetOrigin); |
45 enum TexGenComponents { | 45 enum TexGenComponents { |
46 kS_TexGenComponents = 1, | 46 kS_TexGenComponents = 1, |
47 kST_TexGenComponents = 2, | 47 kST_TexGenComponents = 2, |
48 kSTR_TexGenComponents = 3 | 48 kSTR_TexGenComponents = 3 |
49 }; | 49 }; |
50 void enableTexGen(int unitIdx, TexGenComponents, const GrGLfloat* coefficien
ts); | 50 void enableTexGen(int unitIdx, TexGenComponents, const GrGLfloat* coefficien
ts); |
51 void enableTexGen(int unitIdx, TexGenComponents, const SkMatrix& matrix); | 51 void enableTexGen(int unitIdx, TexGenComponents, const SkMatrix& matrix); |
52 void disableUnusedTexGen(int numUsedTexCoordSets); | 52 void disableUnusedTexGen(int numUsedTexCoordSets); |
| 53 bool shouldUseFixedFunctionTexturing() const { |
| 54 return this->glCaps().fixedFunctionSupport() && |
| 55 this->glCaps().pathRenderingSupport(); |
| 56 } |
53 | 57 |
54 bool programUnitTest(int maxStages); | 58 bool programUnitTest(int maxStages); |
55 | 59 |
56 // GrGpu overrides | 60 // GrGpu overrides |
57 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, | 61 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, |
58 GrPixelConfig surfaceConfig)
const SK_OVERRIDE; | 62 GrPixelConfig surfaceConfig)
const SK_OVERRIDE; |
59 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, | 63 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, |
60 GrPixelConfig surfaceConfig
) const SK_OVERRIDE; | 64 GrPixelConfig surfaceConfig
) const SK_OVERRIDE; |
61 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig
) const SK_OVERRIDE; | 65 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig
) const SK_OVERRIDE; |
62 virtual bool readPixelsWillPayForYFlip( | 66 virtual bool readPixelsWillPayForYFlip( |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 ///@} | 450 ///@} |
447 | 451 |
448 // we record what stencil format worked last time to hopefully exit early | 452 // we record what stencil format worked last time to hopefully exit early |
449 // from our loop that tries stencil formats and calls check fb status. | 453 // from our loop that tries stencil formats and calls check fb status. |
450 int fLastSuccessfulStencilFmtIdx; | 454 int fLastSuccessfulStencilFmtIdx; |
451 | 455 |
452 typedef GrGpu INHERITED; | 456 typedef GrGpu INHERITED; |
453 }; | 457 }; |
454 | 458 |
455 #endif | 459 #endif |
OLD | NEW |