History log of /external/skia/src/gpu/gl/GrGLProgramDesc.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e9c0fc616d2a1632c285885b9b656b68ca8d4f24 29-Apr-2015 jvanverth <jvanverth@google.com> Pull out shader-specific caps into GrShaderCaps and GrGLSLCaps

BUG=skia:

Review URL: https://codereview.chromium.org/1116713002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
cfc18867d982119d9dc2888bf09f1093012daadd 28-Apr-2015 jvanverth <jvanverth@google.com> Use GLSLCaps for creating processor keys and GLSL-specific programs

Effectively all this does is future-proof any GLSL-specific code, as
GLSLCaps is just a typedef of GLCaps.

BUG=skia:

Review URL: https://codereview.chromium.org/1109863004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
d79c549467e5e7be025e38357f179b7965ed2ec3 27-Apr-2015 bsalomon <bsalomon@google.com> Make non-AA hairline stroke rects snap to pixels centers so they close.

BUG=skia:3717

Review URL: https://codereview.chromium.org/1101663007
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
d1e72875d195685e8dc45d3f065a05ff49da8ce3 20-Apr-2015 jvanverth <jvanverth@google.com> Minor modifications to GrProgramDesc.h.

BUG=skia:

Review URL: https://codereview.chromium.org/1100483003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
6be6f7cb66b277e7b1ce13d09b635fb8e09a2f68 26-Feb-2015 bsalomon <bsalomon@google.com> Cleanup in GrPipelineBuilder

Review URL: https://codereview.chromium.org/956363003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
50785a3d10b53bea5beb6e18431a2449860be237 06-Feb-2015 bsalomon <bsalomon@google.com> Revert of Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #1 id:1 of https://codereview.chromium.org/901663007/)

Reason for revert:
The revert didn't help the 10.9 bot. Unreverting by reverting the revert (which is basically relanding the original patch which itself was a revert of a revert). Revert.

Original issue's description:
> Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/)
>
> Reason for revert:
> Testing to see if reverting fixes 10.9 bots.
>
> Original issue's description:
> > Move DstCopy on gpu into the GrXferProcessor.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
> >
> > Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69
>
> TBR=joshualitt@google.com,egdaniel@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/21b2c53218ab25f4268e3992e51d916076a2a7ee

TBR=joshualitt@google.com,egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/873723009
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
21b2c53218ab25f4268e3992e51d916076a2a7ee 05-Feb-2015 bsalomon <bsalomon@google.com> Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/)

Reason for revert:
Testing to see if reverting fixes 10.9 bots.

Original issue's description:
> Move DstCopy on gpu into the GrXferProcessor.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
>
> Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69

TBR=joshualitt@google.com,egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/901663007
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
5e1378d0e075a323144ba14e0a4cbcca35eccc69 05-Feb-2015 egdaniel <egdaniel@google.com> Move DstCopy on gpu into the GrXferProcessor.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c

Review URL: https://codereview.chromium.org/885923002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
4dce32c46675efb901618161771d450241af4307 04-Feb-2015 egdaniel <egdaniel@google.com> Revert "Move DstCopy on gpu into the GrXferProcessor."

This reverts commit 74a11753604768bf461b80cabb66060e8564d82c.

TBR=joshualitt@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd

