aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawState.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-08 06:19:34 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-08 06:19:34 +0000
commit44fb865e81a57e0c72de3109d0ed5ea428aa1f44 (patch)
tree9c36c63c21da3c154e4e62b48a8d61d4f17c179a /src/gpu/GrDrawState.h
parent0d3341c2db1238b086d11019d44e293ceecc9fcc (diff)
Do not apply hairline optimization for paths if nv_path_rendering is used
Do not convert thin, non-hairline paths to hairline paths if nv_path_rendering is used. The current nv_path_rendering implementation does not render hairlines. Rendering the hairlines with normal renderers cause unneccessary gl program changes, which is quite slow. Changes the behavior of non-nv_path_rendering paths to always perform the optimization if the shape ends up being painted by the path-drawing code (GrContext::drawPathInternal). Previously the optimization was applied only when callgraph started with SkCanvas::drawPath. This changes drawlooper_msaa4, dashing3_msaa4 and dashing3_gpu R=bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/38573007 git-svn-id: http://skia.googlecode.com/svn/trunk@12185 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawState.h')
-rw-r--r--src/gpu/GrDrawState.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 2e4d7f86c4..3de0b12e85 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -311,15 +311,11 @@ public:
fCommon.fCoverage = GrColorPackRGBA(coverage, coverage, coverage, coverage);
}
- /**
- * Version of above that specifies 4 channel per-vertex color. The value
- * should be premultiplied.
- */
- void setCoverage4(GrColor coverage) {
- fCommon.fCoverage = coverage;
+ uint8_t getCoverage() const {
+ return GrColorUnpackR(fCommon.fCoverage);
}
- GrColor getCoverage() const {
+ GrColor getCoverageColor() const {
return fCommon.fCoverage;
}