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

Issue 2114993002: GrFP can express distance vector field req., program builder declares variable for it (Closed)

Created:
4 years, 5 months ago by dvonbeck
Modified:
4 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@dvonbeck-bevel-api-change
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

GrFP can express distance vector field req., program builder declares variable for it This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates: - from child FPs to their parent - from parent FPs to the GrPaint - from GrPaint through the PipelineBuilder into GrPipeline - acessed from GrPipeline by GrGLSLProgramBuilder GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method. This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002 Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196 Committed: https://skia.googlesource.com/skia/+/9b03e7b29d963ea333a66dc5353e94f6391eb899

Patch Set 1 #

Patch Set 2 : Added DVF boolean to program descriptor key #

Patch Set 3 : DVF output name now propagates as FSBuilder member #

Patch Set 4 : Fixed compiler error, added code to normalFP that uses distance vector #

Patch Set 5 : rebase #

Total comments: 15

Patch Set 6 : Rebased, addressed some patch 5 comments #

Patch Set 7 : Addressed some patch 5 comments, better default value for vector, fixed GLSL error #

Patch Set 8 : Distance Vector Field code is now emitted only if supported #

Patch Set 9 : Removed DVF from prog builder key, not necessary #

Total comments: 10

Patch Set 10 : Addressed patch 9 comments, guarded onSetData from invalid calls #

Total comments: 6

Patch Set 11 : Addressed patch 10 comments #

Patch Set 12 : Rebase #

Patch Set 13 : Style fix #

Patch Set 14 : Small rebase fix #

Patch Set 15 : Fixed rebase mess #

Patch Set 16 : Rebase #

Patch Set 17 : Quick rebase fix #

Total comments: 4

Patch Set 18 : Addressed patch 17 comments #

Patch Set 19 : Moved GLSLNormalFP base to priv.h header #

Patch Set 20 : rebase #