Review URL: https://codereview.chromium.org/896163003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
7adb35559430303a25be37f21af56c0df6c62f2b 04-Feb-2015 egdaniel <egdaniel@google.com> Revert of Revert "Move DstCopy on gpu into the GrXferProcessor." (patchset #1 id:1 of https://codereview.chromium.org/896163003/)

Reason for revert:
failed on my manual revert

Original issue's description:
> Revert "Move DstCopy on gpu into the GrXferProcessor."
>
> This reverts commit 74a11753604768bf461b80cabb66060e8564d82c.
>
> TBR=joshualitt@google.com,bsalomon@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/900913002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd 04-Feb-2015 egdaniel <egdaniel@google.com> Revert "Move DstCopy on gpu into the GrXferProcessor."

This reverts commit 74a11753604768bf461b80cabb66060e8564d82c.

TBR=joshualitt@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/896163003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
74a11753604768bf461b80cabb66060e8564d82c 04-Feb-2015 egdaniel <egdaniel@google.com> Move DstCopy on gpu into the GrXferProcessor.

BUG=skia:

Review URL: https://codereview.chromium.org/885923002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
8dd688b7569df569a672a8a67b2db86a9d376cfc 22-Jan-2015 egdaniel <egdaniel@google.com> Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder

BUG=skia:

Review URL: https://codereview.chromium.org/858343002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
17e7314e0e3085ec6021997d7c0593c339ba6a2e 21-Jan-2015 joshualitt <joshualitt@chromium.org> remove drawtype

BUG=skia:

Review URL: https://codereview.chromium.org/862933005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
873ad0e0b4d67bdc7bad025018f597450e7004c6 20-Jan-2015 joshualitt <joshualitt@chromium.org> BUG=skia:

Review URL: https://codereview.chromium.org/815643005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
71c9260e6fa1798ad1e41b2c2ae9b3cce08bb610 14-Jan-2015 joshualitt <joshualitt@chromium.org> More changes to bring together path / geo procs

BUG=skia:

Review URL: https://codereview.chromium.org/820783005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
abb52a1a70a81915c6196e0fb3e9bcb05e8be14d 14-Jan-2015 joshualitt <joshualitt@chromium.org> Move most of the transform logic into the primitive processors

BUG=skia:

Review URL: https://codereview.chromium.org/822423004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
40d4bd8dafe9ed844f29a3de3d8965672248ee73 29-Dec-2014 joshualitt <joshualitt@chromium.org> removing coord change matrices

BUG=skia:

Review URL: https://codereview.chromium.org/821243003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
39edf7664f50b6c890b933b5bbed67a8735b349b 22-Dec-2014 jvanverth <jvanverth@google.com> Rename GrGpuGL -> GrGLGpu

Review URL: https://codereview.chromium.org/824753002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
16b278989532ee9f9a38e3eb4754b228ff495cb8 18-Dec-2014 joshualitt <joshualitt@chromium.org> Change to create device coord coordset

BUG=skia:

Review URL: https://codereview.chromium.org/812063002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
861e1037017bbb7ac52ec5ebecab3a636a82a3e8 16-Dec-2014 bsalomon <bsalomon@google.com> Rename GrGpuGL to GrGLGpu for consistency

Review URL: https://codereview.chromium.org/808593003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
9b98932adaceb7ad0a617ade16616923f6bffe84 15-Dec-2014 joshualitt <joshualitt@chromium.org> This change will ultimately pull uniform color, and to a much lesser degree uniform coverage, into GPs. There are still some loose ends because drawstate has the ability to override the GP, but fixing these cleanly will have to wait until we have deferred geometry in place and can make attribute / uniform decisions on the fly.

BUG=skia:

Review URL: https://codereview.chromium.org/746423007
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c230414861558ce20b74281b1ca363e56c441832 11-Dec-2014 egdaniel <egdaniel@google.com> Create xfer processor backend.

This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904

Review URL: https://codereview.chromium.org/764643004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
294738268d3a9317282224f03063eb38ad19717c 11-Dec-2014 joshualitt <joshualitt@google.com> Revert of Create xfer processor backend. (patchset #6 id:100001 of https://codereview.chromium.org/764643004/)

Reason for revert:
CL breaks windows DM

Original issue's description:
> Create xfer processor backend.
>
> This includes:
> -Having an actual XP stage at the end of the gl pipeline.
> -All Blending work is handled by XP until actually setting GL blend states
> -GLPrograms test to test XP
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904

TBR=bsalomon@google.com,joshualitt@chromium.org,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/789343002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
4dffc940c430eec66d4707490eace19c9b3f7904 10-Dec-2014 egdaniel <egdaniel@google.com> Create xfer processor backend.

This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP

BUG=skia:

Review URL: https://codereview.chromium.org/764643004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c0bd6484f621e4a1033be318b1947a5d32157c13 09-Dec-2014 bsalomon <bsalomon@google.com> Move shader precision out of GrShaderVar

Review URL: https://codereview.chromium.org/777443003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
17168df7798d0d12684f18df0556dc19e65b32e6 09-Dec-2014 bsalomon <bsalomon@google.com> Use texture size to determine precision of texture coord varyings.

Review URL: https://codereview.chromium.org/778783002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9 04-Dec-2014 joshualitt <joshualitt@chromium.org> Remove backend factories

BUG=skia:

Review URL: https://codereview.chromium.org/778453002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
87f48d997ec29e5eeaa7567355775e93465dd60d 04-Dec-2014 joshualitt <joshualitt@chromium.org> create and thread batch tracker object

I remove the factory on the next CL

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294

Review URL: https://codereview.chromium.org/772513002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
dafa4d09cbe66943b2414bdeaa0f6ef7f900dc4a 04-Dec-2014 joshualitt <joshualitt@chromium.org> move program descriptor generation to flush

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/829e1b80b1020b17f2078020c990e079b70c077c

Review URL: https://codereview.chromium.org/777673003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
f78c60c92a8c212fc462262f2ce81e584d0f02f8 04-Dec-2014 joshualitt <joshualitt@google.com> Revert of move program descriptor generation to flush (patchset #7 id:120001 of https://codereview.chromium.org/777673003/)

Reason for revert:
breaking linux build

Original issue's description:
> move program descriptor generation to flush
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/829e1b80b1020b17f2078020c990e079b70c077c

TBR=egdaniel@google.com,bsalomon@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/776243005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
841a6b54c11137e210aa81e8b56e1763c3571cb8 04-Dec-2014 joshualitt <joshualitt@google.com> Revert of create and thread batch tracker object (patchset #9 id:160001 of https://codereview.chromium.org/772513002/)

Reason for revert:
Breaking linux layout test

Original issue's description:
> create and thread batch tracker object
>
> I remove the factory on the next CL
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294

TBR=bsalomon@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/774133003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c3a6eb23483e5d28073b509a5f637f41660de294 04-Dec-2014 joshualitt <joshualitt@chromium.org> create and thread batch tracker object

I remove the factory on the next CL

BUG=skia:

Review URL: https://codereview.chromium.org/772513002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
829e1b80b1020b17f2078020c990e079b70c077c 03-Dec-2014 joshualitt <joshualitt@chromium.org> move program descriptor generation to flush

BUG=skia:

Review URL: https://codereview.chromium.org/777673003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
2dd1ae016d7f297b433c3ea3a771ef8e01657c1f 03-Dec-2014 joshualitt <joshualitt@chromium.org> First step to moving vertex attributes to the geometryProcessor

BUG=skia:

Review URL: https://codereview.chromium.org/761563002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c67870cfc1e854f1b8a4142bcbc52414beb4207d 26-Nov-2014 egdaniel <egdaniel@google.com> Update effect key for descriptor to not record offsets.

BUG=skia:

Review URL: https://codereview.chromium.org/760593005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
9176e2c159089458b1e2226a94fab1af0fba32ac 20-Nov-2014 joshualitt <joshualitt@chromium.org> dstCopy on optdrawstate

BUG=skia:

Review URL: https://codereview.chromium.org/735363003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
ae59b77612c42ff6b793dc33e3d115e6a5db34cc 19-Nov-2014 bsalomon <bsalomon@google.com> Create GrOptDrawState before recording draw in GrInOrderDrawBuffer

Review URL: https://codereview.chromium.org/739673002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
4dd99886420329fcacd72d87f2c46ff2555d0945 11-Nov-2014 joshualitt <joshualitt@chromium.org> remove separate color from coverage

BUG=skia:

Review URL: https://codereview.chromium.org/699023003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
79f8faeea2692d2948c0f634e956d1e7fc8333e0 29-Oct-2014 joshualitt <joshualitt@chromium.org> OptState owns program descriptor

BUG=skia:

Review URL: https://codereview.chromium.org/674543004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
0e602827df086d2bbb215d828d7fdcbbe16e792b 28-Oct-2014 joshualitt <joshualitt@chromium.org> Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

Committed: https://skia.googlesource.com/skia/+/95f5194abce19e8ed875f3495fd16c79a9b931b4

Review URL: https://codereview.chromium.org/678073005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
98102a8f795abbfcb98547ced4a8b72eadbad377 28-Oct-2014 joshualitt <joshualitt@google.com> Revert of Patch to remove constant attributes (patchset #8 id:120002 of https://codereview.chromium.org/678073005/)

Reason for revert:
I'll checkin tonight when the tree is quieter

Original issue's description:
> Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2
>
> Committed: https://skia.googlesource.com/skia/+/95f5194abce19e8ed875f3495fd16c79a9b931b4

TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/683203002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
95f5194abce19e8ed875f3495fd16c79a9b931b4 28-Oct-2014 joshualitt <joshualitt@chromium.org> Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

Review URL: https://codereview.chromium.org/678073005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
9f2825f249110153eba6c5a5713713033696be5c 28-Oct-2014 joshualitt <joshualitt@google.com> Revert of Patch to remove constant attributes (patchset #6 id:100001 of https://codereview.chromium.org/678073005/)

Reason for revert:
Breaks the K1

Original issue's description:
> Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/84c94c0dfd1e12e97d8a835882dda575f36e41d2

TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/679363002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
84c94c0dfd1e12e97d8a835882dda575f36e41d2 27-Oct-2014 joshualitt <joshualitt@chromium.org> Working patch to remove constant attributes. This may cause some gm mismatches, I will rebaseline tonight.

BUG=skia:

Review URL: https://codereview.chromium.org/678073005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
f2765410ba8adfe934b8d92e52ccc2a847934c61 16-Oct-2014 bsalomon <bsalomon@google.com> Last round of effect->processor (for now)

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/659803005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
a5305a110ab5201d5dadd40cbe711582d5ac4996 11-Oct-2014 joshualitt <joshualitt@chromium.org> Opt state takes a GP instead of a GeometryStage

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/71856d520461ae025a0332aa0ce9735a096d9baf

Review URL: https://codereview.chromium.org/637003003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
89c7a2ec3e9f7e1b9705214f450bb12288799da9 10-Oct-2014 joshualitt <joshualitt@chromium.org> Revert of Opt state takes a GP instead of a GeometryStage (patchset #18 id:1500001 of https://codereview.chromium.org/637003003/)

Reason for revert:
Revert because this may be causing a break in a chrome gpu test

Original issue's description:
> Opt state takes a GP instead of a GeometryStage
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/71856d520461ae025a0332aa0ce9735a096d9baf

TBR=bsalomon@google.com,egdaniel@google.com,danakj@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/647183002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
71856d520461ae025a0332aa0ce9735a096d9baf 10-Oct-2014 joshualitt <joshualitt@chromium.org> Opt state takes a GP instead of a GeometryStage

BUG=skia:

Review URL: https://codereview.chromium.org/637003003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
651713408c5a5d9565665967ad09981250c7a8c9 09-Oct-2014 joshualitt <joshualitt@chromium.org> gl programs rewrite

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c

Review URL: https://codereview.chromium.org/628633003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
47bb38283072dc87dc93220cd2f370ca109972ff 08-Oct-2014 joshualitt <joshualitt@chromium.org> Cleanup of shader building system

this is a huge refactor and cleanup of the gl shader building system in
Skia. The entire shader building pipeline is now part of
GrGLProgramCreator, which takes a gp, and some fps, and creates a
program. I added some subclasses of GrGLProgram to handle the
eccentricities of Nvpr/Nvpres. Outside of the builders folder
and GrGLPrograms, this change is basically just a rename

solo gp

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/fe1233c3f12f81bb675718516bbb32f72af726ec

Review URL: https://codereview.chromium.org/611653002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
db0d3ca07008ea2c1f24d0fd9ceecf10af6ae63b 07-Oct-2014 joshualitt <joshualitt@chromium.org> Revert of Cleanup of shader building system (patchset #25 id:470001 of https://codereview.chromium.org/611653002/)

Reason for revert:
Seems to have messed up windows 7 gms

Original issue's description:
> Cleanup of shader building system
>
> this is a huge refactor and cleanup of the gl shader building system in
> Skia. The entire shader building pipeline is now part of
> GrGLProgramCreator, which takes a gp, and some fps, and creates a
> program. I added some subclasses of GrGLProgram to handle the
> eccentricities of Nvpr/Nvpres. Outside of the builders folder
> and GrGLPrograms, this change is basically just a rename
>
>
> solo gp
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/fe1233c3f12f81bb675718516bbb32f72af726ec

TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/635533005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
fe1233c3f12f81bb675718516bbb32f72af726ec 07-Oct-2014 joshualitt <joshualitt@chromium.org> Cleanup of shader building system

this is a huge refactor and cleanup of the gl shader building system in
Skia. The entire shader building pipeline is now part of
GrGLProgramCreator, which takes a gp, and some fps, and creates a
program. I added some subclasses of GrGLProgram to handle the
eccentricities of Nvpr/Nvpres. Outside of the builders folder
and GrGLPrograms, this change is basically just a rename

solo gp

BUG=skia:

Review URL: https://codereview.chromium.org/611653002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
b0a8a377f832c59cee939ad721e1f87d378b7142 23-Sep-2014 joshualitt <joshualitt@chromium.org> Patch to create a distinct geometry processor. The vast majority of this patch
is just a rename. The meat is in GrGeometryProcessor, GrProcessor,
GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory,
GrProcessUnitTestFactory, and the builders

BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/582963002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
cd523ebe2be30f268cdcec2d0b59eba609b9901b 23-Sep-2014 bsalomon <bsalomon@google.com> Use uniform color/coverage inputs when path rendering.

BUG=skia:2954
R=egdaniel@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/600483002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
033ea7f2ad65e567d1812546ef60e55a54ac88df 23-Sep-2014 egdaniel <egdaniel@google.com> Fix inputCoverageIsUsed bug in GrGLProgramDesc

BUG=skia:
R=joshualitt@chromium.org

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/593803003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c06482494d2be6481a3666a66254b6c66890f994 22-Sep-2014 egdaniel <egdaniel@google.com> Calculate Primary and Secondary output types in the GrOptDrawState

Follow up CL to https://codereview.chromium.org/545693004/

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/554833002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
ae444965c43ad16575730ce8e3abdcaded296d94 22-Sep-2014 egdaniel <egdaniel@google.com> Change GrGLProgramDesc header to have DoPathRendering flag instead of RequiresVertexShader

Also update GLProgramTests to fix bug where it would incorrectly try to PathRendering when we did
not want to.

BUG=skia:
R=bsalomon@google.com, joshualitt@chromium.org

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/586793002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
23e280d1f227d94f6b3dfd0b47359cca1569e1b4 18-Sep-2014 joshualitt <joshualitt@chromium.org> Changes to remove program effects builder

BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/551253004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
a7dc0a83f0b59424a61e01bf3435cd7957e84e35 17-Sep-2014 egdaniel <egdaniel@google.com> Calculate stage stats in GrOptDrawState

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/545693004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
170f90b4576f291879371ecd6ae4bc2b1d85c64a 16-Sep-2014 egdaniel <egdaniel@google.com> Attach GrOptDrawState into shader building pipeline

The OptDrawState is now used for creating the actual gl shader. Current
optimizations dones in GrOptDrawState include:
All blend optimizations
Constant color/coverage stage optimizations

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/ee6206572b42fec11f83ad0c1e6d435903640518

R=bsalomon@google.com, joshualitt@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/504203004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
49586bec7383d4ccb81f85f8e2dc4162e2d4f6a8 16-Sep-2014 joshualitt <joshualitt@chromium.org> removing GrDrawEffect

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e

R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/571163002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
8a4c1030ff4b8336b5ac5b0712691e2f65383440 16-Sep-2014 egdaniel <egdaniel@google.com> Revert of Attach GrOptDrawState into shader building pipeline (patchset #11 id:220001 of https://codereview.chromium.org/504203004/)

Reason for revert:
Failing some msaa gm's

Original issue's description:
> Attach GrOptDrawState into shader building pipeline
>
> The OptDrawState is now used for creating the actual gl shader. Current
> optimizations dones in GrOptDrawState include:
> All blend optimizations
> Constant color/coverage stage optimizations
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/ee6206572b42fec11f83ad0c1e6d435903640518

R=bsalomon@google.com, joshualitt@google.com
TBR=bsalomon@google.com, joshualitt@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/560443004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
08da4f22d790cfc51bbeb10b4b84dab49cf0eaec 16-Sep-2014 joshualitt <joshualitt@chromium.org> Revert of removing GrDrawEffect (patchset #4 id:60001 of https://codereview.chromium.org/571163002/)

Reason for revert:
reverting to unblock another revert

Original issue's description:
> removing GrDrawEffect
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/577593003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e 16-Sep-2014 joshualitt <joshualitt@chromium.org> removing GrDrawEffect

BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/571163002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
ee6206572b42fec11f83ad0c1e6d435903640518 16-Sep-2014 egdaniel <egdaniel@google.com> Attach GrOptDrawState into shader building pipeline

The OptDrawState is now used for creating the actual gl shader. Current
optimizations dones in GrOptDrawState include:
All blend optimizations
Constant color/coverage stage optimizations

BUG=skia:
R=bsalomon@google.com, joshualitt@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/504203004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
bd769d0f1c8cf6ccbb2738dfad1624a4c828e4eb 04-Sep-2014 joshualitt <joshualitt@chromium.org> Initial change to create GeometryProcessor

BUG=skia:
R=bsalomon@google.com, robertphillips@google.com, egdaniel@google.com, jvanverth@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/509153002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
842b086a3c876061e1279d47e6009629c9818b03 02-Sep-2014 egdaniel <egdaniel@google.com> When ignoring color input don't use vertex attribs on gpu

Also rename SolidWhite_ColorInput enum to be AllOnes_ColorInput to better reflect what it's use is

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/525433002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
ec56e4545477e30d4f165ca55ed99f90525c6c38 26-Aug-2014 kkinnunen <kkinnunen@nvidia.com> Implement NV_path_rendering on OpenGL ES

Implement support for NV_path_rendering on OpenGL ES. Use
glProgramPathFragmentInputGenNV function call instead of glPathTexGenNV to
communicate transforms to fragment shader.

The intention is that the NVPR paths will be drawn with the same shader program
as non-NVPR geometry. For NVPR calls, the GPU will skip the vertex shader and
just run the fragment shader.

After program is linked, query the locations of the fragment shader inputs with
glGetResourceLocation. The location will be used to set the transforms with
glProgramPathFragmentInputGenNV.

The functions and their workings are documented in:

glProgramPathFragmentInputGenNV
https://www.opengl.org/registry/specs/NV/path_rendering.txt
(note: addition as of API version 1.3)

glGetResourceLocation
https://www.opengl.org/registry/specs/ARB/program_interface_query.txt
http://www.opengl.org/registry/doc/glspec44.core.pdf
(function is in core Open GL 4.4)

Note: glProgramPathFragmentInputGenNV could be used also for OpenGL. However,
using seems to trigger a bug in the driver. Disable this feature on OpenGL at
least until the driver is fixed and released. The bug manifests in shadertext
test, where the lower-left text pair is missing. Valgrind catches a bad read
for the test and causes the context to OOM reproducibly.

R=bsalomon@google.com, cdalton@nvidia.com, joshualitt@google.com, joshualitt@chromium.org

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/367643004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
30ba436f04e61d4505fb854d5fc56079636e0788 22-Aug-2014 joshualitt <joshualitt@chromium.org> Initial refactor of shaderbuilder to prepare for geometry shaders

gitignore for eclipse

BUG=skia:
R=bsalomon@google.com, bsalomon@chromium.org

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/491673002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
02cafcc1bf6e2968c2efdf459871167970da150e 21-Jul-2014 egdaniel <egdaniel@google.com> Remove gpu shader optimatization for solid white or trans black colors

Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.

With optimization in (ms):
White Blue Checkered
Linux ~80 ~80 ~160
N7 ~800 ~1100 ~1500
Moto-e ~830 ~1100 ~2500

Without optimization in (ms):
White Blue Checkered
Linux ~80 ~80 ~80
N7 ~1100 ~1100 ~1100
Moto-e ~1100 ~1100 ~1500

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/5f78d2251a440443c9eaa321dad058d7a32bfef7

R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/375823005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
929f29a5c1bffa7f7c1b5a376351d0762b8ac561 17-Jul-2014 bsalomon <bsalomon@google.com> Makes GrGLProgramDesc's key store the lengths as well as offsets of the effect keys.

Makes it possible to use GrBackendEffectFactories other than GrTBEF by moving meta-key generation out of GrTBEF.

Cleans up docs around GrBackendEffectFactory.

Committed: https://skia.googlesource.com/skia/+/c0ea398aff8254e31152cbb94c9ab6150428e252

R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/379113004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
7940100faec0b758645d40c876e9c796884410f7 16-Jul-2014 mtklein <mtklein@google.com> Revert of Makes GrGLProgramDesc's key store the lengths as well as offsets of the effect keys. (https://codereview.chromium.org/379113004/)

Reason for revert:
Most likely candidate for Valgrind failures:

[21:10:08.755668] ==3036== Use of uninitialised value of size 8
[21:10:08.755753] ==3036== at 0x734AB2: GrGpuGL::ProgramCache::getProgram(GrGLProgramDesc const&, GrEffectStage const**, GrEffectStage const**) (GrGpuGL_program.cpp:107)
[21:10:08.755788] ==3036== by 0x734ED2: GrGpuGL::flushGraphicsState(GrGpu::DrawType, GrDeviceCoordTexture const*) (GrGpuGL_program.cpp:253)
[21:10:08.755811] ==3036== by 0x6E81C2: GrGpu::setupClipAndFlushState(GrGpu::DrawType, GrDeviceCoordTexture const*, GrDrawState::AutoRestoreEffects*, SkRect const*) (GrGpu.cpp:350)
[21:10:08.755837] ==3036== by 0x6E9BE8: GrGpu::onDraw(GrDrawTarget::DrawInfo const&) (GrGpu.cpp:390)
[21:10:08.755858] ==3036== by 0x6EEECE: GrInOrderDrawBuffer::flush() (GrDrawTarget.h:506)
[21:10:08.755879] ==3036== by 0x6D0EB4: GrContext::flush(int) (GrContext.cpp:1327)
[21:10:08.755900] ==3036== by 0x6D3F8F: GrContext::writeTexturePixels(GrTexture*, int, int, int, int, GrPixelConfig, void const*, unsigned long, unsigned int) (GrContext.cpp:1349)
[21:10:08.755922] ==3036== by 0x6D39D7: GrContext::writeRenderTargetPixels(GrRenderTarget*, int, int, int, int, GrPixelConfig, void const*, unsigned long, unsigned int) (GrContext.cpp:1632)
[21:10:08.755949] ==3036== by 0x6FFDF3: GrRenderTarget::writePixels(int, int, int, int, GrPixelConfig, void const*, unsigned long, unsigned int) (GrRenderTarget.cpp:45)
[21:10:08.755978] ==3036== by 0x735563: SkGpuDevice::onWritePixels(SkImageInfo const&, void const*, unsigned long, int, int) (SkGpuDevice.cpp:280)
[21:10:08.756003] ==3036== by 0x57A048: SkBaseDevice::writePixels(SkImageInfo const&, void const*, unsigned long, int, int) (SkDevice.cpp:106)
[21:10:08.756025] ==3036== by 0x56D0AE: SkCanvas::writePixels(SkImageInfo const&, void const*, unsigned long, int, int) (SkCanvas.cpp:700)
[21:10:08.756050] ==3036== by 0x56D156: SkCanvas::writePixels(SkBitmap const&, int, int) (SkCanvas.cpp:652)
[21:10:08.756077] ==3036== by 0x5109B6: test_WritePixels(skiatest::Reporter*, GrContextFactory*) (WritePixelsTest.cpp:464)
[21:10:08.756099] ==3036== by 0x51114C: skiatest::WritePixelsClass::onRun(skiatest::Reporter*) (WritePixelsTest.cpp:361)
[21:10:08.756122] ==3036== by 0x406BE8: skiatest::Test::run() (Test.cpp:107)
[21:10:08.756145] ==3036== by 0x4064C2: SkTestRunnable::run() (skia_test.cpp:109)
[21:10:08.756167] ==3036== by 0x405D1A: tool_main(int, char**) (skia_test.cpp:221)
[21:10:08.756189] ==3036== by 0x405F75: main (skia_test.cpp:239)
[21:10:08.756211] ==3036== Uninitialised value was created by a stack allocation
[21:10:08.756233] ==3036== at 0x734CC8: GrGpuGL::flushGraphicsState(GrGpu::DrawType, GrDeviceCoordTexture const*) (GrGpuGL_program.cpp:213)

Original issue's description:
> Makes GrGLProgramDesc's key store the lengths as well as offsets of the effect keys.
>
> Makes it possible to use GrBackendEffectFactories other than GrTBEF by moving meta-key generation out of GrTBEF.
>
> Cleans up docs around GrBackendEffectFactory.
>
> Committed: https://skia.googlesource.com/skia/+/c0ea398aff8254e31152cbb94c9ab6150428e252

R=robertphillips@google.com, jvanverth@google.com, bsalomon@google.com
TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/394213002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c0ea398aff8254e31152cbb94c9ab6150428e252 16-Jul-2014 bsalomon <bsalomon@google.com> Makes GrGLProgramDesc's key store the lengths as well as offsets of the effect keys.

Makes it possible to use GrBackendEffectFactories other than GrTBEF by moving meta-key generation out of GrTBEF.

Cleans up docs around GrBackendEffectFactory.

R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/379113004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
848faf00ec33d39ab3e31e9a11d805cae6ac6562 11-Jul-2014 bsalomon <bsalomon@google.com> This moves us towards variable length effect keys. The overall program key now allows for it. After the header it stores an array of offsets to effect keys. This allows us to grab the effect keys to pass to effects when they generate code. It also ensures that we can't get a collision by sets of keys that are different lengths but are the same when appended together.

R=robertphillips@google.com, jvanverth@google.com, egdaniel@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/356513003
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c855ca0c9408d2a218655a138fab9cc18a2b3940 11-Jul-2014 egdaniel <egdaniel@google.com> Revert of Remove gpu shader optimatization for solid white or trans black colors (https://codereview.chromium.org/375823005/)

Reason for revert:
possible test and gm failures

Original issue's description:
> Remove gpu shader optimatization for solid white or trans black colors
>
> Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.
>
> With optimization in (ms):
> White Blue Checkered
> Linux ~80 ~80 ~160
> N7 ~800 ~1100 ~1500
> Moto-e ~830 ~1100 ~2500
>
> Without optimization in (ms):
> White Blue Checkered
> Linux ~80 ~80 ~80
> N7 ~1100 ~1100 ~1100
> Moto-e ~1100 ~1100 ~1500
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5f78d2251a440443c9eaa321dad058d7a32bfef7

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/385163004
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
5f78d2251a440443c9eaa321dad058d7a32bfef7 11-Jul-2014 egdaniel <egdaniel@google.com> Remove gpu shader optimatization for solid white or trans black colors

Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.

With optimization in (ms):
White Blue Checkered
Linux ~80 ~80 ~160
N7 ~800 ~1100 ~1500
Moto-e ~830 ~1100 ~2500

Without optimization in (ms):
White Blue Checkered
Linux ~80 ~80 ~80
N7 ~1100 ~1100 ~1100
Moto-e ~1100 ~1100 ~1500

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/375823005
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
f99f884cd82528684779e40413f1ceaf277dad2d 07-Jul-2014 bsalomon <bsalomon@google.com> Remove use of GrEffectRef from draw state and below.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/372773002
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
0a6fe71f1bc0e601b41b7ae6d28b8c96a2c41116 23-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Use fixed function pipeline only when drawing paths

Use fixed function pipeline only when drawing paths. Previously FF
vertex shader was used when drawing normal geometry if path rendering
was enabled.

This is required to make Chromium integration easier. This way
fixed function vertex shading, including vertexshader-less programs,
need not be implemented in the Chromium command buffer.

Removes FF TexGen functionality, as it is not used anymore. Likewise
removes the fixedFunctionSupport GL capability flag.

BUG=chromium:344330
R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/212753002

git-svn-id: http://skia.googlecode.com/svn/trunk@14334 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
8a13588b6f41ba892bcf6e8ceef6b449c4a5d83d 05-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Stop discarding in frag shader when coverage is zero and stencil writes are enabled

This fixes the corruption in the NVPR images here:
http://108.170.217.252:10117/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/251/steps/CompareGMs/logs/stdio

caused by:

https://skia.googlesource.com/skia.git/+/65ee5f424cb4dabd453268902c00086605d77c1d

The stencil path step writes inside and outside the clip when the clip is implemented by
a coverage effect. The path cover step then doesn't write outside of the clip because the FS
discards. This leaves stencil values outside of the clip non-zero which messed up subsequent
path or clip draws to those samples.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/154623002

git-svn-id: http://skia.googlecode.com/svn/trunk@13320 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
e0a868c84ebc34c5a16b5faa1546016abb9ca0ac 22-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Apply hairline optimization only if the path renderer wants it

Make the decision to convert thin, non-hairline paths to hairline
paths at the renderer level.

The current nv_path_rendering implementation does not render
hairlines. Rendering the hairlines with normal renderers cause
unneccessary gl program changes, which is quite slow.

Changes the behavior of non-nv_path_rendering paths to always perform
the optimization if the shape ends up being painted by a renderer that
wants the optimization. Previously the optimization was applied only
when callgraph started with SkCanvas::drawPath.

Applies the optimization for GrAAHairLineRenderer and
GrDefaultPathRenderer.

This changes gm results for dashing3_{msaa4,gpu} and drawlooper_msaa4.

R=bsalomon@google.com, jvanverth@google.com, rmistry@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/38573007

git-svn-id: http://skia.googlecode.com/svn/trunk@12357 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
a4662865e37a2ca95b5e3379072f6a274acc8ac8 21-Nov-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> More Windows 64b compilation warning fixes

https://codereview.chromium.org/47513017/



git-svn-id: http://skia.googlecode.com/svn/trunk@12337 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
8c99c9f4a6fa14a4ade0fb39ff431f43a7306fc7 20-Nov-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12315 (More Windows 64b compilation warning fixes) due to compilation failures




git-svn-id: http://skia.googlecode.com/svn/trunk@12316 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
80051d38a3469adb67fa7f503cf43fc2960c28b7 20-Nov-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> More Windows 64b compilation warning fixes

https://codereview.chromium.org/47513017/



git-svn-id: http://skia.googlecode.com/svn/trunk@12315 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
1b20a10f0205da2d53e0837e4ddc6b2bd3b8a462 08-Nov-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Do not apply hairline optimization for paths if nv_path_rendering is used"

This reverts commit r12185.

Review URL: https://codereview.chromium.org/66813002

git-svn-id: http://skia.googlecode.com/svn/trunk@12187 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
44fb865e81a57e0c72de3109d0ed5ea428aa1f44 08-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Do not apply hairline optimization for paths if nv_path_rendering is used

Do not convert thin, non-hairline paths to hairline paths if
nv_path_rendering is used.

The current nv_path_rendering implementation does not render
hairlines. Rendering the hairlines with normal renderers cause
unneccessary gl program changes, which is quite slow.

Changes the behavior of non-nv_path_rendering paths to always perform
the optimization if the shape ends up being painted by the
path-drawing code (GrContext::drawPathInternal). Previously the
optimization was applied only when callgraph started with
SkCanvas::drawPath. This changes drawlooper_msaa4, dashing3_msaa4 and
dashing3_gpu

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/38573007

git-svn-id: http://skia.googlecode.com/svn/trunk@12185 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
a34995e18b1f0a7d8c9f23451718bb30ff0105b0 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement SkColorFilter as a GrGLEffect

Adds GrEffect::willUseInputColor() which indicates whether or not the
input color affects the output of the effect. This is needed for
certain Xfermodes, such as kSrc_Mode. For these modes the color filter
will not use the input color.

An effect with GrEffect::willUseInputColor() true will cause all color
or coverage effects before it to be discarded, as their computations
cannot affect the output. In these cases program is marked as having
white input color.

This fixes an assert when Skia is compiled in a mode that prefers
using uniforms instead of attributes for constants. (Flags
GR_GL_USE_NV_PATH_RENDERING or GR_GL_NO_CONSTANT_ATTRIBUTES). Using
attributes hides the problem where the fragment shader does not need
input color for color filters that ignore DST part of the filter. The
assert would be hit when uniform manager tries to bind an uniform which
has been optimized away by the shader compiler.

Adds specific GrGLSLExpr4 and GrGLSLExpr1 classes. This way the GLSL
expressions like "(v - src.a)" can remain somewhat readable in form of
"(v - src.a())". The GrGLSLExpr<typename> template implements the
generic functionality, GrGLSLExprX is the specialization that exposes
the type-safe interface to this functionality.

Also adds operators so that GLSL binary operators of the form
"(float * vecX)" can be expressed in C++. Before only the equivalent
"(vecX * float)" was possible. This reverts the common blending
calculations to more conventional order, such as "(1-a) * c" instead of
"c * (1-a)".

Changes GrGLSLExpr1::OnesStr from 1 to 1.0 in order to preserve the
color filter blending formula string the same (with the exception of
variable name change).

Shaders change in case of input color being needed:
- vec4 filteredColor;
- filteredColor = (((1.0 - uFilterColor.a) * output_Stage0) + uFilterColor);
- fsColorOut = filteredColor;
+ vec4 output_Stage1;
+ { // Stage 1: ModeColorFilterEffect
+ output_Stage1 = (((1.0 - uFilterColor_Stage1.a) * output_Stage0) + uFilterColor_Stage1);
+ }
+ fsColorOut = output_Stage1;

Shaders change in case of input color being not needed:
-uniform vec4 uFilterColor;
-in vec4 vColor;
+uniform vec4 uFilterColor_Stage0;
out vec4 fsColorOut;
void main() {
- vec4 filteredColor;
- filteredColor = uFilterColor;
- fsColorOut = filteredColor;
+ vec4 output_Stage0;
+ { // Stage 0: ModeColorFilterEffect
+ output_Stage0 = uFilterColor_Stage0;
+ }
+ fsColorOut = output_Stage0;
}

R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/25023003

git-svn-id: http://skia.googlecode.com/svn/trunk@11912 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c4dc0ad8e252a7e30d19b47d3d0d9f2c69faf854 09-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement filling a path with nv_path_rendering cover

Implement filling a path with nv_path_rendering cover functionality.

The nv_path_rendering cover can be used if the fill is non-inverted
and the draw operation does not require use of vertex shaders.

Moves code for the inverted fill from GrStencilAndCoverPathRenderer
down to GrGpuGL.

R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/22686002

git-svn-id: http://skia.googlecode.com/svn/trunk@11667 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
234d4fba75aac009e34c088037fcd9e244798c40 30-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Mark when effects and programs have vertex code

Adds a 'hasVertexCode' method to GrEffect and a 'fHasVertexCode' field
to GrGLProgramDesc::KeyHeader. Also adds a GrVertexEffect class that
effects have to inherit from in order to set the 'hasVertexCode' flag
and be able to emit vertex code, and updates the existing effects to
use it as needed.

R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/23653059

git-svn-id: http://skia.googlecode.com/svn/trunk@11537 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
f6de475e5cbd143f348ff7738919e397b7fe7f57 17-Aug-2013 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Replace uses of GrAssert by SkASSERT.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/22850006

git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
5c493d5b3dc753fccba47c8250fb38713bac3cb8 14-Jun-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@9602 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
eb6879f50a5564eeb981ec5616b55bf685eb76fc 13-Jun-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Replace fixed-size array of effect stages in GrDrawState with two appendable arrays, one for color, one for coverage.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/16952006

git-svn-id: http://skia.googlecode.com/svn/trunk@9592 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
2c84aa35988c661b3e5513c8ba9b3959832ff288 06-Jun-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> separate arrays for color and coverage effects.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/16180006

git-svn-id: http://skia.googlecode.com/svn/trunk@9465 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
2d816ad36e806e5b1cf3c447e547829bbbe74fd1 23-May-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@9252 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
2db3ded335fdb6697623bece61cabc307a414770 22-May-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GrGLProgramDesc's key variable length by compacting the effect key array

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/15252004

git-svn-id: http://skia.googlecode.com/svn/trunk@9239 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
0c89db2929657f06ea7fac886e5f156ba1b37b7e 15-May-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Disable blending when there is an effect that reads the dst and draw state blend is 1,0.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/15199008

git-svn-id: http://skia.googlecode.com/svn/trunk@9147 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
b515881446c303a50d9b2dd38b9163b4e5c625a2 13-May-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Key shader on whether frag pos read is relative to top-left or bottom-left

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/14633007

git-svn-id: http://skia.googlecode.com/svn/trunk@9113 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
8d47ddc19a40d1984bf1f384d711d36ab59fd1c0 09-May-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GrGLShaderBuilder check whether GrEffect advertised that it would require the dst color or fragment position

R=senorblanco@chromium.org, robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/14998007

git-svn-id: http://skia.googlecode.com/svn/trunk@9074 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
6b0cf0273fdffbbdf69235b57b5b5a311e7f1ca6 03-May-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add support for GL_*_shader__framebuffer_fetch

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/14875002

git-svn-id: http://skia.googlecode.com/svn/trunk@8980 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
5920ac276877b36624e07baf97c7768e80a07f98 19-Apr-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Perform coverage blend with the dst in the shader when using a dst-reading xfermode.
Review URL: https://codereview.chromium.org/14233006

git-svn-id: http://skia.googlecode.com/svn/trunk@8762 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
054ae99d93711c26e40682a0e3a03a47ea605c53 01-Apr-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Take two for r8466:

Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005


git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
c7bf2963f00a29bd28e5e2a446da79f93c1d9383 01-Apr-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Rolling back r8466.

Not reviewed.


git-svn-id: http://skia.googlecode.com/svn/trunk@8467 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
fb495b537f5ddd6966f02cfe38f6b106a4869934 01-Apr-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revise attribute binding interface.

Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005

git-svn-id: http://skia.googlecode.com/svn/trunk@8466 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
26e18b593ab65e4d92dfbce92579d8bc180d4c2c 29-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add support for reading the dst pixel value in an effect. Use in a new effect for the kDarken xfer mode.

The current implementation is to always make a copy of the entire dst before the draw.
It will only succeed if the RT is also a texture.
Obviously, there is lots of room for improvement.
Review URL: https://codereview.chromium.org/13314002

git-svn-id: http://skia.googlecode.com/svn/trunk@8449 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp
798c8c4fe61f2172ae52cb626843a64069e18882 27-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move GrGLProgramDesc::Build to new cpp file.
Review URL: https://codereview.chromium.org/13097007

git-svn-id: http://skia.googlecode.com/svn/trunk@8414 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/gl/GrGLProgramDesc.cpp