aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCPathProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-01-19 15:56:07 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-20 02:02:14 +0000
commitfaca00d9936fe74ddb0747625207ce534e8cf3fe (patch)
treed23fb7d0b2d04b04018149b9004d4a8fa50855f6 /src/gpu/ccpr/GrCCPathProcessor.cpp
parent36591e5ffe263fcab5c43456d7328da2bf9addb1 (diff)
ccpr: Unblacklist Mali
Bug: skia: Change-Id: Ib0428f556d1fc22ffaa476279854847d0efc7747 Reviewed-on: https://skia-review.googlesource.com/96956 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/ccpr/GrCCPathProcessor.cpp')
-rw-r--r--src/gpu/ccpr/GrCCPathProcessor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/ccpr/GrCCPathProcessor.cpp b/src/gpu/ccpr/GrCCPathProcessor.cpp
index 66005f13c2..568ceb7c69 100644
--- a/src/gpu/ccpr/GrCCPathProcessor.cpp
+++ b/src/gpu/ccpr/GrCCPathProcessor.cpp
@@ -154,14 +154,14 @@ void GLSLPathProcessor::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
// N[0] is the normal for the edge we are intersecting from the regular bounding box, pointing
// out of the octagon.
- v->codeAppendf("float2 refpt = (min(N[0].x, N[0].y) < 0) ? %s.xy : %s.zw;",
+ v->codeAppendf("float2 refpt = float2[2](%s.xy, %s.zw)[sk_VertexID >> 2];",
proc.getInstanceAttrib(InstanceAttribs::kDevBounds).fName,
proc.getInstanceAttrib(InstanceAttribs::kDevBounds).fName);
v->codeAppendf("refpt += N[0] * %f;", kAABloatRadius); // bloat for AA.
// N[1] is the normal for the edge we are intersecting from the 45-degree bounding box, pointing
// out of the octagon.
- v->codeAppendf("float2 refpt45 = (N[1].x < 0) ? %s.xy : %s.zw;",
+ v->codeAppendf("float2 refpt45 = float2[2](%s.xy, %s.zw)[((sk_VertexID + 1) >> 2) & 1];",
proc.getInstanceAttrib(InstanceAttribs::kDevBounds45).fName,
proc.getInstanceAttrib(InstanceAttribs::kDevBounds45).fName);
v->codeAppendf("refpt45 *= float2x2(.5,.5,-.5,.5);"); // transform back to device space.