Patch Set 21 : Fixed GrPaint unintialized bool #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -21 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M gyp/ports.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M include/gpu/GrFragmentProcessor.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -0 lines 0 comments Download
M include/gpu/GrPaint.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +9 lines, -0 lines 0 comments Download
M src/core/SkNormalBevelSource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +9 lines, -5 lines 0 comments Download
M src/core/SkNormalFlatSource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +6 lines, -4 lines 0 comments Download
M src/core/SkNormalMapSource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +6 lines, -4 lines 0 comments Download
M src/core/SkNormalSource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
A src/core/SkNormalSourcePriv.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +57 lines, -0 lines 0 comments Download
M src/gpu/GrFragmentProcessor.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M src/gpu/GrPaint.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrPipeline.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -1 line 0 comments Download
M src/gpu/GrPipeline.cpp View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/gpu/GrPipelineBuilder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -1 line 0 comments Download
M src/gpu/GrPipelineBuilder.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrPrimitiveProcessor.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLFragmentProcessor.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -2 lines 0 comments Download
M src/gpu/glsl/GrGLSLFragmentProcessor.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/glsl/GrGLSLFragmentShaderBuilder.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/glsl/GrGLSLPrimitiveProcessor.h View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -1 line 0 comments Download
M src/gpu/glsl/GrGLSLProgramBuilder.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 42 (21 generated)
dvonbeck
4 years, 5 months ago (2016-07-01 18:51:21 UTC) #3
robertphillips
https://codereview.chromium.org/2114993002/diff/80001/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h File src/gpu/glsl/GrGLSLFragmentShaderBuilder.h (right): https://codereview.chromium.org/2114993002/diff/80001/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h#newcode173 src/gpu/glsl/GrGLSLFragmentShaderBuilder.h:173: const char* fragmentPosition() override; same order as above ? ...
4 years, 5 months ago (2016-07-11 17:55:41 UTC) #4
egdaniel
I think we should also add the code were we pass the string into the ...
4 years, 5 months ago (2016-07-12 13:46:42 UTC) #5
dvonbeck
https://codereview.chromium.org/2114993002/diff/80001/include/gpu/GrPaint.h File include/gpu/GrPaint.h (right): https://codereview.chromium.org/2114993002/diff/80001/include/gpu/GrPaint.h#newcode150 include/gpu/GrPaint.h:150: fUsesDistanceVectorField = paint.fUsesDistanceVectorField; On 2016/07/12 13:46:42, egdaniel wrote: > ...
4 years, 5 months ago (2016-07-13 15:17:13 UTC) #6
egdaniel
https://codereview.chromium.org/2114993002/diff/80001/src/gpu/glsl/GrGLSLProgramBuilder.cpp File src/gpu/glsl/GrGLSLProgramBuilder.cpp (right): https://codereview.chromium.org/2114993002/diff/80001/src/gpu/glsl/GrGLSLProgramBuilder.cpp#newcode92 src/gpu/glsl/GrGLSLProgramBuilder.cpp:92: this->nameVariable(&outputDistanceVectorStr, '\0', "outputDistanceVector"); On 2016/07/13 15:17:13, dvonbeck wrote: > ...
4 years, 5 months ago (2016-07-13 15:47:02 UTC) #7
dvonbeck
https://codereview.chromium.org/2114993002/diff/80001/src/gpu/glsl/GrGLSLProgramBuilder.cpp File src/gpu/glsl/GrGLSLProgramBuilder.cpp (right): https://codereview.chromium.org/2114993002/diff/80001/src/gpu/glsl/GrGLSLProgramBuilder.cpp#newcode92 src/gpu/glsl/GrGLSLProgramBuilder.cpp:92: this->nameVariable(&outputDistanceVectorStr, '\0', "outputDistanceVector"); On 2016/07/13 15:47:02, egdaniel wrote: > ...
4 years, 5 months ago (2016-07-13 16:57:49 UTC) #8
dvonbeck
Removed DVF boolean from key. Added a boolean to Primitive Processor that exposes if they ...
4 years, 5 months ago (2016-07-13 19:07:15 UTC) #9
egdaniel
I still would like you to add a const char* distanceVectorName to GP EmitArgs struct. ...
4 years, 5 months ago (2016-07-13 19:27:27 UTC) #10
dvonbeck
https://codereview.chromium.org/2114993002/diff/160001/src/core/SkNormalSource.cpp File src/core/SkNormalSource.cpp (right): https://codereview.chromium.org/2114993002/diff/160001/src/core/SkNormalSource.cpp#newcode33 src/core/SkNormalSource.cpp:33: // vector but the GP doesn't provide it. On ...
4 years, 5 months ago (2016-07-13 21:28:15 UTC) #11
egdaniel
https://codereview.chromium.org/2114993002/diff/180001/src/core/SkNormalSource.cpp File src/core/SkNormalSource.cpp (right): https://codereview.chromium.org/2114993002/diff/180001/src/core/SkNormalSource.cpp#newcode42 src/core/SkNormalSource.cpp:42: void emitCode(EmitArgs& args) override { lets mark emitCode and ...
4 years, 5 months ago (2016-07-14 02:47:47 UTC) #13
dvonbeck
https://codereview.chromium.org/2114993002/diff/180001/src/core/SkNormalSource.cpp File src/core/SkNormalSource.cpp (right): https://codereview.chromium.org/2114993002/diff/180001/src/core/SkNormalSource.cpp#newcode42 src/core/SkNormalSource.cpp:42: void emitCode(EmitArgs& args) override { On 2016/07/14 02:47:46, egdaniel ...
4 years, 5 months ago (2016-07-14 13:40:34 UTC) #14
egdaniel
lgtm with the two nits https://codereview.chromium.org/2114993002/diff/310001/src/gpu/GrPipeline.h File src/gpu/GrPipeline.h (right): https://codereview.chromium.org/2114993002/diff/310001/src/gpu/GrPipeline.h#newcode170 src/gpu/GrPipeline.h:170: extra \n https://codereview.chromium.org/2114993002/diff/310001/src/gpu/GrPipelineBuilder.h File ...
4 years, 4 months ago (2016-07-26 13:48:25 UTC) #15
dvonbeck
https://codereview.chromium.org/2114993002/diff/310001/src/gpu/GrPipeline.h File src/gpu/GrPipeline.h (right): https://codereview.chromium.org/2114993002/diff/310001/src/gpu/GrPipeline.h#newcode170 src/gpu/GrPipeline.h:170: On 2016/07/26 13:48:24, egdaniel wrote: > extra \n Done. ...
4 years, 4 months ago (2016-07-26 14:38:27 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2114993002/370001
4 years, 4 months ago (2016-07-28 17:20:39 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on master.client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/11864)
4 years, 4 months ago (2016-07-28 17:22:10 UTC) #25
bsalomon
lgtm
4 years, 4 months ago (2016-07-29 16:30:27 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2114993002/370001
4 years, 4 months ago (2016-07-29 16:32:23 UTC) #29
commit-bot: I haz the power
Committed patchset #20 (id:370001) as https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196
4 years, 4 months ago (2016-07-29 16:54:00 UTC) #31
mtklein
A revert of this CL (patchset #20 id:370001) has been created in https://codereview.chromium.org/2201613002/ by mtklein@google.com. ...
4 years, 4 months ago (2016-07-30 19:41:18 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2114993002/390001
4 years, 4 months ago (2016-08-01 17:56:49 UTC) #40
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 18:02:00 UTC) #42
Message was sent while issue was closed.
Committed patchset #21 (id:390001) as
https://skia.googlesource.com/skia/+/9b03e7b29d963ea333a66dc5353e94f6391eb899

Powered by Google App Engine
This is Rietveld 408576698