aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-03-08 15:54:01 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-08 15:54:12 +0000
commitfe462efbcb105914e4c4bbf689525b530a438773 (patch)
treeb0cdff09f2988f61e7490cfb25621b4505c9119e /samplecode
parent4997e14c80f133ad43ce17e7b6adab55a37b9ada (diff)
Revert "ccpr: Simplify triangle corners"
This reverts commit 622650a1949f9a68793ac895d9fbadee7177d860. Reason for revert: Going to try to improve AAA quality on curve corners Original change's description: > ccpr: Simplify triangle corners > > Modifies triangle corner shaders to just approximate their coverage with > linear values that ramp to zero at bloat vertices outside the triangle. > > For the vertex backend, since corners now have the same fragment shader > as the rest of the triangle, we fold them in with the other steps and > draw triangles in a single pass. > > The geometry backend still draws triangles in two passes, as there is > not an apparent performance advantage in combining them. > > Bug: skia: > Change-Id: Ib4a89d793a3c706f734d0271875c8a3e5c87c49b > Reviewed-on: https://skia-review.googlesource.com/112632 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: I45e7b9d7d7f8452b28bd54ca1e90a1f046cb2462 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/113180 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleCCPRGeometry.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp
index 272c59fbff..2a7d6640a6 100644
--- a/samplecode/SampleCCPRGeometry.cpp
+++ b/samplecode/SampleCCPRGeometry.cpp
@@ -280,7 +280,7 @@ void CCPRGeometryView::Op::onExecute(GrOpFlushState* state) {
if (!mesh.empty()) {
SkASSERT(1 == mesh.count());
- proc.draw(state, pipeline, mesh.begin(), nullptr, 1, this->bounds());
+ state->rtCommandBuffer()->draw(pipeline, proc, mesh.begin(), nullptr, 1, this->bounds());
}
if (glGpu) {
@@ -337,7 +337,7 @@ bool CCPRGeometryView::onQuery(SkEvent* evt) {
}
SkUnichar unichar;
if (SampleCode::CharQ(*evt, &unichar)) {
- if (unichar >= '1' && unichar <= '3') {
+ if (unichar >= '1' && unichar <= '4') {
fRenderPass = RenderPass(unichar - '1');
this->updateAndInval();
return true;