aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLPathRendering.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-07-27 12:38:35 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-27 19:04:46 +0000
commit49d14e98fe43fdff818e7571c1a61cd5045fedc0 (patch)
tree18d48cd1922c646b6dafa851fbe214c8904aef87 /src/gpu/gl/GrGLPathRendering.cpp
parentf4f6bbfadac327619a3832acad9c8afe06629b55 (diff)
sksl: Add a "sk_Clockwise" built-in
This allows us to identify clockwise-winding triangles, in terms of Skia device space, in all backends and with all render target origins. Bug: skia: Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21 Reviewed-on: https://skia-review.googlesource.com/142662 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLPathRendering.cpp')
-rw-r--r--src/gpu/gl/GrGLPathRendering.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 85c129f8b0..8a53f88b2c 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -88,11 +88,12 @@ void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath*
gpu->flushColorWrite(false);
GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(args.fProxy->priv().peekRenderTarget());
+ GrSurfaceOrigin origin = args.fProxy->origin();
SkISize size = SkISize::Make(rt->width(), rt->height());
- this->setProjectionMatrix(*args.fViewMatrix, size, args.fProxy->origin());
- gpu->flushScissor(*args.fScissor, rt->getViewport(), args.fProxy->origin());
+ this->setProjectionMatrix(*args.fViewMatrix, size, origin);
+ gpu->flushScissor(*args.fScissor, rt->getViewport(), origin);
gpu->flushHWAAState(rt, args.fUseHWAA, true);
- gpu->flushRenderTarget(rt);
+ gpu->flushRenderTarget(rt, origin);
const GrGLPath* glPath = static_cast<const GrGLPath*>(path);