diff options
Diffstat (limited to 'include/gpu/GrPaint.h')
-rw-r--r-- | include/gpu/GrPaint.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h index 729f6f060e..3c8c47afe4 100644 --- a/include/gpu/GrPaint.h +++ b/include/gpu/GrPaint.h @@ -64,6 +64,12 @@ public: return fTextureSamplers[i]; } + bool isTextureStageEnabled(int i) const { + GrAssert((unsigned)i < kMaxTextures); + return (NULL != fTextures[i]) || + (NULL != fTextureSamplers[i].getCustomStage()); + } + // The mask can be alpha-only or per channel. It is applied // after the colorfilter void setMask(int i, GrTexture* mask) { @@ -90,6 +96,12 @@ public: return fMaskSamplers[i]; } + bool isMaskStageEnabled(int i) const { + GrAssert((unsigned)i < kMaxTextures); + return (NULL != fMaskTextures[i]) || + (NULL != fMaskSamplers[i].getCustomStage()); + } + // pre-concats sampler matrices for non-NULL textures and masks void preConcatActiveSamplerMatrices(const GrMatrix& matrix) { for (int i = 0; i < kMaxTextures; ++i) { |