Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 1673093002: Use noperspective interpolation for 2D draws (Closed)

Created:
4 years, 10 months ago by Chris Dalton
Modified:
4 years, 10 months ago
Reviewers:
bsalomon, egdaniel
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Use noperspective interpolation for 2D draws Adds a mechanism to notify GrGLSLVaryingHandler that a shader will not emit geometry in perspective. This gives it a chance to use the noperspective keyword if it is supported. Updates the existing processors to notify the varying handler when there is no perspective. Begins using the noperspective keyword in GrGLGpu internal shaders. Web scenes with observable benefit (Pixel C, gpu config): tabl_nofolo.skp 4.62 -> 3.33 ms 28% desk_tigersvg.skp 26.5 -> 24 ms 9% desk_pokemonwiki.skp 16.1 -> 14.9 ms 7% tabl_deviantart.skp 3.97 -> 3.7 ms 7% desk_gws.skp 3.85 -> 3.65 ms 5% Also adds new methods for creating varyings with flat interpolation. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1673093002 Committed: https://skia.googlesource.com/skia/+/c08f196648463d44eb85e17c5815dbf8f709a42a

Patch Set 1 #

Patch Set 2 : Names #

Patch Set 3 : rebase #

Patch Set 4 : formatting #

Total comments: 4

Patch Set 5 : finalize() #

Patch Set 6 : GrShaderBits->GrShaderFlags #

Total comments: 7

Patch Set 7 : #

Total comments: 2

Patch Set 8 : fName -> fVsOut #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -127 lines) Patch
M src/gpu/GrPathProcessor.cpp View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M src/gpu/batches/GrPLSPathRenderer.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 6 chunks +45 lines, -23 lines 0 comments Download
M src/gpu/gl/GrGLVaryingHandler.h View 1 2 3 4 1 chunk +2 lines, -5 lines 0 comments Download
M src/gpu/gl/GrGLVaryingHandler.cpp View 1 2 3 4 1 chunk +8 lines, -2 lines 0 comments Download
M src/gpu/glsl/GrGLSLCaps.h View 4 chunks +12 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLCaps.cpp View 2 chunks +6 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLFragmentShaderBuilder.h View 2 chunks +2 lines, -14 lines 0 comments Download
M src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/glsl/GrGLSLGeometryProcessor.cpp View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLShaderBuilder.h View 2 chunks +14 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLShaderVar.h View 1 2 3 4 5 6 8 chunks +29 lines, -7 lines 0 comments Download
M src/gpu/glsl/GrGLSLVarying.h View 1 2 3 4 5 6 7 4 chunks +62 lines, -20 lines 0 comments Download
M src/gpu/glsl/GrGLSLVarying.cpp View 1 2 3 4 5 6 7 3 chunks +76 lines, -52 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 18 (4 generated)
Chris Dalton
4 years, 10 months ago (2016-02-07 23:13:38 UTC) #3
egdaniel
just some quick first pass thoughts https://codereview.chromium.org/1673093002/diff/60001/src/gpu/glsl/GrGLSLVarying.cpp File src/gpu/glsl/GrGLSLVarying.cpp (right): https://codereview.chromium.org/1673093002/diff/60001/src/gpu/glsl/GrGLSLVarying.cpp#newcode28 src/gpu/glsl/GrGLSLVarying.cpp:28: fVaryingShaderVars[i].addModifier("noperspective"); I recently ...
4 years, 10 months ago (2016-02-10 14:23:44 UTC) #4
Chris Dalton
Quick responses inline https://codereview.chromium.org/1673093002/diff/60001/src/gpu/glsl/GrGLSLVarying.cpp File src/gpu/glsl/GrGLSLVarying.cpp (right): https://codereview.chromium.org/1673093002/diff/60001/src/gpu/glsl/GrGLSLVarying.cpp#newcode28 src/gpu/glsl/GrGLSLVarying.cpp:28: fVaryingShaderVars[i].addModifier("noperspective"); On 2016/02/10 14:23:44, egdaniel wrote: ...
4 years, 10 months ago (2016-02-10 15:29:30 UTC) #5
Chris Dalton
With the finalize() method I ended up being able to rework this into something I ...
4 years, 10 months ago (2016-02-11 19:15:31 UTC) #6
egdaniel
https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLShaderVar.h File src/gpu/glsl/GrGLSLShaderVar.h (right): https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLShaderVar.h#newcode158 src/gpu/glsl/GrGLSLShaderVar.h:158: fExtraModifiers.appendf("%s ", modifier); to be safe should be have ...
4 years, 10 months ago (2016-02-12 03:55:07 UTC) #7
Chris Dalton
https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLShaderVar.h File src/gpu/glsl/GrGLSLShaderVar.h (right): https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLShaderVar.h#newcode158 src/gpu/glsl/GrGLSLShaderVar.h:158: fExtraModifiers.appendf("%s ", modifier); On 2016/02/12 03:55:07, egdaniel wrote: > ...
4 years, 10 months ago (2016-02-12 16:25:28 UTC) #8
egdaniel
https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLVarying.cpp File src/gpu/glsl/GrGLSLVarying.cpp (right): https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLVarying.cpp#newcode48 src/gpu/glsl/GrGLSLVarying.cpp:48: VaryingInfo& v = fVaryings.push_back(); On 2016/02/12 16:25:28, Chris Dalton ...
4 years, 10 months ago (2016-02-12 16:33:58 UTC) #9
Chris Dalton
On 2016/02/12 16:33:58, egdaniel wrote: > https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLVarying.cpp > File src/gpu/glsl/GrGLSLVarying.cpp (right): > > https://codereview.chromium.org/1673093002/diff/100001/src/gpu/glsl/GrGLSLVarying.cpp#newcode48 > ...
4 years, 10 months ago (2016-02-12 17:14:21 UTC) #10
egdaniel
On 2016/02/12 17:14:21, Chris Dalton wrote: > On 2016/02/12 16:33:58, egdaniel wrote: > > > ...
4 years, 10 months ago (2016-02-12 18:46:53 UTC) #11
egdaniel
just one more nit and we should be good to go https://codereview.chromium.org/1673093002/diff/120001/src/gpu/glsl/GrGLSLVarying.h File src/gpu/glsl/GrGLSLVarying.h (right): ...
4 years, 10 months ago (2016-02-12 18:53:07 UTC) #12
Chris Dalton
https://codereview.chromium.org/1673093002/diff/120001/src/gpu/glsl/GrGLSLVarying.h File src/gpu/glsl/GrGLSLVarying.h (right): https://codereview.chromium.org/1673093002/diff/120001/src/gpu/glsl/GrGLSLVarying.h#newcode149 src/gpu/glsl/GrGLSLVarying.h:149: SkString fName; On 2016/02/12 18:53:06, egdaniel wrote: > I ...
4 years, 10 months ago (2016-02-12 19:35:03 UTC) #13
egdaniel
lgtm
4 years, 10 months ago (2016-02-12 19:39:25 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673093002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673093002/140001
4 years, 10 months ago (2016-02-12 19:40:54 UTC) #16
commit-bot: I haz the power
4 years, 10 months ago (2016-02-12 20:14:09 UTC) #18
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://skia.googlesource.com/skia/+/c08f196648463d44eb85e17c5815dbf8f709a42a

Powered by Google App Engine
This is Rietveld 408576698