diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-18 20:34:00 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-18 20:34:00 +0000 |
commit | dd1be60702b3622f49d97651e31d13eaf2175cf8 (patch) | |
tree | ac2d2b26d2c9f6054acefd627efb64d6f1c93c09 /include | |
parent | 376cd1f919cf79dd4f481da063bdd6b656df4279 (diff) |
Pull xfer mode test out of generic draw-as-hairline test. Use coverage rather than alpha to draw hairlines < 1pix wide in GPU.
Review URL: http://codereview.appspot.com/5528112/
git-svn-id: http://skia.googlecode.com/svn/trunk@3070 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrPaint.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h index f1d74b2860..9f220e07a8 100644 --- a/include/gpu/GrPaint.h +++ b/include/gpu/GrPaint.h @@ -36,6 +36,7 @@ public: bool fColorMatrixEnabled; GrColor fColor; + uint8_t fCoverage; GrColor fColorFilterColor; SkXfermode::Mode fColorFilterXfermode; @@ -126,6 +127,7 @@ public: fDither = paint.fDither; fColor = paint.fColor; + fCoverage = paint.fCoverage; fColorFilterColor = paint.fColorFilterColor; fColorFilterXfermode = paint.fColorFilterXfermode; @@ -161,6 +163,7 @@ public: this->resetBlend(); this->resetOptions(); this->resetColor(); + this->resetCoverage(); this->resetTextures(); this->resetColorFilter(); this->resetMasks(); @@ -242,6 +245,10 @@ private: fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); } + void resetCoverage() { + fCoverage = 0xff; + } + void resetTextures() { for (int i = 0; i < kMaxTextures; ++i) { this->setTexture(i, NULL); |