History log of /external/skia/src/effects/SkLightingImageFilter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
de5c50268c3ff0af507c0a9b47ab58809b89867c 26-Jan-2018 Mike Reed <reed@google.com> move checkLE functionality directly onto readbuffer

Bug: skia:
Change-Id: I549717f04e2e4cafc41ccbe13009805f47943d5d
Reviewed-on: https://skia-review.googlesource.com/99703
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
757c15402ddb3dd03f0b5f208d288164c7317499 23-Jan-2018 Robert Phillips <robertphillips@google.com> Remove superfluous SkReadBuffer validity checks

The pattern is to create the spurious object & delete it later

Change-Id: I435e2872127e02c241b5dd27cd965f3c7047a77a
Reviewed-on: https://skia-review.googlesource.com/98783
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
959ccc2aefbaf0bc8b58f44d2fc85cddb1d027cf 23-Jan-2018 Robert Phillips <robertphillips@google.com> Fix skia image filter fuzz SkLightingImageFilter complaint

Change-Id: I3bd9831b0160e797481469ae93b6d037d81b07da
Reviewed-on: https://skia-review.googlesource.com/98780
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
60aaeb2b551d5e3e90baacac315e899e26f758f1 03-Nov-2017 Cary Clark <caryclark@skia.org> create imagepriv and name params

Named all parameters and made the names consistent
for documentation.

Moved SK_IMAGEFILTER_UNFLATTEN_COMMON to private file.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I1343d2b16d4217088fa3bc9c40f1f4177fa32740
Reviewed-on: https://skia-review.googlesource.com/66521
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
/external/skia/src/effects/SkLightingImageFilter.cpp
f3569f0f6d312570c7344b345f8b3a03a892f751 24-Oct-2017 Brian Salomon <bsalomon@google.com> Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint conversion.

This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext.

Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025
Reviewed-on: https://skia-review.googlesource.com/63304
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
abff956455637b12eab374fd44b99e1338799113 09-Oct-2017 Ethan Nicholas <ethannicholas@google.com> initClassID no longer auto-allocates ids

Auto-allocated IDs mean that the IDs depend upon the order in which
classes happen to get initialized and are therefore not consistent
from run to run. This change paves the way for a persistent shader
cache by fixing the IDs in an enum.

Bug: skia:
Change-Id: I3e923c6c54f41b3b3eb616458abee83e0909c09f
Reviewed-on: https://skia-review.googlesource.com/56401
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
8aa4569c139a7a7ac38c62b25e3af40309cc2ee2 20-Sep-2017 Ethan Nicholas <ethannicholas@google.com> switched SkSL's temporary 'highfloat' type back to 'float'

Bug: skia:
Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e
Reviewed-on: https://skia-review.googlesource.com/48760
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
f7b8820dc813d1eb0b6b43fe4581dded0da38caf 18-Sep-2017 Ethan Nicholas <ethannicholas@google.com> re-land of new SkSL precisions

Bug: skia:
Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119
Reviewed-on: https://skia-review.googlesource.com/47841
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
27185a9b9756d2f5fcc077c6c2c005259d4ba517 18-Sep-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "Revert "Switched highp float to highfloat and mediump float to half."""

This reverts commit 05d5a13fea6246648de7e41358ed338d53c85ea2.

Reason for revert: looks like it broke filterfastbounds

Original change's description:
> Revert "Revert "Switched highp float to highfloat and mediump float to half.""
>
> This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01.
>
> Bug: skia:
> Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
> Reviewed-on: https://skia-review.googlesource.com/46464
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Iddf6aef2ab084aa73da7ceebdfc303a1d2b80cde
Reviewed-on: https://skia-review.googlesource.com/47441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
05d5a13fea6246648de7e41358ed338d53c85ea2 15-Sep-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "Switched highp float to highfloat and mediump float to half.""

This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01.

Bug: skia:
Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
Reviewed-on: https://skia-review.googlesource.com/46464
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
a4083c97d48e8a4f88e2797d7363f141e3d42553 15-Sep-2017 Cary Clark <caryclark@skia.org> make most of SkColorPriv.h private

created new file src/core/SkColorData.h for
internal consumption. Note that many of the
functions there are unused as well.

Bug: skia: 6898
R: reed@google.com
Change-Id: I25bfd5a9c21f53558c4ca65a77eb5d322d897c6d
Reviewed-on: https://skia-review.googlesource.com/46848
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
1d816b92bb7cf2258007f3f74ffd143b89f25d01 17-Aug-2017 Brian Salomon <bsalomon@google.com> Revert "Switched highp float to highfloat and mediump float to half."

This reverts commit 88d99c63878c2d3d340120f0321676f72afcb4f0.

Reason for revert: Believed to be causing unit test failures in Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0

Original change's description:
> Switched highp float to highfloat and mediump float to half.
>
> The ultimate goal is to end up with "float" and "half", but this
> intermediate step uses "highfloat" so that it is clear if I missed a
> "float" somewhere. Once this lands, a subsequent CL will switch all
> "highfloats" back to "floats".
>
> Bug: skia:
> Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
> Reviewed-on: https://skia-review.googlesource.com/31000
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/35705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
88d99c63878c2d3d340120f0321676f72afcb4f0 16-Aug-2017 Ethan Nicholas <ethannicholas@google.com> Switched highp float to highfloat and mediump float to half.

The ultimate goal is to end up with "float" and "half", but this
intermediate step uses "highfloat" so that it is clear if I missed a
"float" somewhere. Once this lands, a subsequent CL will switch all
"highfloats" back to "floats".

Bug: skia:
Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
Reviewed-on: https://skia-review.googlesource.com/31000
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
b4aab9ae6d27c446af8302b79d15b832c816c633 16-Aug-2017 Ben Wagner <bungeman@google.com> Replace SkFAIL with SK_ABORT.

SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.

Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
aff329b8e9b239bca1d93b13a914fbef45ccf7fe 11-Aug-2017 Brian Salomon <bsalomon@google.com> Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.

Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
5af9ea399d5e0344cc4b7da4e97b5dc5b3c74f64 28-Jul-2017 Ethan Nicholas <ethannicholas@google.com> renamed SkSL types in preparation for killing precision modifiers

Bug: skia:
Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900
Reviewed-on: https://skia-review.googlesource.com/27703
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
6b17ff664ea8ead5a5d3e83436772dd0286603f5 28-Jul-2017 Brian Salomon <bsalomon@google.com> Implement clone for GrLightingEffect descendants

Also use sk_sp for ref management of owned light object.

Change-Id: I2fa8427a9374351996c09f992f74cc83008605f1
Reviewed-on: https://skia-review.googlesource.com/28040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
6cd51b51d6603a3100b147c45f38697f2f199fc6 27-Jul-2017 Brian Salomon <bsalomon@google.com> Remove GrSingleTextureEffect

Change-Id: I510cc0657f9433b206dc2ab643fa557667263294
Reviewed-on: https://skia-review.googlesource.com/27180
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
c686ce39f06d556d55befd290e0eb82851c7d33b 21-Jul-2017 Robert Phillips <robertphillips@google.com> Smaller fragment from "Reduce dependence on GrSurface's origin field"

TBR=bsalomon@google.com
Change-Id: I996226ffaf84ca357740a6da9bb80a3b8febb379
Reviewed-on: https://skia-review.googlesource.com/25745
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
96be9df1300b2281641b038ef11064157f6e0b41 21-Jul-2017 Robert Phillips <robertphillips@google.com> Revert "Reduce dependence on GrSurface's origin field"

This reverts commit 467022b1861033d968195687da15270c208279ff.

Reason for revert: GrAHardwareBufferImageGenerator.cpp

Original change's description:
> Reduce dependence on GrSurface's origin field
>
> Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
>
> Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
> Reviewed-on: https://skia-review.googlesource.com/24700
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25620
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
467022b1861033d968195687da15270c208279ff 21-Jul-2017 Robert Phillips <robertphillips@google.com> Reduce dependence on GrSurface's origin field

Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.

Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
Reviewed-on: https://skia-review.googlesource.com/24700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
6d9f42984d94a2e9116dd951d47cd65cd8f4d401 06-Jul-2017 Mike Reed <reed@google.com> only create new instance if needed for colorspacexformer

just an experiment to address performance when imagefilters are cached.

Bug: skia:
Change-Id: Ic1033c897d0a569b46a339fb3ae7f8f961882953
Reviewed-on: https://skia-review.googlesource.com/21395
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/src/effects/SkLightingImageFilter.cpp
0c26a9dbd0b6546731df63c01411cb2aaa5ba236 06-Jul-2017 Brian Salomon <bsalomon@google.com> GR_TEST_UTILS fixes

Fixes build of Skia lib when GR_TEST_UTILS=0

Makes GR_TEST_UTILS=0 for official builds

Makes "Mini" builder bot exercise building GPU with is_official_build=true

Bug: skia:6786
Change-Id: I6186683a3a216d2e779645bd9e8276a66bcff4d5
Reviewed-on: https://skia-review.googlesource.com/21524
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
1c9686bfa5e2de3e06f1d1b9691105afb6659e85 30-Jun-2017 Robert Phillips <robertphillips@google.com> Speculative "fix" for crash in analyzeProcessors

From the bug it looks like a null fragment processors may be getting into the processor set. This CL tries to plug any gaps in our fragmentProcessor handling.

The only real substantive part to this CL is the addition of some "if (!fp) { return nullptr; }" blocks.

Everything else is just to add chokepoints for processor allocation.

Bug: 734076
Change-Id: I4952b1a05bc6690d5aa09de977fa6dc54c80338a
Reviewed-on: https://skia-review.googlesource.com/21267
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
0c182fc77e044edddb6606b7cf51b9a5b6c2eb54 16-Jun-2017 Mike Reed <reed@google.com> refactor lighting imagefilter to save codesize

Goal was to just remove template args and add virtuals where needed.
Ended up having to also move a couple of classes/helpers earlier in the file, but nothing beyond that.

Size savings (on Mac laptop) : 67896

Before:
8/8 MB 1 30.6ms 30.7ms 30.7ms 30.9ms 0% █▁▅▁▄▃▄▁▃▃ 8888 lightingspotlitspecular_large
8/8 MB 1 34.2ms 37.6ms 38.5ms 45.9ms 9% ▂▂▃▅▁▅█▂▅▂ 8888 lightingspotlitspecular_small
8/8 MB 1 31.3ms 35ms 34.6ms 38.4ms 7% ▁▄▅▆▆▁▇▃▂█ 8888 lightingdistantlitspecular_large
8/8 MB 1 29.9ms 33.5ms 34.3ms 39.2ms 8% ▁▅█▃▄▇▄▂▄▆ 8888 lightingdistantlitspecular_small
8/8 MB 1 30.4ms 34.1ms 34.5ms 40.7ms 11% ▂▄█▃▁▅▂▅▁▇ 8888 lightingpointlitspecular_large
8/8 MB 1 29.8ms 36.2ms 34.8ms 41.4ms 12% ▂▃▅▁▅▇▂▁▆█ 8888 lightingpointlitspecular_small
8/8 MB 1 16.3ms 19.5ms 20.5ms 26.6ms 17% ▁▆▃▃█▃▂▅▁▆ 8888 lightingspotlitdiffuse_large
8/8 MB 1 17.3ms 19.3ms 19.4ms 23.3ms 10% ▄▁▂▁▆▅▁▃▂█ 8888 lightingspotlitdiffuse_small
8/8 MB 1 12.7ms 14.9ms 17ms 27.9ms 30% ▂▁█▁▂▄▂▂▂▆ 8888 lightingdistantlitdiffuse_large
8/8 MB 1 12.4ms 14.5ms 15.8ms 24.7ms 23% ▁▂▅▂▁▃█▂▃▂ 8888 lightingdistantlitdiffuse_small
8/8 MB 1 13.6ms 14.9ms 16.6ms 22.5ms 22% ▁█▅▁▆▂▁▂▁█ 8888 lightingpointlitdiffuse_large
8/8 MB 1 13.8ms 17ms 16.5ms 19.2ms 11% ▆▆▁▁▆▅▅█▃▂ 8888 lightingpointlitdiffuse_small

After:
8/8 MB 1 23.5ms 23.6ms 23.8ms 25.1ms 2% ▃▁█▁▁▂▁▂▁▁ 8888 lightingspotlitspecular_large
8/8 MB 1 23.5ms 23.6ms 23.9ms 24.9ms 2% █▅▂▁▁▁▁▁▆▃ 8888 lightingspotlitspecular_small
8/8 MB 1 21.6ms 21.8ms 21.9ms 22.3ms 1% █▆▃▁▄▄▃▂▄▂ 8888 lightingdistantlitspecular_large
8/8 MB 1 21.6ms 21.7ms 21.9ms 22.7ms 2% █▅▂▂▂▁▂▂▂▃ 8888 lightingdistantlitspecular_small
8/8 MB 1 22.3ms 22.9ms 22.8ms 23.2ms 1% ▇▆▁▄▆▄▃█▄▆ 8888 lightingpointlitspecular_large
8/8 MB 1 22.1ms 22.2ms 22.5ms 23.6ms 3% ██▁▁▂▂▁▁▂▂ 8888 lightingpointlitspecular_small
8/8 MB 1 12.8ms 13ms 13ms 13.3ms 2% ▃▇█▇▁▅▄▃▂▄ 8888 lightingspotlitdiffuse_large
8/8 MB 1 12.8ms 13ms 13ms 13.2ms 1% ▄▃██▄▁▃▅▂▇ 8888 lightingspotlitdiffuse_small
8/8 MB 1 10.6ms 10.7ms 10.8ms 11.1ms 2% ▂▄██▂▁▃▃▂▂ 8888 lightingdistantlitdiffuse_large
8/8 MB 1 10.6ms 10.7ms 10.8ms 11.3ms 2% ▂▂▇█▃▁▂▅▁▂ 8888 lightingdistantlitdiffuse_small
8/8 MB 1 10.9ms 11.1ms 11.2ms 11.6ms 2% ▁▂▇▁█▃▂▂▇▁ 8888 lightingpointlitdiffuse_large
8/8 MB 1 10.9ms 11.1ms 11.1ms 11.5ms 2% ▄▃█▅▃▃▁▃▂▁ 8888 lightingpointlitdiffuse_small

Bug: skia:
Change-Id: I7542a5ca1f209a732630f646b4ceb4fb08150ce4
Reviewed-on: https://skia-review.googlesource.com/20155
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/src/effects/SkLightingImageFilter.cpp
fbcef6eb8abad142daf45418516550f7635b4a52 15-Jun-2017 Robert Phillips <robertphillips@google.com> Clean up GrResourceProvider usage

The only substantive changes are the removal of GrProxy instantiation in:

SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*

Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
646e4293f06d9de6d44dbfa3c32cdc15a6f5906e 13-Jun-2017 Robert Phillips <robertphillips@google.com> Retract GrTexture*.h & GrRenderTarget*.h from other headers

This does push some additional work (& includes) into the .cpp files.

Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
9bee2e5894bb8dd374392f238bc429e16f239583 29-May-2017 Robert Phillips <robertphillips@google.com> Revise system for checking for uninstantiated proxies

The new pattern is:
we will "instantiate" pipelines at flush time
at flush time we will only access the backing GrSurface by peeking

If instantiation fails we should never try to access the GrSurfaces


Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6
Reviewed-on: https://skia-review.googlesource.com/17932
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
2983f4022d756def4f93579ee519cd31c8f24d61 08-May-2017 Ethan Nicholas <ethannicholas@google.com> Re-land of "eliminated GrGLSLExpr".


This change is exactly the same as the last time it was landed; I believe the
underlying optimizer bug that was causing this to cause problems has been
fixed by a prior CL.
Bug: skia:
Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa
Reviewed-on: https://skia-review.googlesource.com/15768
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
421fe443f833c916e6c3616f92570c8920b030f9 04-May-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "Revert "eliminated GrGLSLExpr"""

This reverts commit 796001c82eca5651bc6a221204f6186918781daf.

Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html)

Original change's description:
> Revert "Revert "eliminated GrGLSLExpr""
>
> This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c.
>
> Bug: skia:
> Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
> Reviewed-on: https://skia-review.googlesource.com/15187
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>

TBR=ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c
Reviewed-on: https://skia-review.googlesource.com/15309
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
796001c82eca5651bc6a221204f6186918781daf 03-May-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Revert "eliminated GrGLSLExpr""

This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c.

Bug: skia:
Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
Reviewed-on: https://skia-review.googlesource.com/15187
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c 02-May-2017 Brian Salomon <bsalomon@google.com> Revert "eliminated GrGLSLExpr"

This reverts commit 93f20f5629e52eed732d2b9d6dbbb351cc30b2cd.

Reason for revert: Mismerge readded deleted files.

Original change's description:
> eliminated GrGLSLExpr
>
> Now that skslc performs all of the optimizations (and then some) that
> GrGLSLExpr is responsible for, it's just extra work for no benefit.
>
> Bug: skia:
> Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
> Reviewed-on: https://skia-review.googlesource.com/14560
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390
Reviewed-on: https://skia-review.googlesource.com/15154
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
93f20f5629e52eed732d2b9d6dbbb351cc30b2cd 02-May-2017 Ethan Nicholas <ethannicholas@google.com> eliminated GrGLSLExpr

Now that skslc performs all of the optimizations (and then some) that
GrGLSLExpr is responsible for, it's just extra work for no benefit.

Bug: skia:
Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
Reviewed-on: https://skia-review.googlesource.com/14560
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
62745a8bba20d7ca91167915eb459339bcfb8862 17-Apr-2017 Matt Sarett <msarett@google.com> Finish overriding onMakeColorSpace() for SkImageFilters

Fixes 3 gms in gbr-8888. Breaks 0 gms in gbr-8888.

Bug: skia:
Change-Id: I3365390b16353821ef6057a7bb68020887e36f72
Reviewed-on: https://skia-review.googlesource.com/13323
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/src/effects/SkLightingImageFilter.cpp
4edb5d219eb99aa1e8fbe5e37260d3b34314e54b 17-Apr-2017 Mike Reed <reed@google.com> hide lockpixels api behind flag

guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS

needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09

Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
ab015efc48c462ffdffebb45c02cd19efb254983 04-Apr-2017 Brian Salomon <bsalomon@google.com> Move the ability to access textures, buffers, and image storages out from GrProcessor.

GrXferProcessor can no longer use this functionality so it is moved to a new intermediate class inherited by GrFragmentProcessor and GrPrimitiveProcessor.

Change-Id: I4f30c89bdceb2d77b602bf0646107e0780881c26
Reviewed-on: https://skia-review.googlesource.com/11202
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
d3b65972aad96453ff4510caa3e25a2b847c6d1e 22-Mar-2017 Brian Salomon <bsalomon@google.com> Mark overridden destructors with 'override' and remove 'virtual'

This silences a new warning in clang 5.0

Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/src/effects/SkLightingImageFilter.cpp
9bc39bbd1a18d61e4e9c3808c33ea003a8e49938 17-Mar-2017 Brian Osman <brianosman@google.com> Add highp to specular lighting intermediate to fix iOS bots

Looks like math was over/under-flowing at default precision, leading to garbage output. This appears to be the minimal change to fix it.

BUG=skia:

Change-Id: I9381dea380be0d8f5af1e765f4ed1403b0ceac70
Reviewed-on: https://skia-review.googlesource.com/9827
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
296b1ccf9b8e9c8b945645efcbaa9c71c7135f58 15-Mar-2017 Robert Phillips <robertphillips@google.com> Retract GrContext from src/gpu/effects

Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97
Reviewed-on: https://skia-review.googlesource.com/9693
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
3b65598bceb65736486db27ed49a56d787032747 07-Mar-2017 Brian Osman <brianosman@google.com> Make SkGr.h private and remove unused functions

BUG=skia:

Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
8e1c4e672553ecae2745168514240705f3516773 19-Feb-2017 Robert Phillips <robertphillips@google.com> Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2)

This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef

This is a reland of: https://skia-review.googlesource.com/c/7995/ (Remove asTextureRef from SkSpecialImage & update effects accordingly)

It should be good to land since https://skia-review.googlesource.com/c/8701/ (Replace SkSpecialImage::makeTightSubset with asImage (take 2)) fixes the Chrome-side issue

Change-Id: I3d88b2b3d23fd69f3fb914a69dacca96cbc038a4
Reviewed-on: https://skia-review.googlesource.com/8450
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
f3b995b628ef76bff28b9721dd1e182336156086 15-Feb-2017 Brian Salomon <bsalomon@google.com> Clarify when tweak alpha for coverage optimizaton can occur.

Also refer to it directly rather than using the term "modulate"

Change-Id: Ifa44a4d46e1be11b567943f58ead24e38f10d03b
Reviewed-on: https://skia-review.googlesource.com/8488
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
8be952ad8c9deefe19cff36f9ad217563400f817 14-Feb-2017 Mike Reed <reed@google.com> SkScalarMul is deprecated

BUG=skia:

Change-Id: I88ecfe9d4c72506f6b1a0e0dfadd2a5c171a6cb6
Reviewed-on: https://skia-review.googlesource.com/8353
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
cb30bb2cb727e276792812c6390547dba474c831 12-Feb-2017 Brian Salomon <bsalomon@google.com> Remove GrFragmentProcessor::computeInvariantOutput

Change-Id: If475730103052c6097eb91be06808fb723b70bf8
Reviewed-on: https://skia-review.googlesource.com/8330
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
3865711259e25a90a1d72480f848863ada202067 09-Feb-2017 Ethan Nicholas <ethannicholas@google.com> Replaced all calls to fragmentPosition() with sk_FragCoord

Change-Id: I2ed4558aea74b3ae7ee11dfe4736cdbcb16ae49e
Reviewed-on: https://skia-review.googlesource.com/8278
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
696b29346e85307a05af47768d358161eba3f6bd 08-Feb-2017 Robert Phillips <robertphillips@google.com> Revert "Remove asTextureRef from SkSpecialImage & update effects accordingly"

This reverts commit e88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12.

Reason for revert: See if breaking DEPS roll

Original change's description:
> Remove asTextureRef from SkSpecialImage & update effects accordingly
>
> This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef
>
> Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac
> Reviewed-on: https://skia-review.googlesource.com/7995
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I227cbd5fcaf7e2f86e858331d9ec7ff7a5f203ca
Reviewed-on: https://skia-review.googlesource.com/8184
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
e88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12 07-Feb-2017 Robert Phillips <robertphillips@google.com> Remove asTextureRef from SkSpecialImage & update effects accordingly

This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef

Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac
Reviewed-on: https://skia-review.googlesource.com/7995
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
cae3a4c8ab7082df009a1e340f10292350e0c763 02-Feb-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Replaced all calls to fragmentPosition() with sk_FragCoord"

This reverts commit de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5.

Reason for revert: several Chrome rendering bugs on Mac

BUG=skia:

Change-Id: I492082b0b7e7c902ede4b598c5809f604d210ce1
Reviewed-on: https://skia-review.googlesource.com/7887
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
6f6961ebad65c582318564b3688e78e5c99f3935 31-Jan-2017 Hal Canary <halcanary@google.com> make GR_TEST_UTILS=0 work

Change-Id: Icce35140ca08b65217b32e6b1ffc6ad2f38ab37f
Reviewed-on: https://skia-review.googlesource.com/7840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
f200a90f3e58ce20753420cadced850d7d00dca1 30-Jan-2017 Robert Phillips <robertphillips@google.com> Rationalize GrContext's Gr*Proxy getter naming

This CL replaces the entry points:

asDeferredSurface
asDeferredTexture
asDeferredRenderTarget

with:

GrSurfaceProxy* asSurfaceProxy
sk_sp<GrSurfaceProxy> asSurfaceProxyRef

GrTextureProxy* asTextureProxy
sk_sp<GrTextureProxy> asTextureProxyRef

GrRenderTargetProxy* asRenderTargetProxy
sk_sp<GrRenderTargetProxy> asRenderTargetProxyRef

Change-Id: I7c2b1ea3d702023ff23019815ca13c9ff6f3b32d
Reviewed-on: https://skia-review.googlesource.com/7741
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
587e08f361ee3e775a6bbc6dca761dbba82e422c 27-Jan-2017 Brian Salomon <bsalomon@google.com> Revert "Revert "Start of rewrite of GrFragmentProcessor optimizations.""

This reverts commit 052fd5158f7f85e478a9f87c45fecaacf7d0f5f3.

Disables the test (of unused code) until platform-specific issues are addressed.

Change-Id: I7aa23a07954fccf382aa07d28afcbffb0bebcd6d
Reviewed-on: https://skia-review.googlesource.com/7656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
052fd5158f7f85e478a9f87c45fecaacf7d0f5f3 27-Jan-2017 Ethan Nicholas <ethannicholas@google.com> Revert "Start of rewrite of GrFragmentProcessor optimizations."

This reverts commit 85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b.

Reason for revert: test failures on Windows, e.g. https://chromium-swarm.appspot.com/task?id=33f9527484414110&refresh=10

Original change's description:
> Start of rewrite of GrFragmentProcessor optimizations.
>
> This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:
>
> * known input color -> known output color for GrFP elimination
> * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
> * opaqueness tracking
>
> This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.
>
> Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.
>
> Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a
> Reviewed-on: https://skia-review.googlesource.com/7481
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2390df257456013fa74137cb5d7b5a93820c291e
Reviewed-on: https://skia-review.googlesource.com/7652
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b 26-Jan-2017 Brian Salomon <bsalomon@google.com> Start of rewrite of GrFragmentProcessor optimizations.

This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:

* known input color -> known output color for GrFP elimination
* tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
* opaqueness tracking

This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.

Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.

Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a
Reviewed-on: https://skia-review.googlesource.com/7481
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
67c18d6b5188a0497f6912a73d964c763d2f8f84 20-Jan-2017 Robert Phillips <robertphillips@google.com> Continue making Ganesh use absolute texture coordinates - take 2

The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix)

Relanding of: https://skia-review.googlesource.com/c/6977/


Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02
Reviewed-on: https://skia-review.googlesource.com/7265
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5 19-Jan-2017 Ethan Nicholas <ethannicholas@google.com> Replaced all calls to fragmentPosition() with sk_FragCoord

BUG=skia:

Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d
Reviewed-on: https://skia-review.googlesource.com/5941
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
a7d61a65ee7f7b2a2f6fce59faaca0762cef4c67 17-Jan-2017 Joe Gregorio <jcgregorio@google.com> Revert "Continue making Ganesh use absolute texture coordinates"

This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9.

Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410

Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de
Reviewed-on: https://skia-review.googlesource.com/7125
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9 17-Jan-2017 Robert Phillips <robertphillips@google.com> Continue making Ganesh use absolute texture coordinates

The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix)

Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8
Reviewed-on: https://skia-review.googlesource.com/6977
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
75a475cf2e7c66eb58b6b8b1441deb5911e53181 13-Jan-2017 Robert Phillips <robertphillips@google.com> Try out refFoo pattern on GrRenderTargetContext

Change-Id: Ifae5618f30c2202b9083f479b58556709ff6126a
Reviewed-on: https://skia-review.googlesource.com/6990
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
82f44319159bb98dcacdbbec7ea643dde5ed024b 11-Jan-2017 Brian Salomon <bsalomon@google.com> Make GrPaints move their GrProcessor ownership into GrPipelineBuilder.

This makes GrPaints usable only once. In some places we must make copies in order to issue draws with the same paint state.

Change-Id: Ie816e5185ce93a064111cad64c6880e1e21184c2
Reviewed-on: https://skia-review.googlesource.com/6844
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
e98234f231d66848e149db683c11b6388e10b233 09-Jan-2017 Robert Phillips <robertphillips@google.com> Start making texture coordinates be absolute

The idea here is that we will pass GrTextureProxys in (where we're currently passing GrTextures) and defer the normalization until the texture is actually instantiated (and possibly move it to the GPU entirely)

This CL does (intentionally) change the texturedomaineffect GM but I believe the new behavior is more correct.

Change-Id: I4e0510b3dfb65ff0d0ee5921f9a6f94151e602d3
Reviewed-on: https://skia-review.googlesource.com/6807
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
0e8fc8b9e6a138cf4a66b421fb824679df717329 09-Dec-2016 Brian Salomon <bsalomon@google.com> Relandx2 "Remove antialiasing control from GrPaint."

Fixes a bad merge.

This reverts commit 073285c0595d46205d1482cc19af2d7d891bfeae.

Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a
Reviewed-on: https://skia-review.googlesource.com/5774
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
073285c0595d46205d1482cc19af2d7d891bfeae 09-Dec-2016 Brian Salomon <bsalomon@google.com> Revert "Reland "Remove antialiasing control from GrPaint.""

This reverts commit 3944484020d98ff8f386378296106c321279482b.

Reason for revert: Merges badly with a recent change. Will rebase and reland.

Original change's description:
> Reland "Remove antialiasing control from GrPaint."
>
> This contains fixes for GLPrograms test and mixed samples rendering.
>
> This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4.
>
> BUG=skia:
>
> Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
> Reviewed-on: https://skia-review.googlesource.com/5763
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd
Reviewed-on: https://skia-review.googlesource.com/5772
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
3944484020d98ff8f386378296106c321279482b 09-Dec-2016 Brian Salomon <bsalomon@google.com> Reland "Remove antialiasing control from GrPaint."

This contains fixes for GLPrograms test and mixed samples rendering.

This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4.

BUG=skia:

Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
Reviewed-on: https://skia-review.googlesource.com/5763
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
419d81eed4a010e6080db199795117cbedf9e6e4 08-Dec-2016 Brian Salomon <bsalomon@google.com> Revert "Remove antialiasing control from GrPaint."

This reverts commit 9f549358b3ac9f61e78b194e39d6ac6eb322e35e.

Reason for revert: hitting asserts

Change-Id: I542d34edc05ecf72b7646263f25736a0950c78e7
Reviewed-on: https://skia-review.googlesource.com/5707
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
9f549358b3ac9f61e78b194e39d6ac6eb322e35e 08-Dec-2016 Brian Salomon <bsalomon@google.com> Remove antialiasing control from GrPaint.

This adds an additional param (of new enum type GrAA) to draws that can antialias and a new enum GrAAType to indicate the AA technique (none, fragment shader computed coverage, msaa).

Some GMs change due to this:
1) In some places we weren't disabling MSAA when the draw was supposed to be unantialiased.
2) Some bounding rect draws that use GrFragmentProcessors were unnecessarily turning on antialiasing, by disabling it a very small number of pixel LSBs change.

Change-Id: I7d8d8793dda70bcd373d09055beb9949c1a8a4d0
Reviewed-on: https://skia-review.googlesource.com/5608
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
1edc5b92fecefb79f01cf0e302646eacf32b06c7 29-Nov-2016 Brian Salomon <bsalomon@google.com> Rename vars and functions from 'glslcaps'->'shadercaps'

Change-Id: I34d226d866dd4ba8e5f33f95cb8cbf01292f9314
Reviewed-on: https://skia-review.googlesource.com/5312
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
94efbf51f5a88d9e8aa961d3fbe38c5e335d6108 29-Nov-2016 Brian Salomon <bsalomon@google.com> Merge GrGLSLCaps into GrShaderCaps

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5121

Change-Id: If8d13638f80f42161cbc766a2666c5789e5772c8
Reviewed-on: https://skia-review.googlesource.com/5121
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
99938a8ef24e2dd5b39f78638742e9b50ab6d9bf 21-Nov-2016 Brian Salomon <bsalomon@google.com> Merge GrGLSLShaderVar and GrShaderVar

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5087

Change-Id: Ib8943a1da1ea495554feaf5b0992b94fbb9539ab
Reviewed-on: https://skia-review.googlesource.com/5087
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
db4183d227b764b219e9e314dd5387ded4c38797 17-Nov-2016 Brian Salomon <bsalomon@google.com> In GrProcessor::TextureSampler drop the "get", it's cleaner

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4962

Change-Id: I55e7f8d1b6e1097fdbe411e9989dd42a03dd5f33
Reviewed-on: https://skia-review.googlesource.com/4962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
0bbecb21ab82b3d742c491780bcc2e74be03efed 17-Nov-2016 Brian Salomon <bsalomon@google.com> Rename GrTextureAccess to GrProcessor::TextureSampler.

Renames vars and methods that used the work "access" to refer to this type.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931

Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee
Reviewed-on: https://skia-review.googlesource.com/4931
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
7f6cd90f0c8f6e8dd658cb1b1c587b833adfc364 10-Nov-2016 Robert Phillips <robertphillips@google.com> Start plumbing deferral of GPU resources in the image filters

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4688

Change-Id: I904d999ea87a55bee73765aa96a2f8aef7a0d61c
Reviewed-on: https://skia-review.googlesource.com/4688
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
67b39de70fb5d10caebfc75f418754186e5226c3 07-Nov-2016 Hal Canary <halcanary@google.com> s/SkAutoTUnref/sk_sp/ in src/ part 1

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4480

Change-Id: I7d3219b02ad5094785e1b7635a9482e69aadbc8c
Reviewed-on: https://skia-review.googlesource.com/4480
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
1105224f9701e57ec5ce0354d6a380b664f5c638 27-Oct-2016 Brian Osman <brianosman@google.com> Rename GrDrawContext to GrRenderTargetContext

This is in preparation for GrTextureContext and GrSurfaceContext

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030

Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
374772bd61951f01bf84fe17bf53d8867681c9ae 06-Oct-2016 reed <reed@google.com> Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002

TBR=

Review-Url: https://codereview.chromium.org/2396953002
/external/skia/src/effects/SkLightingImageFilter.cpp
c245574ba3d0e2ade6c94b2812de3baa383bf4c4 05-Oct-2016 Mike Reed <reed@google.com> Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8.

Reason for revert: new assert from 100K bot

Original change's description:
> Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"
>
> - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
> This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992
>
> Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
> Reviewed-on: https://skia-review.googlesource.com/2992
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff
Reviewed-on: https://skia-review.googlesource.com/3023
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
2b2fc7db4f8a4a4d4a51d7eb4df6aa62e309928d 05-Oct-2016 Mike Reed <reed@google.com> Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"

- perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992

Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
Reviewed-on: https://skia-review.googlesource.com/2992
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
3ed485f4249e17abb4b11f5018d03175fd1afb44 04-Oct-2016 Mike Reed <reed@google.com> Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a.

Reason for revert: failing to deserialize some of the 100K

Original change's description:
> Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
>
> This reverts commit 2cbcd12281ee807214df094964c584c78932e10b.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924
>
> Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
> Reviewed-on: https://skia-review.googlesource.com/2924
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f
Reviewed-on: https://skia-review.googlesource.com/2962
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
1834242ec6e3cd62669227d394bc79e1cd66dcfb 04-Oct-2016 Mike Reed <reed@google.com> Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit 2cbcd12281ee807214df094964c584c78932e10b.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924

Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
Reviewed-on: https://skia-review.googlesource.com/2924
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
2cbcd12281ee807214df094964c584c78932e10b 03-Oct-2016 Mike Reed <reed@google.com> Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"""

This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10.

legacy (100K) skp failure

Original change's description:
> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
>
> This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878
>
> Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
> Reviewed-on: https://skia-review.googlesource.com/2878
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=msarett@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5
Reviewed-on: https://skia-review.googlesource.com/2881
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
70cdb396eb5ffbbed128b902532e9292b5ec0e9d 03-Oct-2016 Mike Reed <reed@google.com> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""

This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878

Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
Reviewed-on: https://skia-review.googlesource.com/2878
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
ce02e7175872abde3721df9e5d3ec0ab8384cd8e 03-Oct-2016 Mike Reed <reed@google.com> Revert "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> replace SkXfermode obj with SkBlendMode enum in paints
>
> BUG=skia:5814
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714
>
> Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
> Reviewed-on: https://skia-review.googlesource.com/2714
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7
Reviewed-on: https://skia-review.googlesource.com/2871
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
0591897548c8fcb7d53cc94053e01702e58f1ac5 03-Oct-2016 Mike Reed <reed@google.com> replace SkXfermode obj with SkBlendMode enum in paints

BUG=skia:5814

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714

Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
Reviewed-on: https://skia-review.googlesource.com/2714
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkLightingImageFilter.cpp
fc6c37b981daeece7474ce61070c707c37eefa62 27-Sep-2016 Mike Klein <mtklein@chromium.org> Remove stray semicolons.

Turns out function declarations don't end in semicolons...

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720

No public API changes.
TBR=reed@google.com

Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb
Reviewed-on: https://skia-review.googlesource.com/2720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/src/effects/SkLightingImageFilter.cpp
5a9c2f110e4f1a78d9bfedcf708168909706d7fd 22-Sep-2016 brianosman <brianosman@google.com> sRGB cleanup in image filters. Ensure we configure paints correctly.

Net effect of the two calls is (basically) the same, but given that we're
propagating from isGammaCorrect on the DC, I figured it makes sense to use
the same-named API.

More importantly, a couple places had slipped through, so those draws would
ignore sRGB-ness of inputs entirely.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357413004

Review-Url: https://codereview.chromium.org/2357413004
/external/skia/src/effects/SkLightingImageFilter.cpp
2a75e5df300a2838f943ca52a52a85a5cf69802b 22-Sep-2016 brianosman <brianosman@google.com> Add output format properties to SkImageFilter::Context

For now, this is just the color space (of the original
requesting device). This is used when constructing
intermediate rendering surfaces, so that we ensure we
land in a surface that's similar/compatible to the
final consumer of the DAG's output.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357273002

Review-Url: https://codereview.chromium.org/2357273002
/external/skia/src/effects/SkLightingImageFilter.cpp
2695eaa41fbd208dcee9e134e180c6609856f0ac 21-Sep-2016 brianosman <brianosman@google.com> Fix some GPU image filter code to preserve precision and color space

On the pure-GPU path, we just have an SkSpecialImage (that's definitely
texture backed), and we need a renderable config for the draw context we
make. Added a helper function to pick - this is basically the high
precision analog of what we were doing before (always using 8888).

The assert that I added catches many other problems in image filter code,
but those fixes are coming in subsequent CLs.

12 GMs render correctly (or more correctly) in gpusrgb and gpuf16
configs. In most cases, they were drawing previously nothing.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2359443003

Review-Url: https://codereview.chromium.org/2359443003
/external/skia/src/effects/SkLightingImageFilter.cpp
3e6cf87b5cf48323efbf146e734bbadc7efb5078 20-Sep-2016 brianosman <brianosman@google.com> Cleanup some sRGB TODOs, mostly around setting GrPaint flags correctly

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358433004

Review-Url: https://codereview.chromium.org/2358433004
/external/skia/src/effects/SkLightingImageFilter.cpp
1a1aa9303484106a955e5549bf8ae24950f54e7a 12-Sep-2016 bsalomon <bsalomon@google.com> Remove unneeded GrGLSLTransformedCoordsArray type

Rename GrGLSLFragmentBuilder::ensureFSCoords2D to ensureCoords2D and make it take an arbitrary GrShaderVar.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324663004

Review-Url: https://codereview.chromium.org/2324663004
/external/skia/src/effects/SkLightingImageFilter.cpp
02fa32c6d1ef4b7b05aa06df8be4add42a1712d3 19-Aug-2016 csmartdalton <csmartdalton@google.com> Move GrFixedClip into src directory

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254343003

Review-Url: https://codereview.chromium.org/2254343003
/external/skia/src/effects/SkLightingImageFilter.cpp
6738c702423226619ee0172c12a3a007c5f68e57 27-Jul-2016 robertphillips <robertphillips@google.com> Rename GrContext's newDrawContext & drawContext to makeDrawContext

These both return sk_sp.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186073002

Review-Url: https://codereview.chromium.org/2186073002
/external/skia/src/effects/SkLightingImageFilter.cpp
dfe4f2e4fe5b162d4adb4486fe751f1e3b30bea7 21-Jul-2016 brianosman <brianosman@google.com> Add SkColorSpace to GrDrawContext

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164363002

Review-Url: https://codereview.chromium.org/2164363002
/external/skia/src/effects/SkLightingImageFilter.cpp
afbf71dd924c7bb46ccdac49e7408b4b088563ff 21-Jul-2016 brianosman <brianosman@google.com> Adding color space to SkSpecialImage

Mostly means that GPU backed special images need to be supplied (and
store) a color space object.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163343002

Review-Url: https://codereview.chromium.org/2163343002
/external/skia/src/effects/SkLightingImageFilter.cpp
54f30c13fc0a5d89797fc9be5f0fb1050d96b6f4 18-Jul-2016 brianosman <brianosman@google.com> Introduce GrColorSpaceXform, for gamut conversion on textures

GrTextureAccess optionally includes an instance, computed from the src
and dst color spaces. In all common cases (no color space for either src
or dst, or same color space for both), no object is allocated.

This change is orthogonal to my attempts to get color space attached to
render targets - regardless of how we choose to do that, this will give
us the source color space at all points where we are connecting src to
dst.

There are many dangling injection points where I've been inserting
nullptr, but I have a record of all of them. Additionally, there are now
three places (the most common simple paths for bitmap/image rendering)
where things are plumbed enough that I expect to have access to the dst
color space (all marked with XFORMTODO).

In addition to getting the dst color space, I need to inject shader code
and uniform uploading for appendTextureLookup and friends.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154753003

Review-Url: https://codereview.chromium.org/2154753003
/external/skia/src/effects/SkLightingImageFilter.cpp
06ca8ec87cf6fab57cadd043a5ac18c4154a4129 09-Jun-2016 bungeman <bungeman@google.com> sk_sp for Ganesh.

Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004

Review-Url: https://codereview.chromium.org/2041113004
/external/skia/src/effects/SkLightingImageFilter.cpp
846c051a4800b3cea341a0195db24297d6d9047f 13-May-2016 cdalton <cdalton@nvidia.com> Convert GrClip to an abstract base class

Converts GrClip to an abstract base class and adds a "GrFixedClip"
implementation. GrFixedClip denotes a clip implemented with fixed-
function hardware. GrFixedClip allows us to remove the stateful
"fClipMode" member from GrClipMaskManager, and in the future will
be able to nicely encapsulate window rectangles.

After this change GrClipMaskManager is just a wrapper around
GrDrawTarget. We may want to consider removing it altogether.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971343002

Review-Url: https://codereview.chromium.org/1971343002
/external/skia/src/effects/SkLightingImageFilter.cpp
76948d4faaca9fd7730576e2f79790ca8d93c10b 04-May-2016 robertphillips <robertphillips@google.com> Add Gr*Proxy classes

This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

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

Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

Review-Url: https://codereview.chromium.org/1937553002
/external/skia/src/effects/SkLightingImageFilter.cpp
4f16e6361db190d3cf1b6e8a117071cb0b54d0f5 03-May-2016 robertphillips <robertphillips@google.com> Revert of Add Gr*Proxy classes (patchset #10 id:220001 of https://codereview.chromium.org/1937553002/ )

Reason for revert:
ASAN

Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
>
> Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1944953002
/external/skia/src/effects/SkLightingImageFilter.cpp
92605b35efa0155c44d24bd8415b4cc1db8831db 03-May-2016 robertphillips <robertphillips@google.com> Add Gr*Proxy classes

This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

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

Review-Url: https://codereview.chromium.org/1937553002
/external/skia/src/effects/SkLightingImageFilter.cpp
89d09a1f70280cd0317d8a8d4e8973e5fa43182c 03-May-2016 robertphillips <robertphillips@google.com> Revert of Add Gr*Proxy classes (patchset #9 id:160001 of https://codereview.chromium.org/1937553002/ )

Reason for revert:
Seems to be breaking N7 & ANGLE bots

Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1949463002
/external/skia/src/effects/SkLightingImageFilter.cpp
de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1 03-May-2016 robertphillips <robertphillips@google.com> Add Gr*Proxy classes

This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

Review-Url: https://codereview.chromium.org/1937553002
/external/skia/src/effects/SkLightingImageFilter.cpp
d4c741e3d0e0fa633399691c47f76b6c7841ee83 28-Apr-2016 robertphillips <robertphillips@google.com> Refactor drawContext/RenderTarget creation
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002

Committed: https://skia.googlesource.com/skia/+/2f1c42e8448bbbadeb3df1c626faa90aa33f8907

Review-Url: https://codereview.chromium.org/1914883002
/external/skia/src/effects/SkLightingImageFilter.cpp
aa19a5fbc58e372df11443c90a25f02a04ecef52 28-Apr-2016 robertphillips <robertphillips@google.com> Revert of Refactor drawContext/RenderTarget creation (patchset #8 id:140001 of https://codereview.chromium.org/1914883002/ )

Reason for revert:
Experimental revert to see if this is blocking the DEPS roll.

Original issue's description:
> Refactor drawContext/RenderTarget creation
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002
>
> Committed: https://skia.googlesource.com/skia/+/2f1c42e8448bbbadeb3df1c626faa90aa33f8907

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1929833004
/external/skia/src/effects/SkLightingImageFilter.cpp
2f1c42e8448bbbadeb3df1c626faa90aa33f8907 27-Apr-2016 robertphillips <robertphillips@google.com> Refactor drawContext/RenderTarget creation
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002

Review-Url: https://codereview.chromium.org/1914883002
/external/skia/src/effects/SkLightingImageFilter.cpp
6c7e325236b7fbb9c9b14ebb4715f88a59718695 27-Apr-2016 robertphillips <robertphillips@google.com> Bring sk_sp to GrDrawContext

This is split out of: https://codereview.chromium.org/1914883002/ (Refactor drawContext/RenderTarget creation)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918003003

Review-Url: https://codereview.chromium.org/1918003003
/external/skia/src/effects/SkLightingImageFilter.cpp
c91fd3447e1d3452d5e43e70e371896c80645b61 25-Apr-2016 robertphillips <robertphillips@google.com> Add another dollop of sk_sp to SkSpecialImage and SkSpecialSurface

This is split out of https://codereview.chromium.org/1914883002/ (Refactor drawContext/RenderTarget creation)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1913743002

Review URL: https://codereview.chromium.org/1913743002
/external/skia/src/effects/SkLightingImageFilter.cpp
3e302275b324172c845627cbd00cee8a06571baf 20-Apr-2016 robertphillips <robertphillips@google.com> Begin removing deprecated (and now, unused) ImageFilter code paths

This CL focuses on removing the Proxy objects but takes some other stuff with it.

BUG=skia:4965
TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1896383003

Review URL: https://codereview.chromium.org/1896383003
/external/skia/src/effects/SkLightingImageFilter.cpp
ad3dc0da218cc43c9917a256d4afb8cf0d7c5899 15-Apr-2016 robertphillips <robertphillips@google.com> Switch SkLightingImageFilter over to new onFilterImage interface

TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1887103002

Review URL: https://codereview.chromium.org/1887103002
/external/skia/src/effects/SkLightingImageFilter.cpp
3f6f76f98b6b37d17d1492791ff0feb1b7586bd6 11-Apr-2016 cdalton <cdalton@nvidia.com> Rename EmitArgs::fSamplers to fTexSamplers

Renames fSamplers to fTexSamplers in GrProcessor EmitArgs, and renames
GrGLSLTextureSampler to GrGLSLSampler. This will allow us to add a
second array of buffer samplers.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862373003

Review URL: https://codereview.chromium.org/1862373003
/external/skia/src/effects/SkLightingImageFilter.cpp
82b043e87380a64ea4ca736b293ec0ee5c30e676 10-Apr-2016 robertphillips <robertphillips@google.com> Fix roll bot's win gn build

TBR=borenet@google.com,bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873063002

Review URL: https://codereview.chromium.org/1873063002
/external/skia/src/effects/SkLightingImageFilter.cpp
12fa47d33f1e9eb69bb20d9daad2eccfc7288944 09-Apr-2016 robertphillips <robertphillips@google.com> Update LightingImageFilter to sk_sp

TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869763002

Review URL: https://codereview.chromium.org/1869763002
/external/skia/src/effects/SkLightingImageFilter.cpp
898235c4864df66aa7f6d32bc2a8b8551040ce1e 06-Apr-2016 brianosman <brianosman@google.com> SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode.

Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering.

Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007

Review URL: https://codereview.chromium.org/1845283003
/external/skia/src/effects/SkLightingImageFilter.cpp
60c9b58b3214b0154c931656e91e39b230e987d8 03-Apr-2016 reed <reed@google.com> change flattenable factory to return sk_sp

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1855733002

Review URL: https://codereview.chromium.org/1855733002
/external/skia/src/effects/SkLightingImageFilter.cpp
2238c9dbca4b791edc512957728a18ce14d55912 30-Mar-2016 robertphillips <robertphillips@google.com> Update SkMergeImageFilter to sk_sp

TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1847583002

Review URL: https://codereview.chromium.org/1847583002
/external/skia/src/effects/SkLightingImageFilter.cpp
9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 29-Mar-2016 halcanary <halcanary@google.com> Style bikeshed - remove extraneous whitespace

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
/external/skia/src/effects/SkLightingImageFilter.cpp
8528541dd7f09f5bd76f3f1ce5f45d08ac7347c7 18-Feb-2016 cdalton <cdalton@nvidia.com> Add more specialized fragment builders

Adds specialized fragment builders for primitive and fragment
processors. Removes fragment-specific functionality from the Xfer
fragment builder.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709153002

Review URL: https://codereview.chromium.org/1709153002
/external/skia/src/effects/SkLightingImageFilter.cpp
48e78468f5f6b900d476e616bdb1ba457c8f0b2a 17-Feb-2016 robertphillips <robertphillips@google.com> Mark existing image filter entry points that will be going away with Deprecated
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709753002

Review URL: https://codereview.chromium.org/1709753002
/external/skia/src/effects/SkLightingImageFilter.cpp
9bd5f746ca45ebec0ed3b54dcbd6cf5fc2754c3c 17-Feb-2016 senorblanco <senorblanco@chromium.org> Remove 6-param applyCropRect() from lighting filters (GPU path).

This required adding a texture domain effect if the destination bounds are not contained within the source bounds.

BUG=skia:4502
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1698913004

Review URL: https://codereview.chromium.org/1698913004
/external/skia/src/effects/SkLightingImageFilter.cpp
84f0e745839a0cb5ff5055f5ea0726bdd83b920b 16-Feb-2016 senorblanco <senorblanco@chromium.org> Remove 6-param applyCropRect() from lighting filters (raster path).

BUG=skia:4502
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1701133002

Review URL: https://codereview.chromium.org/1701133002
/external/skia/src/effects/SkLightingImageFilter.cpp
5e58ceea8569f0d90ff7e3daf5de2def50407212 11-Feb-2016 cdalton <cdalton@nvidia.com> Add GrShaderFlags enum

Replaces GrGLSLUniformHandler::ShaderVisibility with GrShaderFlags.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684063006

Review URL: https://codereview.chromium.org/1684063006
/external/skia/src/effects/SkLightingImageFilter.cpp
d3b32bf8322877cf263229735aef4f04df5415c4 05-Feb-2016 robertphillips <robertphillips@google.com> Last bit of GrGLSLFragmentProcessor-derived class cleanup

I believe these are the last two that used the dispreferred constructor pattern.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1667953005

Review URL: https://codereview.chromium.org/1667953005
/external/skia/src/effects/SkLightingImageFilter.cpp
1de87df0b743e30619b8ba93ab0169fd41d0feae 14-Jan-2016 robertphillips <robertphillips@google.com> Refactor to use GrWrapTextureInBitmap more

Too many wrap_texture methods!

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584933002

Review URL: https://codereview.chromium.org/1584933002
/external/skia/src/effects/SkLightingImageFilter.cpp
4e23cdaa6b892afeaa150c6d74099dc6c2065b7e 11-Jan-2016 reed <reed@google.com> remove imagefilter::sizeconstraint

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571033002

Review URL: https://codereview.chromium.org/1571033002
/external/skia/src/effects/SkLightingImageFilter.cpp
7ea439b2203855db97330b25945b87dd4b170b8b 03-Dec-2015 egdaniel <egdaniel@google.com> Create GLSLUniformHandler class for gpu backend

BUG=skia:

Review URL: https://codereview.chromium.org/1490283004
/external/skia/src/effects/SkLightingImageFilter.cpp
c4b72720e75313079212e69e46a5ef7c474b2305 23-Nov-2015 egdaniel <egdaniel@google.com> Don't create a GXPFactory when blend is SrcOver

BUG=skia:

Review URL: https://codereview.chromium.org/1471053002
/external/skia/src/effects/SkLightingImageFilter.cpp
4ca2e6034365ad280ec64473f7f1d72ebd8335e4 18-Nov-2015 egdaniel <egdaniel@google.com> Add ShaderBuilders to EmitArgs and remove gettings from ProgBuilder.

BUG=skia:

Review URL: https://codereview.chromium.org/1457543003
/external/skia/src/effects/SkLightingImageFilter.cpp
e004bfc0a5e28cc083158f1a75e981ffd58a8134 16-Nov-2015 robertphillips <robertphillips@google.com> Increase the amount of debug information printed out by batches

Untangling MDB bugs requires more information. In particular the render targets.

BUG=skia:4094
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1443763002
/external/skia/src/effects/SkLightingImageFilter.cpp
57d3b039c635945e1dc2fcbac3462ed8bfedb068 13-Nov-2015 egdaniel <egdaniel@google.com> Rename some processor functions from GL to GLSL

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1443743002
/external/skia/src/effects/SkLightingImageFilter.cpp
64c4728c70001ed074fecf5c4e083781987b12e9 13-Nov-2015 egdaniel <egdaniel@google.com> Make all GrFragmentProcessors GL independent.

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1434313002
/external/skia/src/effects/SkLightingImageFilter.cpp
2d721d33aad192cc8a7a1321504b39bdca2a57ce 11-Nov-2015 egdaniel <egdaniel@google.com> Move all ShaderBuilder files to GLSL

BUG=skia:

Review URL: https://codereview.chromium.org/1438003003
/external/skia/src/effects/SkLightingImageFilter.cpp
8dcdedc4a087ea46ce1e2458d335d60918e56310 11-Nov-2015 egdaniel <egdaniel@google.com> Make GrGLSLProgramBuilder base class for GrGLProgramBuilder.

This CL still keeps the weird diamond shape we have for all our ProgramBuilders.
However, the GrGLSL base class will allow us to pull multiple other parts
of our program setup away from GL which will eventually allow us to break up
the diamond.

As part of this all ShaderBuilder subclass have been made gl independent,
however I will move them to GLSL files/class names in a follow on CL.

BUG=skia:

Review URL: https://codereview.chromium.org/1416423003
/external/skia/src/effects/SkLightingImageFilter.cpp
a2e69fcdedbd9a7762620e0e9dcdd86596369cff 05-Nov-2015 bsalomon <bsalomon@google.com> Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/1409753008
/external/skia/src/effects/SkLightingImageFilter.cpp
018fb62d12d1febf121fe265da5b6117b86a6541 28-Oct-2015 egdaniel <egdaniel@google.com> Create GLSL base class for ProgramDataManager

BUG=skia:

Review URL: https://codereview.chromium.org/1428543003
/external/skia/src/effects/SkLightingImageFilter.cpp
51eedb6e7db0de1d81128b727bfb9df60d77aa98 23-Oct-2015 senorblanco <senorblanco@chromium.org> Fix some GPU filters to use the correct size constraint.

BUG=skia:

Review URL: https://codereview.chromium.org/1412863006
/external/skia/src/effects/SkLightingImageFilter.cpp
0d3f061262a53b775f0a92b0abf8a4a846290d65 21-Oct-2015 egdaniel <egdaniel@google.com> Move GrGLShaderVar to GrGLSL

BUG=skia:

Review URL: https://codereview.chromium.org/1417123002
/external/skia/src/effects/SkLightingImageFilter.cpp
1d3ff434954189e194c468f429598465146dcf4b 20-Oct-2015 senorblanco <senorblanco@chromium.org> Image filters: Replace all use of tryAllocPixels() with createDevice().

In order to have a central pinch point for bitmap allocation, change all
filters to use Proxy::createDevice() instead of allocating memory
directly with SkBitmap::tryAllocPixels().

This will aid in moving filter backing stores and caches to
discardable memory.

BUG=skia:

Review URL: https://codereview.chromium.org/1414843003
/external/skia/src/effects/SkLightingImageFilter.cpp
0bccd8749bdce79b2d71518fe65783b1a9b06445 20-Oct-2015 caryclark <caryclark@google.com> Revert of Update feSpotLight to match spec (patchset #2 id:20001 of https://codereview.chromium.org/1403403003/ )

Reason for revert:
re-land once layout test have been disabled (so they can be rebased)

Original issue's description:
> Update feSpotLight to match spec
>
> This change updates feSpotLight to match the spec via two changes:
>
> 1) specularExponent is ignored if the spotlight has no coneAngle (GPU
> bug only). This change updates the GPU path so that it matches the
> CPU path and the spec in this regard.
>
> 2) specularExponent is clamped to the 1-128 range. The spec does not
> specify a clamp for the specularExponent attribute of feSpotLight.
> Note that the spec *does* specify this clamp for the
> specularExponent attribute of feSpecularLighting. It looks like we
> incorrectly applied this to both specularExponent attributes.
>
> This change (along with a parallel change in Blink) allows us to pass
> the SVG filter effects conformance test here:
> http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObject/filters-light-01-f.html
>
> Additionally, this brings our behavior in line with Safari and Edge’s
> behavior on this filter.
>
> Two new cases were added to gm/lighting.cpp to catch these issues:
> - The existing spotlight case exercised the path where our specular
> exponent was between 1-128 and had a limiting cone angle.
> - The first new spotlight case exercises the path where our specular
> exponent is between 1-128 and we do not have a limiting cone angle.
> - The second new spotlight case exercises the path where the specular
> exponent is not within the 1-128 range, to ensure that we don’t
> incorrectly clip to this range.
>
> BUG=472849
>
> Committed: https://skia.googlesource.com/skia/+/c84ccb070258db2803a9e8f532bfe7239a737063

TBR=senorblanco@google.com,senorblanco@chromium.org,bsalomon@google.com,ericrk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=472849

Review URL: https://codereview.chromium.org/1417463006
/external/skia/src/effects/SkLightingImageFilter.cpp
c84ccb070258db2803a9e8f532bfe7239a737063 19-Oct-2015 ericrk <ericrk@chromium.org> Update feSpotLight to match spec

This change updates feSpotLight to match the spec via two changes:

1) specularExponent is ignored if the spotlight has no coneAngle (GPU
bug only). This change updates the GPU path so that it matches the
CPU path and the spec in this regard.

2) specularExponent is clamped to the 1-128 range. The spec does not
specify a clamp for the specularExponent attribute of feSpotLight.
Note that the spec *does* specify this clamp for the
specularExponent attribute of feSpecularLighting. It looks like we
incorrectly applied this to both specularExponent attributes.

This change (along with a parallel change in Blink) allows us to pass
the SVG filter effects conformance test here:
http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObject/filters-light-01-f.html

Additionally, this brings our behavior in line with Safari and Edge’s
behavior on this filter.

Two new cases were added to gm/lighting.cpp to catch these issues:
- The existing spotlight case exercised the path where our specular
exponent was between 1-128 and had a limiting cone angle.
- The first new spotlight case exercises the path where our specular
exponent is between 1-128 and we do not have a limiting cone angle.
- The second new spotlight case exercises the path where the specular
exponent is not within the 1-128 range, to ensure that we don’t
incorrectly clip to this range.

BUG=472849

Review URL: https://codereview.chromium.org/1403403003
/external/skia/src/effects/SkLightingImageFilter.cpp
9a70b6ef59c38f3cbe6646aed624f22155326d05 16-Oct-2015 senorblanco <senorblanco@chromium.org> Image filters: refactor input GPU processing into filterInputGPU().

(analog of CPU version here: https://codereview.chromium.org/1404743005/)

No change in behaviour; this is a straight refactoring.

BUG=skia:3194

Review URL: https://codereview.chromium.org/1393283008
/external/skia/src/effects/SkLightingImageFilter.cpp
b9519f86bbce946e505980a4fa950fdc4bcf74ab 15-Oct-2015 senorblanco <senorblanco@chromium.org> Image Filters: refactor all CPU input processing into a filterInput helper function.

No change in behaviour; this is a straight refactoring.

BUG=skia:3194

Review URL: https://codereview.chromium.org/1404743005
/external/skia/src/effects/SkLightingImageFilter.cpp
2e1e51f04985f7c258b96f0decc190456f5dd74d 15-Oct-2015 robertphillips <robertphillips@google.com> GrDrawContext now holds GrRenderTarget pointer

Review URL: https://codereview.chromium.org/1404823005
/external/skia/src/effects/SkLightingImageFilter.cpp
4a339529612a43871d021877e58698e067d6c4cd 06-Oct-2015 bsalomon <bsalomon@google.com> Bye bye processor data manager.

Review URL: https://codereview.chromium.org/1388113002
/external/skia/src/effects/SkLightingImageFilter.cpp
c9a3706f1ee38c331610ec1e872d9a658566c397 01-Sep-2015 robertphillips <robertphillips@google.com> Limit lifetime of GrDrawContext objects

GrDrawContext's are about to become real allocated objects. This CL sets up the machinery so they won't leak.

Review URL: https://codereview.chromium.org/1321353002
/external/skia/src/effects/SkLightingImageFilter.cpp
c21b09eec91c9e263cb0b88467ea44e348ed4962 29-Aug-2015 bsalomon <bsalomon@google.com> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*

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

Review URL: https://codereview.chromium.org/1316513002
/external/skia/src/effects/SkLightingImageFilter.cpp
a511e6ad1042093bea5b015c22a920313fc57c0b 29-Aug-2015 rmistry <rmistry@google.com> Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (patchset #8 id:140001 of https://codereview.chromium.org/1316513002/ )

Reason for revert:
Primary suspect in failing DEPS rolls:
* https://codereview.chromium.org/1315753006
* https://codereview.chromium.org/1308323006
* https://codereview.chromium.org/1320903004

Primary suspect because the failing win bots did not fail in https://codereview.chromium.org/1315753005

Original issue's description:
> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
>
> Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa

TBR=joshualitt@google.com,wangyix@google.com,robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1313573005
/external/skia/src/effects/SkLightingImageFilter.cpp
ecfdc251be71f3d634e76afdd6375bf55fc061aa 28-Aug-2015 bsalomon <bsalomon@google.com> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*

Review URL: https://codereview.chromium.org/1316513002
/external/skia/src/effects/SkLightingImageFilter.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/effects/SkLightingImageFilter.cpp
ac856c97acc84dcb54d9cdb068ec8a02b8869647 27-Aug-2015 bsalomon <bsalomon@google.com> Remove GrStagedProcessor, remove the word Stage as it applies to FPs

Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

Review URL: https://codereview.chromium.org/1307223004
/external/skia/src/effects/SkLightingImageFilter.cpp
7b7ecfc046f7ec810482266db3430d1358b7a5bf 26-Aug-2015 senorblanco <senorblanco@chromium.org> Fix clipped lighting image filters.

The CPU path for lighting image filters was not adjusting the filter
matrix to accommodate srcOffset, resulting in incorrectly-positioned
lights. (The GPU path was doing this correctly.)

This change adds a new test case to the imagefiltersclipped GM,
so it will need new baselines.

BUG=skia:

Review URL: https://codereview.chromium.org/1310053004
/external/skia/src/effects/SkLightingImageFilter.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/src/effects/SkLightingImageFilter.cpp
4bf69f7bbc073c1dc257f93f8c5b2a530123cb3c 26-Aug-2015 rmistry <rmistry@google.com> Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )

Reason for revert:
Causes bot failures:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223

Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1306803003
/external/skia/src/effects/SkLightingImageFilter.cpp
24243446cdf7b7e4e132c2a0c387c7723777e0c7 26-Aug-2015 bsalomon <bsalomon@google.com> Remove GrStagedProcessor, remove the word Stage as it applies to FPs

Review URL: https://codereview.chromium.org/1307223004
/external/skia/src/effects/SkLightingImageFilter.cpp
2f0dbc761a626473c19db7de561c7072b12953c5 20-Aug-2015 robertphillips <robertphillips@google.com> Update SkLightingShader to support rotation

This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Committed: https://skia.googlesource.com/skia/+/45b59ed6e4e231814dbdb9f707b3d2a7ee50de84

Review URL: https://codereview.chromium.org/1291783003
/external/skia/src/effects/SkLightingImageFilter.cpp
b1daa86732fe70aa4630c89d75ff0fd619d77c77 18-Aug-2015 wangyix <wangyix@google.com> When getGLInstance is called on a frag proc, the resulting GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code.

BUG=skia:4182

Review URL: https://codereview.chromium.org/1287023009
/external/skia/src/effects/SkLightingImageFilter.cpp
4b3050b410254d0cb38df9a30ae2e209124fa1a2 04-Aug-2015 wangyix <wangyix@google.com> Added registerChild; transforms, textures, glKey automatically handled.

BUG=skia:

Review URL: https://codereview.chromium.org/1266633003
/external/skia/src/effects/SkLightingImageFilter.cpp
eae6200acbec2255ac00ab363ffbe16758ec9076 31-Jul-2015 bsalomon <bsalomon@google.com> Some cleanup in GrTextureProvider and GrResourceProvider.

Review URL: https://codereview.chromium.org/1261643004
/external/skia/src/effects/SkLightingImageFilter.cpp
7c157a988845fb00f9024d6db6dda142c3458033 23-Jul-2015 wangyix <wangyix@google.com> Added GrGLFragmentProcessor::EmitArgs struct for use with emitCode()

BUG=skia:

Review URL: https://codereview.chromium.org/1251173002
/external/skia/src/effects/SkLightingImageFilter.cpp
6af0c9394301b9f976813cc6dbdbbfe779030fe1 22-Jul-2015 wangyix <wangyix@google.com> Moved GrGLFragmentProcessor definition to its own file

BUG=skia:

Review URL: https://codereview.chromium.org/1246193002
/external/skia/src/effects/SkLightingImageFilter.cpp
992c7612394a26e36ba355f6d8d3801d8d8f1260 17-Jul-2015 jvanverth <jvanverth@google.com> Reland of Add fast normalize for SkLightingImageFilter. (patchset #1 id:1 of https://codereview.chromium.org/1244523002/)

Reason for revert:
Florin will rebaseline the images.

Original issue's description:
> Revert of Add fast normalize for SkLightingImageFilter. (patchset #2 id:20001 of https://codereview.chromium.org/1240023002/)
>
> Reason for revert:
> Speculative revert -- DEPS roll block on linux_blink_rel
>
> https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/71483/layout-test-results/results.html
>
> Original issue's description:
> > Add fast normalize for SkLightingImageFilter.
> >
> > The normalize routine in SkPoint3 is very robust. However, for simple
> > lighting cases we prefer speed over robustness. This fixes a perf
> > regression in smoothness.tough_filters_cases.
> >
> > BUG=chromium:510562
> >
> > Committed: https://skia.googlesource.com/skia/+/dfa0ecf169db87f7afddd93bc1c500de481a62c7
>
> TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org,jvanverth@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:510562
>
> Committed: https://skia.googlesource.com/skia/+/ac66a8122b27c388cc74b3913d9a9be351a44e54

TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:510562

Review URL: https://codereview.chromium.org/1241583007
/external/skia/src/effects/SkLightingImageFilter.cpp
ac66a8122b27c388cc74b3913d9a9be351a44e54 17-Jul-2015 reed <reed@chromium.org> Revert of Add fast normalize for SkLightingImageFilter. (patchset #2 id:20001 of https://codereview.chromium.org/1240023002/)

Reason for revert:
Speculative revert -- DEPS roll block on linux_blink_rel

https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/71483/layout-test-results/results.html

Original issue's description:
> Add fast normalize for SkLightingImageFilter.
>
> The normalize routine in SkPoint3 is very robust. However, for simple
> lighting cases we prefer speed over robustness. This fixes a perf
> regression in smoothness.tough_filters_cases.
>
> BUG=chromium:510562
>
> Committed: https://skia.googlesource.com/skia/+/dfa0ecf169db87f7afddd93bc1c500de481a62c7

TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:510562

Review URL: https://codereview.chromium.org/1244523002
/external/skia/src/effects/SkLightingImageFilter.cpp
dfa0ecf169db87f7afddd93bc1c500de481a62c7 16-Jul-2015 jvanverth <jvanverth@google.com> Add fast normalize for SkLightingImageFilter.

The normalize routine in SkPoint3 is very robust. However, for simple
lighting cases we prefer speed over robustness. This fixes a perf
regression in smoothness.tough_filters_cases.

BUG=chromium:510562

Review URL: https://codereview.chromium.org/1240023002
/external/skia/src/effects/SkLightingImageFilter.cpp
3d32d768cd8b66c49c070495c08f7933b9dd2423 13-Jul-2015 robertphillips <robertphillips@google.com> Add new SkPoint3 class

The existing Light filter and the upcoming Lighting Shader both need a Point3 class

Review URL: https://codereview.chromium.org/1229693009
/external/skia/src/effects/SkLightingImageFilter.cpp
5f10b5c1b5744106312e24835d235b72fdba5802 09-Jul-2015 joshualitt <joshualitt@chromium.org> More threading of GrProcessorDataManager

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1230813003
/external/skia/src/effects/SkLightingImageFilter.cpp
0067ff5e0f85084dd2b5ad9886b526482b89a116 08-Jul-2015 joshualitt <joshualitt@chromium.org> fix up test create functions

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1213623022
/external/skia/src/effects/SkLightingImageFilter.cpp
2766c00fc0b6a07d46e5f74cdad45da2ef625237 26-Jun-2015 mtklein <mtklein@chromium.org> remove SkInstCnt

It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
/external/skia/src/effects/SkLightingImageFilter.cpp
cabe20cafd5f091a68bbc2c0c48755ba9b61b0b7 01-Jun-2015 kkinnunen <kkinnunen@nvidia.com> Refactor GrGpu path rendering functions to GrPathRendering

GrGpu, GrGLGpu, GrPathRendering, GrGLPathRendering all duplicated
each others' path rendering related member functions. Make
GrPathRending the logical extension of GrGpu by removing the methods
from GrGpu. Similarly to the GL variants.

Changes includes and forward declarations due to removing
GrDrawTarget.h include from GrGpu.h. This was necessary due to
GrDrawTarget.h including GrPathRendering.h, and now GrPathRendering.h
includes GrGpu.h. (Also GrGpu.h does not need GrDrawTarget.h anymore).

Very slight runtime improvement on x86_64:
desk_fontwipe.skp_1 836us -> 841us 1.01x
desk_silkfinance.skp_1 2.01ms -> 2.01ms 1x
desk_forecastio.skp_1 7.03ms -> 7.05ms 1x
desk_weather.skp_1 3.74ms -> 3.74ms 1x
desk_twitter.skp_1 8.02ms -> 8.01ms 1x
desk_mapsvg.skp_1 5.24ms -> 5.23ms 1x
desk_pokemonwiki.skp_1 7.06ms -> 7.03ms 1x
desk_sfgate.skp_1 3.19ms -> 3.17ms 1x
tabl_cuteoverload.skp_1 2.66ms -> 2.64ms 0.99x
...
tabl_transformice.skp_1 3.06ms -> 2.98ms 0.98x
tabl_googlecalendar.skp_1 11.3ms -> 11ms 0.97x
tabl_gamedeksiam.skp_1 12.8ms -> 12.4ms 0.97x
desk_samoasvg.skp_1 10.6ms -> 10.3ms 0.97x
tabl_worldjournal.skp_1 4.44ms -> 4.3ms 0.97x

Review URL: https://codereview.chromium.org/1157683006
/external/skia/src/effects/SkLightingImageFilter.cpp
ea4615034498aca2f9ca1753fb9a1ef10508d8cc 26-May-2015 robertphillips <robertphillips@google.com> Split drawing functionality out of GrContext and into new GrDrawContext

This is mainly a mechanical CL. There were some fiddly bits in GrContext.cpp where it no longer had access to the GrDrawTarget (and had to use the new GrDrawContext).

I've converted GrAARectRenderer & GrOvalRenderer into static classes so I could stop allocating them.

Review URL: https://codereview.chromium.org/1151283004
/external/skia/src/effects/SkLightingImageFilter.cpp
4b91f768b348aa1cebeb54f3ff9331938734c242 19-May-2015 bsalomon <bsalomon@google.com> rename GrDrawTargetCaps to GrCaps

Review URL: https://codereview.chromium.org/1133123009
/external/skia/src/effects/SkLightingImageFilter.cpp
80ea19ca4bdd68c1493666a5fe7e4ce9d43ded8b 12-May-2015 reed <reed@google.com> Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/)

Reason for revert:
android patched, blink has rolled

Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec

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

Review URL: https://codereview.chromium.org/1135693003
/external/skia/src/effects/SkLightingImageFilter.cpp
2629697933b5cc975e45d2a45c48f803fc6cbcec 12-May-2015 reed <reed@google.com> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)

Reason for revert:
need to wait for Blink roll (and patch android)

Original issue's description:
> stop calling SkScalarDiv
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a

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

Review URL: https://codereview.chromium.org/1138263002
/external/skia/src/effects/SkLightingImageFilter.cpp
67d71c898249a7af3523b16c6a69895a63bfae0a 12-May-2015 reed <reed@google.com> stop calling SkScalarDiv

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1135053002
/external/skia/src/effects/SkLightingImageFilter.cpp
d309e7aa0efa2d5dd7e7b1af97026fcd3a047e98 30-Apr-2015 bsalomon <bsalomon@google.com> This replaces the texture creation/caching functions on GrContext with a GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types.

Review URL: https://codereview.chromium.org/1107973004
/external/skia/src/effects/SkLightingImageFilter.cpp
29bee0fe657fabf7c396502b69c9167fba13eaaa 29-Apr-2015 egdaniel <egdaniel@google.com> Make XPFragmentBuilder only Builder with access to DstCopy.
Plus a bunch of renaming.

BUG=skia:

Review URL: https://codereview.chromium.org/1110033004
/external/skia/src/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.cpp
d0d37cace08f12abf8d316e6949e947551d418e6 02-Apr-2015 senorblanco <senorblanco@chromium.org> Implement approx-match support in image filter saveLayer() offscreen.

Currently, the GPU-side image filter implementation creates
exact-match textures for the offscreen backing stores for
saveLayer(). This is because several filters have GPU
implementations which depend on the texture coordinates
being 0..1.

The fix is three-fold:

1) Store the actual requested size in the SkGpuDevice, so
that when wrapping it in an SkBitmap for passing to
filterImage(), we can give it the original size.
2) Fix the filters (SkMagnifierImageFilter,
SkLightingImageFilter, SkMatrixConvolutionImageFilter,
SkMatrixImageFilter) whose GPU implementation depends on
0..1 texture coordinates.
3) Remove the exception for GPU-side image filters in
SkCanvas::internalSaveLayer().

For the lighting filters, there were two bugs which were
cancelling each other out: the sobel filter matrix was
being computed upside down, but then we'd negate the
resulting normal. This worked fine in the exact-match case,
but in the approx-match case we'd sample garbage along
the edge pixels. Also, we never implemented the edge pixels
according to spec in the GPU case. It requires a
different fragment shader for each edge of the nine-patch,
which meant we couldn't use asFragmentProcessor(), and had
to implement the drawing via a filterImageGPU() override.
In order to avoid polluting the public API, I inserted a
new base class, SkLightingImageFilterInternal above
Sk[Diffuse|Specular]LightingImageFilter to handle the
implementation.

For the SkMatrixConvolutionImageFilter, it seems the
GLSL clamp() function occasionally returns values outside
the clamped range, resulting in access of garbage
texels even in GL_NEAREST. The fix here is to clamp to a
rect inset by half a texel. There was also a bug in
the unpremultiply step when fConvolveAlpha is false.

For SkMatrixImageFilter, the fix was to make the generic
draw path be more careful about when to use texture domain.
If the bitmap already has a texture, use texture domain
if the srcRect is smaller than the entire texture (not
the entire bitmap).

N.B.: this change will cause some minor pixel diffs in the
GPU results of the following GMs (and possibly more):
matriximagefilter, matrixconvolution, imagefiltersscaled,
lighting, imagemagnifier, filterfastbounds,
complexclip_aa_Layer_invert, complexclip_aa_layer,
complexclip_bw_layer_invert, complexclip_bw_layer.

BUG=skia:3532

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

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

Committed: https://skia.googlesource.com/skia/+/46112cf2a7c7307f1c9eebb5f881cbda15aa460c

Review URL: https://codereview.chromium.org/1034733002
/external/skia/src/effects/SkLightingImageFilter.cpp
82973dbf4f22928e8dd75c8bc5b155f842c8a557 02-Apr-2015 rmistry <rmistry@google.com> Revert of Implement approx-match support in image filter saveLayer() offscreen. (patchset #31 id:590001 of https://codereview.chromium.org/1034733002/)

Reason for revert:
Spoke to Stephen about this. Reverting because failing debug builds:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/51
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/54

Original issue's description:
> Implement approx-match support in image filter saveLayer() offscreen.
>
> Currently, the GPU-side image filter implementation creates
> exact-match textures for the offscreen backing stores for
> saveLayer(). This is because several filters have GPU
> implementations which depend on the texture coordinates
> being 0..1.
>
> The fix is three-fold:
>
> 1) Store the actual requested size in the SkGpuDevice, so
> that when wrapping it in an SkBitmap for passing to
> filterImage(), we can give it the original size.
> 2) Fix the filters (SkMagnifierImageFilter,
> SkLightingImageFilter, SkMatrixConvolutionImageFilter,
> SkMatrixImageFilter) whose GPU implementation depends on
> 0..1 texture coordinates.
> 3) Remove the exception for GPU-side image filters in
> SkCanvas::internalSaveLayer().
>
> For the lighting filters, there were two bugs which were
> cancelling each other out: the sobel filter matrix was
> being computed upside down, but then we'd negate the
> resulting normal. This worked fine in the exact-match case,
> but in the approx-match case we'd sample garbage along
> the edge pixels. Also, we never implemented the edge pixels
> according to spec in the GPU case. It requires a
> different fragment shader for each edge of the nine-patch,
> which meant we couldn't use asFragmentProcessor(), and had
> to implement the drawing via a filterImageGPU() override.
> In order to avoid polluting the public API, I inserted a
> new base class, SkLightingImageFilterInternal above
> Sk[Diffuse|Specular]LightingImageFilter to handle the
> implementation.
>
> For the SkMatrixConvolutionImageFilter, it seems the
> GLSL clamp() function occasionally returns values outside
> the clamped range, resulting in access of garbage
> texels even in GL_NEAREST. The fix here is to clamp to a
> rect inset by half a texel. There was also a bug in
> the unpremultiply step when fConvolveAlpha is false.
>
> For SkMatrixImageFilter, the fix was to make the generic
> draw path be more careful about when to use texture domain.
> If the bitmap already has a texture, use texture domain
> if the srcRect is smaller than the entire texture (not
> the entire bitmap).
>
> N.B.: this change will cause some minor pixel diffs in the
> GPU results of the following GMs (and possibly more):
> matriximagefilter, matrixconvolution, imagefiltersscaled,
> lighting, imagemagnifier, filterfastbounds,
> complexclip_aa_Layer_invert, complexclip_aa_layer,
> complexclip_bw_layer_invert, complexclip_bw_layer.
>
> BUG=skia:3532
>
> Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9
>
> Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641
>
> Committed: https://skia.googlesource.com/skia/+/46112cf2a7c7307f1c9eebb5f881cbda15aa460c

TBR=bsalomon@google.com,reed@chromium.org,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3532

Review URL: https://codereview.chromium.org/1057693002
/external/skia/src/effects/SkLightingImageFilter.cpp
46112cf2a7c7307f1c9eebb5f881cbda15aa460c 01-Apr-2015 senorblanco <senorblanco@chromium.org> Implement approx-match support in image filter saveLayer() offscreen.

Currently, the GPU-side image filter implementation creates
exact-match textures for the offscreen backing stores for
saveLayer(). This is because several filters have GPU
implementations which depend on the texture coordinates
being 0..1.

The fix is three-fold:

1) Store the actual requested size in the SkGpuDevice, so
that when wrapping it in an SkBitmap for passing to
filterImage(), we can give it the original size.
2) Fix the filters (SkMagnifierImageFilter,
SkLightingImageFilter, SkMatrixConvolutionImageFilter,
SkMatrixImageFilter) whose GPU implementation depends on
0..1 texture coordinates.
3) Remove the exception for GPU-side image filters in
SkCanvas::internalSaveLayer().

For the lighting filters, there were two bugs which were
cancelling each other out: the sobel filter matrix was
being computed upside down, but then we'd negate the
resulting normal. This worked fine in the exact-match case,
but in the approx-match case we'd sample garbage along
the edge pixels. Also, we never implemented the edge pixels
according to spec in the GPU case. It requires a
different fragment shader for each edge of the nine-patch,
which meant we couldn't use asFragmentProcessor(), and had
to implement the drawing via a filterImageGPU() override.
In order to avoid polluting the public API, I inserted a
new base class, SkLightingImageFilterInternal above
Sk[Diffuse|Specular]LightingImageFilter to handle the
implementation.

For the SkMatrixConvolutionImageFilter, it seems the
GLSL clamp() function occasionally returns values outside
the clamped range, resulting in access of garbage
texels even in GL_NEAREST. The fix here is to clamp to a
rect inset by half a texel. There was also a bug in
the unpremultiply step when fConvolveAlpha is false.

For SkMatrixImageFilter, the fix was to make the generic
draw path be more careful about when to use texture domain.
If the bitmap already has a texture, use texture domain
if the srcRect is smaller than the entire texture (not
the entire bitmap).

N.B.: this change will cause some minor pixel diffs in the
GPU results of the following GMs (and possibly more):
matriximagefilter, matrixconvolution, imagefiltersscaled,
lighting, imagemagnifier, filterfastbounds,
complexclip_aa_Layer_invert, complexclip_aa_layer,
complexclip_bw_layer_invert, complexclip_bw_layer.

BUG=skia:3532

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

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

Review URL: https://codereview.chromium.org/1034733002
/external/skia/src/effects/SkLightingImageFilter.cpp
7c0273f107d571a2147e4b2ad3f36c917bb12b22 01-Apr-2015 rmistry <rmistry@google.com> Revert of Implement approx-match support in image filter saveLayer() offscreen. (patchset #27 id:510001 of https://codereview.chromium.org/1034733002/)

Reason for revert:
Looks like this change is causing layout test failures which is blocking Skia's DEPS roll into Chromium:
https://codereview.chromium.org/1050563002/
https://codereview.chromium.org/1043133005/
https://codereview.chromium.org/1048273002/

Reverting to see if this fixes the DEPS roll.

Original issue's description:
> Implement approx-match support in image filter saveLayer() offscreen.
>
> Currently, the GPU-side image filter implementation creates
> exact-match textures for the offscreen backing stores for
> saveLayer(). This is because several filters have GPU
> implementations which depend on the texture coordinates
> being 0..1.
>
> The fix is three-fold:
>
> 1) Store the actual requested size in the SkGpuDevice, so
> that when wrapping it in an SkBitmap for passing to
> filterImage(), we can give it the original size.
> 2) Fix the filters (SkMagnifierImageFilter,
> SkLightingImageFilter) whose GPU implementation depends on
> 0..1 texture coordinates.
> 3) Remove the exception for GPU-side image filters in
> SkCanvas::internalSaveLayer().
>
> For the lighting filters, there were two bugs which were
> cancelling each other out: the sobel filter matrix was
> being computed upside down, but then we'd negate the
> resulting normal. This worked fine in the exact-match case,
> but in the approx-match case we'd sample garbage along
> the edge pixels. Also, we never implemented the edge pixels
> according to spec in the GPU case. It requires a
> different fragment shader for each edge of the nine-patch,
> which meant we couldn't use asFragmentProcessor(), and had
> to implement the drawing via a filterImageGPU() override.
> In order to avoid polluting the public API, I inserted a
> new base class, SkLightingImageFilterInternal above
> Sk[Diffuse|Specular]LightingImageFilter to handle the
> implementation.
>
> N.B.: this change will cause some minor pixel diffs in the
> GPU results of the following GMs (and possibly more):
> matriximagefilter, matrixconvolution, imagefiltersscaled,
> lighting, imagemagnifier, filterfastbounds,
> complexclip_aa_Layer_invert, complexclip_aa_layer,
> complexclip_bw_layer_invert, complexclip_bw_layer.
>
> BUG=skia:3532
>
> Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9
>
> Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641

TBR=bsalomon@google.com,reed@chromium.org,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3532

Review URL: https://codereview.chromium.org/1057443003
/external/skia/src/effects/SkLightingImageFilter.cpp
f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641 31-Mar-2015 senorblanco <senorblanco@chromium.org> Implement approx-match support in image filter saveLayer() offscreen.

Currently, the GPU-side image filter implementation creates
exact-match textures for the offscreen backing stores for
saveLayer(). This is because several filters have GPU
implementations which depend on the texture coordinates
being 0..1.

The fix is three-fold:

1) Store the actual requested size in the SkGpuDevice, so
that when wrapping it in an SkBitmap for passing to
filterImage(), we can give it the original size.
2) Fix the filters (SkMagnifierImageFilter,
SkLightingImageFilter) whose GPU implementation depends on
0..1 texture coordinates.
3) Remove the exception for GPU-side image filters in
SkCanvas::internalSaveLayer().

For the lighting filters, there were two bugs which were
cancelling each other out: the sobel filter matrix was
being computed upside down, but then we'd negate the
resulting normal. This worked fine in the exact-match case,
but in the approx-match case we'd sample garbage along
the edge pixels. Also, we never implemented the edge pixels
according to spec in the GPU case. It requires a
different fragment shader for each edge of the nine-patch,
which meant we couldn't use asFragmentProcessor(), and had
to implement the drawing via a filterImageGPU() override.
In order to avoid polluting the public API, I inserted a
new base class, SkLightingImageFilterInternal above
Sk[Diffuse|Specular]LightingImageFilter to handle the
implementation.

N.B.: this change will cause some minor pixel diffs in the
GPU results of the following GMs (and possibly more):
matriximagefilter, matrixconvolution, imagefiltersscaled,
lighting, imagemagnifier, filterfastbounds,
complexclip_aa_Layer_invert, complexclip_aa_layer,
complexclip_bw_layer_invert, complexclip_bw_layer.

BUG=skia:3532

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

Review URL: https://codereview.chromium.org/1034733002
/external/skia/src/effects/SkLightingImageFilter.cpp
36352bf5e38f45a70ee4f4fc132a38048d38206d 26-Mar-2015 mtklein <mtklein@chromium.org> C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
/external/skia/src/effects/SkLightingImageFilter.cpp
24e06d5244ae96e440410e1d76e039983b2efac9 18-Mar-2015 senorblanco <senorblanco@chromium.org> Remove uniqueID from all filter serialization.

(This is essentially a revert of https://codereview.chromium.org/503833002/.)

This was necessary back when SkPaint was flattened even for in-process use. Now that we only flatten SkPaint for cross-process use, there's no need to serialize UniqueIDs.

Note: SkDropShadowImageFilter is being constructed with a croprect and UniqueID (of 0) in Blink. I've made the uniqueID param default to 0 temporarily, until this rolls in and Blink can be changed. (Blink can't be changed first, since unlike the other filters, there's no constructor that takes a cropRect but not a uniqueID.)

BUG=skia:

Review URL: https://codereview.chromium.org/1019493002
/external/skia/src/effects/SkLightingImageFilter.cpp
72c9faab45124e08c85f70ca38536914862d947c 09-Jan-2015 mtklein <mtklein@chromium.org> Fix up all the easy virtual ... SK_OVERRIDE cases.

This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
/external/skia/src/effects/SkLightingImageFilter.cpp
f3f5bad7ded35265c0b5d042cc4174386b197a33 19-Dec-2014 robertphillips <robertphillips@google.com> Add toString methods to SkImageFilter-derived classes

This isn't definitive but at least makes something show up in the debugger.

Review URL: https://codereview.chromium.org/789163006
/external/skia/src/effects/SkLightingImageFilter.cpp
912ed6ebb8e2813e72ed7a3dec3b6710ba7e7405 15-Dec-2014 tfarina <tfarina@chromium.org> Cleanup: Mark some overridden methods with 'SK_OVERRIDE'.

This fixes errors like this:

../../include/gpu/effects/GrPorterDuffXferProcessor.h:27:25: error:
'name' overrides a member function but is not marked 'override'
[-Werror,-Winconsistent-missing-override]

BUG=skia:3075
TEST=ninja -C out/Debug skia_lib
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/804813002
/external/skia/src/effects/SkLightingImageFilter.cpp
56995b5cc00c9c83bd5fcf86bca9a67e939a96cb 12-Dec-2014 joshualitt <joshualitt@chromium.org> Remove GP from drawstate, revision of invariant output for GP

BUG=skia:

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

Review URL: https://codereview.chromium.org/791743003
/external/skia/src/effects/SkLightingImageFilter.cpp
8c0f615fdd41b8b8048bf398791bb2138c511826 10-Dec-2014 joshualitt <joshualitt@google.com> Revert of Remove GP from drawstate, revision of invariant output for GP (patchset #9 id:160001 of https://codereview.chromium.org/791743003/)

Reason for revert:
breaks mac

Original issue's description:
> Remove GP from drawstate, revision of invariant output for GP
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da

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

Review URL: https://codereview.chromium.org/794843002
/external/skia/src/effects/SkLightingImageFilter.cpp
c6bc58eded89b0c0a36b8e20e193c200f297a0da 10-Dec-2014 joshualitt <joshualitt@chromium.org> Remove GP from drawstate, revision of invariant output for GP

BUG=skia:

Review URL: https://codereview.chromium.org/791743003
/external/skia/src/effects/SkLightingImageFilter.cpp
422f56f6e51c2f6a6ab425573b4d790f0157f883 09-Dec-2014 bsalomon <bsalomon@google.com> Make addUniform take a precision

Review URL: https://codereview.chromium.org/788733003
/external/skia/src/effects/SkLightingImageFilter.cpp
eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9 04-Dec-2014 joshualitt <joshualitt@chromium.org> Remove backend factories

BUG=skia:

Review URL: https://codereview.chromium.org/778453002
/external/skia/src/effects/SkLightingImageFilter.cpp
3f3b3d003527861dc0bd89733857576408906431 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

Review URL: https://codereview.chromium.org/769953002
/external/skia/src/effects/SkLightingImageFilter.cpp
6e78293ee896020104ffc4c23b565073e9a49893 01-Dec-2014 mtklein <mtklein@google.com> Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://codereview.chromium.org/769953002/)

Reason for revert:
Breaks canary builds. Will reland after the Chromium change lands.

Original issue's description:
> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
>
> This was needed for pictures before v33, and we're now requiring v35+.
>
> Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/768183002
/external/skia/src/effects/SkLightingImageFilter.cpp
52c293547b973f7fb5de3c83f5062b07d759ab88 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Review URL: https://codereview.chromium.org/769953002
/external/skia/src/effects/SkLightingImageFilter.cpp
267ce482b54f46097584e0f9350ec74aa6a2cd44 25-Nov-2014 joshualitt <joshualitt@chromium.org> remove proc key

BUG=skia:

Review URL: https://codereview.chromium.org/755363002
/external/skia/src/effects/SkLightingImageFilter.cpp
605dd0fbce9dbb2a0d3313e13e161f2bd54870d7 12-Nov-2014 egdaniel <egdaniel@google.com> Move GrInvariantOutput out of GrProcessor and into its own class.

This will help with the ability to subclass, add to, etc. GrInvariantOutput. Also it was simply
getting a little too big to be a "supporting" subclass
BUG=skia:

Review URL: https://codereview.chromium.org/699943003
/external/skia/src/effects/SkLightingImageFilter.cpp
420d7e9a79358908850c74192b4949375563449a 16-Oct-2014 bsalomon <bsalomon@google.com> Auto-compare GrProcessors' texture accesses in isEqual().

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654313002
/external/skia/src/effects/SkLightingImageFilter.cpp
6251d17dfadbbeba8a7e72affde5cbdbd0c0c95f 15-Oct-2014 bsalomon <bsalomon@google.com> Split GrFragmentProcessor into its own header

Review URL: https://codereview.chromium.org/660573002
/external/skia/src/effects/SkLightingImageFilter.cpp
0e08fc17e4718f7ce4e38f793695896473e96948 15-Oct-2014 bsalomon <bsalomon@google.com> Push isEqual/onIsEqual down from GrProcessor to subclasses.

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654273002
/external/skia/src/effects/SkLightingImageFilter.cpp
ccb2e384a036f29d989d3c1468f879324e81a678 13-Oct-2014 egdaniel <egdaniel@google.com> Create helper functions to use in computeInvariantOutput calls

BUG=skia:

Review URL: https://codereview.chromium.org/643743003
/external/skia/src/effects/SkLightingImageFilter.cpp
1598899975ecc85b003a59740b588d1ddbcedb09 10-Oct-2014 joshualitt <joshualitt@chromium.org> FPs now use the correct builder types(just a rename)

BUG=skia:

Review URL: https://codereview.chromium.org/648463003
/external/skia/src/effects/SkLightingImageFilter.cpp
089f8de82d6c342faa9170d8c19d8504177bf5fb 09-Oct-2014 egdaniel <egdaniel@google.com> Remove tab parameter from GrGLSLMulVarBy4f function

With pretty printing of shader code, there is no longer a need to explictily
have tabs in our code.

BUG=skia:

Review URL: https://codereview.chromium.org/648463002
/external/skia/src/effects/SkLightingImageFilter.cpp
1a8ecdfb73a15de600d5779b75d7c4b61863c50b 03-Oct-2014 egdaniel <egdaniel@google.com> Add isSingleComponent bool to getConstantColorComponent

Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components.

BUG=skia:

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

Review URL: https://codereview.chromium.org/608253002
/external/skia/src/effects/SkLightingImageFilter.cpp
b4b7a4c9ea2e399db550f93e3754c351e5b2079a 02-Oct-2014 robertphillips <robertphillips@google.com> Revert of Add isSingleComponent bool to getConstantColorComponent (patchset #6 id:100001 of https://codereview.chromium.org/608253002/)

Reason for revert:
Changing some GMs

Original issue's description:
> Add isSingleComponent bool to getConstantColorComponent
>
> Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b

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

Review URL: https://codereview.chromium.org/617853003
/external/skia/src/effects/SkLightingImageFilter.cpp
3b8af078281a5a20f951b9fd84f38d92b8f6217b 02-Oct-2014 egdaniel <egdaniel@google.com> Add isSingleComponent bool to getConstantColorComponent

Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components.

BUG=skia:

Review URL: https://codereview.chromium.org/608253002
/external/skia/src/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.cpp
848250415eddc54075f7eb8795e8db79e749c6ab 02-Sep-2014 reed <reed@google.com> make allocPixels throw on failure

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

Author: reed@google.com

Review URL: https://codereview.chromium.org/510423005
/external/skia/src/effects/SkLightingImageFilter.cpp
6267f81f3d60ce144ab2b09ea369420984d5c9d9 30-Aug-2014 bsalomon <bsalomon@google.com> Move MakeDivByTextureWHMatrix to GrCoordTransform

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/522873005
/external/skia/src/effects/SkLightingImageFilter.cpp
5e5f948b6b363dbfc8c076d8ff0c6b8e9ea99958 26-Aug-2014 senorblanco <senorblanco@chromium.org> Reimplement deserialization of SkImageFilter's uniqueID.

9fa60d ("Simplify flattening to just write enough ... ") simplified just
a tad too much. In particular, it disabled deserialization of
SkImageFilter's uniqueID, which in turn caused the failure of
SkImageFilter's cache, which caused a large regression in Chrome's SVG
filter performance.

The medium-term fix is to switch to the new SkRecordDraw SkPicture
backend, which will make the unique IDs unnecessary.

This change is an "in case of emergecy" CL, in the event that there are
problems switching on the new backend in Chrome. For that reason, it's
minimalist: only the filters used by Chrome are modified, and whitespace
changes are kept to a minimum. In this way, it should be easy to revert
once the new backend goes in.

R=reed@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/503833002
/external/skia/src/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.cpp
9fa60daad4d5f54c0dbe3dbcc7608a8f6d721187 21-Aug-2014 reed <reed@google.com> Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).

Refactoring pattern:

1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).

If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.

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

Author: reed@google.com

Review URL: https://codereview.chromium.org/395603002
/external/skia/src/effects/SkLightingImageFilter.cpp
7510b224e52b9518a8ddf7418db0e9c258f79539 30-Jul-2014 kkinnunen <kkinnunen@nvidia.com> Rename GrGLUniformManager to GrGLProgramDataManager

Rename GrGLUniformManager to GrGLProgramDataManager in anticipation that the
class would be used to manage shader resources that are not uniforms.

This is needed in order to implement NVPR on GLES.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/365853002
/external/skia/src/effects/SkLightingImageFilter.cpp
63e99f7a03b2ac90ae7a00232674fd39c0bdcc68 21-Jul-2014 bsalomon <bsalomon@google.com> Allow GrGLEffects to produce variable length keys.

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

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/385713005
/external/skia/src/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.cpp
83d081ae1d731b5039e99823620f5e287542ee39 08-Jul-2014 bsalomon <bsalomon@google.com> Goodbye GrEffectRef.

Also, reworked some var names and comments around SkShader::asNewEffect.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/374923002
/external/skia/src/effects/SkLightingImageFilter.cpp
9ea3d57fde28a5fe4487a111dc3dd49418235e5e 08-Jul-2014 senorblanco <senorblanco@chromium.org> Clean up SkImageFilter constructors.

Now that all creation of SkImageFilters goes through
factory Create() methods, there's no real reason for the
convenience constructors. Some SkImageFilter subclasses
which actually have zero DAG-able inputs were passing NULL
to the superclass constructor. This actually means 1 input,
with a NULL value, not zero inputs. This becomes more
relevant for the upcoming cache infrastructure, where this
indicates that the filter will use its src input, where in
fact some of these filters do not (they are image generators
only).

Limiting SkImageFilter to a single constructor resolves this
ambiguity.

Along the way, I removed all of the default parameters to
the constructors, since the Create methods always call them
with the full argument list.

BUG=skia:
R=reed@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/376953003
/external/skia/src/effects/SkLightingImageFilter.cpp
55fad7af61c21d502acb9891d631e8aa29e3628c 08-Jul-2014 bsalomon <bsalomon@google.com> Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/371103003
/external/skia/src/effects/SkLightingImageFilter.cpp
c77392ed58ec78ab19fa0e3ff99fb8110854fba2 02-Jun-2014 reed <reed@google.com> use colortype instead of config

clone of https://codereview.chromium.org/305133006/

TBR=

BUG=skia:

Author: reed@google.com

Review URL: https://codereview.chromium.org/301233011
/external/skia/src/effects/SkLightingImageFilter.cpp
88cb22b6b4816c7a9ca6c5b795965b4606f9eb7b 30-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL

R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14460 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
28fcae2ec77eb16a79e155f8d788b20457f1c951 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
Want to reland the original CL.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, bensong@google.com
TBR=bensong@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
96edc2459820f0f60ea9b57959c1e5018ef95e28 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now.

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
d923288e50b5a69afb0bdd5c161191b24cab8345 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
fixes on the chrome side are landing (brettw), keep fingers crossed.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
757ebd20ef284b6428eb9f4b9b69826cc3640a82 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
breaking the Chrome deps roll.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
149e9a107c356b0151433fb23c2b1c8d0634947c 09-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename kPMColor_SkColorType to kN32_SkColorType.

The new name better represents what this flag means.

BUG=skia:2384
R=reed@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
b9c95978c614e8f6bc00bdf565cff57388d8c659 19-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Use rounding to 8888 in lighting filters, raster path.

when converting float -> 8-bit BGRA in lighting filters, use rounding
rather than floor(). This makes the GPU and raster paths match more
closely (as tested by Blink test
feDiffuseLighting-linearrgb-lighting-color.svg).

Will affect the LSB of lighting, imagefiltersscaled GMs.

R=junov@chromium.org
BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13863 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
118252962f89a80db661a0544f1bd61cbaab6321 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

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

Committed: https://code.google.com/p/skia/source/detail?r=13805

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13809 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
29089179a66c06ef70da387111af75970f04ed53 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Implement support for expanding crop rects in image filters"

Breaking ImageFilterTests unit test.

TBR=bsalomon@google.com
BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13806 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
0ef0501baf615149d6d84398d7594cd89f6e928d 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13805 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
4cb543d6057b692e1099e9f115155f0bf323a0c8 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for a Context parameter in image filters

Some upcoming work (support for expanding crop rects) requires
the clip bounds to be available during filter traversal. This change
replaces the SkMatrix parameter in the onFilterImage() traversals
with a Context parameter. It contains the CTM, as well as the clip
bounds.

BUG=skia:
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13803 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
1037d92bbc10cafb61d050638e8cbe5a3aa6706f 13-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Added Z scale when X and Y scale to spot lights and point lights

Z scale is set as the average of X scale and Y scale.

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

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13798 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
e24ad23ae67ffcb0dc545b7e426cf08d102e0868 16-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> use SkColorType instead of SkBitmap::Config in views/effects

R=scroggo@google.com, reed@google.com
TBR=scroggo

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13469 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ae761f7545d8ebf181d220169afac2056b057b8c 05-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter methods const.

SkImageFilter had some non-const methods that could all be made const.
This is a first step towards making SkImageFilter immutable.

BUG=skia:2097
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13330 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
8b0e8ac5f582de80356019406e2975079bf0829d 30-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor read and write buffers.

Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.

What used to be this:

SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer -> SkOrderedReadBuffer
SkFlattenableReadBuffer -> SkValidatingReadBuffer

is now

SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer

Benefits:
- code is simpler, names are less wordy
- the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
- write buffers are completely devirtualized, important for record speed

This refactoring was mostly mechanical. You aren't going to find anything
interesting in files with less than 10 lines changed.

BUG=skia:
R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
9ebcac54635cde63110d73ad7c43d70772e7872f 24-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add installPixels

BUG=skia:
R=halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13174 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
6776b82d466fa93ccffd251fdf556fe058395444 03-Jan-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter crop rects relative to the primitive origin, instead of relative to their parent's crop rect. This is required by SVG semantics, and is more sane anyway.

To do this, this patch changes the "offset/loc" parameter in filterImage() / onFilterImage() from an inout-param to an out-param only, so that the calling filter can know how much the input filter wants its result offset (and doesn't include the original primitive position). This offset can then be applied to the current filter's crop rect. (I've renamed the parameter "offset" in all cases to make this clear.) This makes the call sites in SkCanvas/SkGpuDevice responsible for applying the resulting offset to the primitive's position, which is actually a fairly small change.

This change also fixes SkTileImageFilter and SkOffsetImageFilter to correctly handle an input offset, which they weren't before. This required modifying the GM's, since they assumed the broken behaviour.

NOTE: this will require rebaselining the imagefiltersgraph test, since it has a new test case.

NOTE: this will "break" the Blink layout tests css3/filters/effect-reference-subregion-chained-hw.html and css3/filters/effect-reference-subregion-hw.html, but it actually makes them give correct results. It should be suppressed on the skia roll, and I'll rebaseline it.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12895 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ab1c13864df34aecfd4840ea7d1e4f8730b44f4e 05-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix compilation with SK_ENABLE_INST_COUNT=1

Add INHERITED declarations to class declarations that prevent
compilation with the flag.

Remove SK_DEFINE_INST_COUNT from all class implementations. Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.

Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.

For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shouĺd ensure that part of the compilation errors
are caught earlier.

Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.

R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
cd3b15ca6364a04b0eeeb4f89c7daa8aefe854c8 04-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixed bad bitmap size crashes

There were 2 issues :
1 ) If the size of an SkBitmap's underlying SkPixelRef's alocated memory is too small to fit the bitmap, then the deserialization will now check this and set an error appropriately.
2 ) If a device fails to allocate its pixels, the device will be deleted and NULL will be returned to avoid attempting to draw on a bad device.

BUG=
R=senorblanco@chromium.org, reed@google.com, sugoi@google.com, halcanary@google.com, mtklein@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12484 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ce33d60187718e7bb01944ee130c9f5d9fb335ec 25-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Adding more validation

- Added a way to check that the number of inputs of a filter is not more than a filter expects
- Added validation of reftype in SkBitmap::unflatten()
- Added validation on fKD (diffuse lighting constant) and fKS (specular lighting constant) to make sure that they are always non-negative numbers
- Added validation of SkPerlinNoiseShader::fType and SkPerlinNoiseShader::fNumOctaves

BUG=
R=reed@google.com, senorblanco@google.com, mtklein@google.com, senorblanco@chromium.org, sugoi@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12388 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
4b413c8bb123e42ca4b9c7bfa6bc2167283cb84c 25-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> remove SkFloatToScalar macro

BUG=
R=reed@google.com, djsollen@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
d3baf20dd1de9940717dd50b5c9ff6061561342e 07-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Added support for Chrome's gpu command buffer extension BindUniformLocation.

R=bsalomon@google.com, bsalomon

Author: skaslev@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12178 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
c0b7e10c6a68f59e1653e6c18e6bc954b3c3f0cf 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Initial error handling code

I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=11247

R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11922 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a8aef8bf04b10ad648c448c16f56d8c487819112 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Lighting filter uses input on raster path

BUG=
R=senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11918 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
7938bae14af94c1d48d122a2d686e123b66411a7 18-Oct-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement crop rect support for SkMatrixConvolutionImageFilter.

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11863 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
1aa68723b8ef4ce0b6db9fe51e7d8051cdd543ff 17-Oct-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter::asNewEffect() (and all derived-class overrides) protected.

R=bsalomon@google.com, bsalomon

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11847 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
790c3f4e095c57b1e2412a46e7d71f28babf07c8 14-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove need for readFlattenableT from SkLightingImageFilter.

This will need new picture version.

BUG=
R=reed@android.com, sugoi@google.com, senorblanco@chromium.org, reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11758 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
b295fb6ff3222453912dfcb7a1ea5184d40014b5 10-Oct-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change SkImageFilter's cropRect from SkIRect to a CropRect struct, containing an SkRect and flags indicating which parameters are set.

NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll.

Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
77af6805e5faea1e2a5c0220098aec9082f3a6e5 02-Oct-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GPU coord transforms automatic

Adds a GrCoordTransform class and updates the framework to handle
coord transforms similar to how it handles textures with
GrTextureAccess. Renames GrGLEffectMatrix to GrGLCoordTransform and
slightly repurposes it to be used by the framework instead of effects.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11569 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
24ddde97581624777feebc9e95ae558282f95d4c 16-Sep-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)

11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ba6e954140e45e251d67934ed6ad752149fcf72f 16-Sep-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)



git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
478884f7d3b8c7be8b62f3fa2b79192f411c3fec 16-Sep-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)

11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
4b681bc95b14e081f1cc5b68cb755d57fc8eb977 13-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixed issues found by fuzzer

Last week, the fuzzer found a few numerical issue with filters and I had written some fixes for them. Here are the fixes with some unit tests.

For senorblanco : So I figured out what was asserting when we'd get a 0 width "result" in SkBicubicImageFilter::onFilterImage(). Basically, if the "result" SkBitmap object calls SkBitmap::setConfig() with "width" and/or "height" set to 0, then the SkBitmap object will call SkBitmap::reset(), making the SkBitmap object's config invalid. At this point, calling SkBitmap::getAddr32() will assert, even without attempting to dereference the data pointer, because the SkBitmap's config is invalid. If height is valid, but width is 0, then this call to SkBitmap::getAddr32() happens directly in SkBicubicImageFilter::onFilterImage() a few lines lower and asserts right away.

BUG=
R=senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11249 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
5792cded61a7302f32bd0f4aeda51a9b2f1d00f6 13-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Initial error handling code

I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=
R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
e0e7cfe44bb9d66d76120a79e5275c294bacaa22 09-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change old PRG to be SkLCGRandom; change new one to SkRandom

The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to
rebaseline GMs.

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

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
74a3a2135ca82ab9324b7e499caa3280348a4fda 30-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename ShaderType enum to ShaderVisibility

Renames ShaderType in GrGLShaderBuilder to ShaderVisibility. It is now
used solely as a bitfield. Methods that previously accepted a single
ShaderType value are split into separate calls:

- getShader -> vsGetShader, gsGetShader, fsGetShader
- emiitFunction -> fsEmitFunction
- appendTextureLookup -> fsAppendTextureLookup

No change in functionality. This is a refactoring to allow us to
separate the vertex/geometry and fragment parts of GrGLShaderBuilder.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11044 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
7ab7ca4199e97126de01d507d34f60a07843937f 28-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix case where GrGLEffectMatrix gives back a dangling ptr for the coords var name.

R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10982 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
fbaea5336690ffc4fd9ee695608e9457da10eeab 27-Aug-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for both clipping applied by the compositor (communicated via the CTM) and for cropping applied in upstream image filters (communicated via the offset). This requires a few ugly conversions, since the crop rect is an SkIRect, and the ctm is an SkMatrix.

I also had to offset the matrix passed to filter evaluation by drawSprite() and internalDrawBitmap() by the primitive position. This is the same offset that is applied when drawing the primitive, to compensate for the internal saveLayer().

Also apply the total matrix to the filter params in asNewEffect(), so that (for example) lighting params are offset by both the compositor clipping and upstream crop rects.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10961 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
7425c124f685978a0a6f0a1f79e89154019e7c99 14-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor GrGLUniformManager::UniformHandle to initialize itself by default

Refactor GrGLUniformManager::UniformHandle to initialize itself to
"invalid" state by default. This simplifies the effect
constructors. In the future, it should also help catch potential
uninitialized uniform variable usage.

Remove unneeded explicit uniform handle validity assertions before the
handle usage. The assertion will always be made when handle is
converted to index.

BUG=skia:1492
R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10713 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
4e16bb2a322f2bd16cb1afd2f78c27e420a4b9db 26-Jul-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement crop rect for lighting image filters. Changes for the CPU path were fairly straightforward: use the bounds rectangle when traversing the pixels, not the source rectangle.

For the GPU path, this required modifying the signature of SkImageFilter::asNewEffect() to receive the bounds offset, so that the lighting filters could offset the light position by the offset. It also required modifying the base-class implementation of SkImageFilter::filterImageGPU() (which implements single-pass filters) to intersect against the bounds rect, to pass its offset to asNewEffect(), and to modify the caller's offset (so it's drawn in the correct place).

Note: this will require rebaselining the lighting GM. Six new test cases were added, to accommodate a cropped version of each lighting filter.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10379 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.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/effects/SkLightingImageFilter.cpp
d043ccee3788ea4192806bd8c94484ed003fa828 08-Apr-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow single-pass filters (which use asNewEffect()) to participate in the image filter DAG. This was done by introducing the SkSinglePassImageFilter abstract base class, which implements canFilterImageGPU() and filterImageGPU() on behalf of the derived class. The derived class still only needs to asNewEffect(). This allows us to recurse on the filter input in SkSinglePassImageFilter::onFilterImageGPU(). It also allows us to remove any knowledge of single-pass image filters from SkGpuDevice and from the SkImageFilter base class as well.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8563 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
c26d94fd7dc0b00cd6d0e42d28285f4a38aff021 25-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities.
Review URL: https://codereview.chromium.org/12965018

git-svn-id: http://skia.googlecode.com/svn/trunk@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
c78188896e28a4ae49e406a7422b345ae177dafe 20-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Attempt to reland 8264-5 with warning-as-error fixes.




git-svn-id: http://skia.googlecode.com/svn/trunk@8272 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
67e7cde5c5e59a8f1de7ee28276b8193ecb2bc7f 20-Mar-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> revert 8265-8264 (broke build)



git-svn-id: http://skia.googlecode.com/svn/trunk@8268 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ae81d5c4aa1716756b2cfb4c44f27f4dce2716ef 20-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Adds local coords to GrEffect system.

Effects can ask the builder for local coords which may or may not be distinct from positions.

GrEffectStage tracks changes to relationship between pos and local coords.

GrGLEffectMatrix and GrSingleTextureEffect can use either pos or textures as intput coords

GrSimpleTextureEffect now allows for an explicit texture coords attribute.
Review URL: https://codereview.chromium.org/12531015

git-svn-id: http://skia.googlecode.com/svn/trunk@8264 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
f910d3b23bcf590ee937628dbab8e39a98ee5860 07-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GrGLEffects use an interface to append their code.

A small step towards encapsulating GrGLShaderBuilder.
Review URL: https://codereview.chromium.org/12547012

git-svn-id: http://skia.googlecode.com/svn/trunk@8018 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
73a9694b4ceb67547e5863db5315488e7d5294f7 13-Feb-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Use SkMWRandom in GLPrograms test.

R=jvanverth@google.com
Review URL: https://codereview.appspot.com/7306097

git-svn-id: http://skia.googlecode.com/svn/trunk@7721 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ef5dbe1cd90fe586f165e54cb6f7608942610793 28-Jan-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orientation, and skia needs to be notified of this, so that they are not drawn upside-down.

Review URL: https://codereview.appspot.com/7200048

git-svn-id: http://skia.googlecode.com/svn/trunk@7414 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
8a252f79629b189a03de22cd8ff0312c5bccedd1 22-Jan-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Switch GrEffect::onIsEqual signature back to GrEffect from GrEffectRef.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7188046

git-svn-id: http://skia.googlecode.com/svn/trunk@7326 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
6340a41108633ac1ce5941e5cd30538630c4c55b 22-Jan-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Let them eat GrEffectRef.

Changes the remaining existing code that operates on naked GrEffects to GrEffectRef.
Review URL: https://codereview.appspot.com/7124058

git-svn-id: http://skia.googlecode.com/svn/trunk@7321 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
68b58c95384dd6c2fd389a5b4bbf8fc468819454 17-Jan-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove default implementation of GrEffect::isEqual. Make GrSingleTextureEffect abstract.
Review URL: https://codereview.appspot.com/7142049

git-svn-id: http://skia.googlecode.com/svn/trunk@7254 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a1ebbe447d5eab098111eb83580e55f2f5f6faca 16-Jan-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Change some function/vars from EffectPtr to EffectRef to reflect GrEffectPtr->GrEffectRef renaming.



git-svn-id: http://skia.googlecode.com/svn/trunk@7226 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
0ac6af49975c54c2debf41e9200af416ecd2d973 16-Jan-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Wrap GrEffects in GrEffectPtr.

This is the first step towards automatic recycling of scratch resouces in the cache via ref-cnts.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7092061

git-svn-id: http://skia.googlecode.com/svn/trunk@7222 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
371e105da5d9fdfff3b4242b37ff6fc09214c8c8 11-Jan-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add GrEffect::updateKnownColorComponents(). It is used to determine whether the output of an effect has a constant output value for r,g,b, or a.
Review URL: https://codereview.appspot.com/7064057

git-svn-id: http://skia.googlecode.com/svn/trunk@7144 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
dbe49f735484f8862e378b63d0a074a301093dd0 05-Nov-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove default texture coords / texture matrix
Review URL: https://codereview.appspot.com/6775100

git-svn-id: http://skia.googlecode.com/svn/trunk@6293 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
17fc651dbe2e0624f6c85fb6e081d28a87d5a08b 02-Nov-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make all remaining effects use GrGLEffectMatrix

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6817079

git-svn-id: http://skia.googlecode.com/svn/trunk@6286 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
e862d16162fd46ad9b2832c8844b00c81bedbac0 31-Oct-2012 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@6210 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
4b2e1c8807fd1eb8b42e71ec7e29b6fc189d3476 29-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Rebase gpu_dev up to r5182



git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6187 2bbb7eff-a529-9590-31e7-b0007b416f81
2eaaefd7e6a58339b3f93333f1e9cc92252cc303 29-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Pass GrCustomStage to key-generation functions and emitCode().

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6819046

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6182 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
7b734e08430f6b1d147dfa9f0c2c08d88aa7b714 29-Oct-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix alpha computation for specular lighting filter (GPU path).
Change lighting GM background to show blending.

NOTE: This will require new results for the lighting GM.

Review URL: https://codereview.appspot.com/6812050

git-svn-id: http://skia.googlecode.com/svn/trunk@6181 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
ae5ef113ebd7f20f1bea952a0ed9bb6d47cbda92 29-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make lighting filters directly inherit from GrGLEffect.

Delete GrGLLegacyEffect.
Review URL: https://codereview.appspot.com/6815050

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6165 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
2d0baded0f45dfde9dc8c25313ff14ea18c0c915 26-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make the orientation of a texture accessible from and known by GrSurface.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6801044

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6148 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
28a15fb8d603847949a61657ef5cb73ed9915021 26-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GrGLEffect::setData take GrEffectStage rather than GrEffect.

This allows the coord-change matrix to be communicated to setData(). An accessor for this matrix is also added to GrEffectStage.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6779057

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6143 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
46fba0d79335f17429bb71d87a04d93fb2ee992b 25-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename StageKey and related stuff.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6785049

git-svn-id: http://skia.googlecode.com/svn/trunk@6130 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
396e61fe440590744345e0c56970b26ab464591d 25-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename GrProgramStageFactory to GrBackendEffectFactory.
Review URL: https://codereview.appspot.com/6773044

git-svn-id: http://skia.googlecode.com/svn/trunk@6125 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
422e81aeb1f4078367c85efe591c7df8c33874ec 25-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrGLProgramStage Renaming Part 3

s/GLProgramStage/GLEffect
minor whitespace/spelling fixup

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6767054

git-svn-id: http://skia.googlecode.com/svn/trunk@6095 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
aa60093d0031731573b34c5529bb194f7c4c7dd0 25-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrGLProgramStage Renaming Part 2

s/GrGLLegacyProgramStage/GrGLLegacyEffect
Review URL: https://codereview.appspot.com/6761056

git-svn-id: http://skia.googlecode.com/svn/trunk@6091 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
d698f77c13d97c61109b861eac4d25b14a5de935 25-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrGLProgramStage Renaming Part 1.

Renamed cpp and h
s/GrGLProgramStage/GrGLEffect/
Review URL: https://codereview.appspot.com/6759054

git-svn-id: http://skia.googlecode.com/svn/trunk@6090 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
021fc736f89fddac4f26b3f32f50263ff8fe3279 25-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrCustomStage Renaming Part 5

Stuff found by searching for "stage".

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6772043

git-svn-id: http://skia.googlecode.com/svn/trunk@6089 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
8ea78d83dc4e8243c16eedf8100a3987c54123fa 24-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrCustomStage Renaming Part 4

Rename a bunch of things found by searching for "custom".
Review URL: https://codereview.appspot.com/6765048

git-svn-id: http://skia.googlecode.com/svn/trunk@6085 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
f271cc7183fe48ac64d2d9a454eb013c91b42d53 24-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrCustomStage Renaming Part 3

Rename all things *CUSTOM_STAGE*, customStage*, and other miscellany

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6769048

git-svn-id: http://skia.googlecode.com/svn/trunk@6081 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
6f261bed0252e3f3caa595798364e0bf12a2573a 24-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> GrCustomStage Renaming Part 2

GrSamplerState member rename
GrCustomStageUnitTest rename
some comment updates
Review URL: https://codereview.appspot.com/6771043

git-svn-id: http://skia.googlecode.com/svn/trunk@6078 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a469c28c3c16214733a25201a286970f57b3d944 24-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> CustomStage Renaming Part 1

Search and replace:
GrCustomStage->GrEffect
GrCustomStageTestFactory->GrEffectTestFactory

renamed the cpp/h files from customStage->effect

reordered gypi, #includes, forward decls to maintain alphabetical sort.

manually fixed up some whitespace and linewraps

deleted a commented out #include

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6758046

git-svn-id: http://skia.googlecode.com/svn/trunk@6076 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
374e75956e7a56bbbd2da5509f9c4117512515d2 23-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Combine the emit functions in GrGLProgramStage.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6741064

git-svn-id: http://skia.googlecode.com/svn/trunk@6057 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
706f66831a575bdc2b1ab1331b48b793cd487356 23-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reland r6330 thru r6333 but do without enabling GL_ARB_fragment_coord_conventions on Intel GPUs.



git-svn-id: http://skia.googlecode.com/svn/trunk@6048 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
d3353646c31ccb90cc43727ef0fa7869b4e4fe07 22-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert r6330 thru 6333 while we figure out what to do about Intel bots (possible driver bug).

git-svn-id: http://skia.googlecode.com/svn/trunk@6037 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
159d42b546f94fdc5972f3fbdfde9fd8a8735953 22-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove two params from GrGLProgramStage::setData that are no longer necessary.

R=senorblanco@chromium.org
Review URL: https://codereview.appspot.com/6744062

git-svn-id: http://skia.googlecode.com/svn/trunk@6031 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
4fe9b1b7406f8e29102287c4594ef8cf733513a7 22-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Automatically handle converting gl_FragCoord to Skia's y-down device coords.

NOTE: THIS WILL LIKELY REQUIRE GM REBASELINING.

R=robertphillips@google.com,senorblanco@chromium.org
Review URL: https://codereview.appspot.com/6744061

git-svn-id: http://skia.googlecode.com/svn/trunk@6030 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
254eae2b04a7f810de0ed92803a8bdd18d11babf 05-Oct-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change SkLightingImageFilter to derive from SkSingleInputImageFilter, so that it can participate in filter DAGs.

No tests yet.

Review URL: https://codereview.appspot.com/6620055

git-svn-id: http://skia.googlecode.com/svn/trunk@5832 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
f06df1bb9ab201a78bfc906a9e95326c6e15a119 06-Sep-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Introduce GrGLShaderBuilder::TextureSampler

Review URL: https://codereview.appspot.com/6495099/



git-svn-id: http://skia.googlecode.com/svn/trunk@5422 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
868a8e7fc83e9ac6ee1418e75b84a0595605626c 30-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Recommit r5350 with fix for image failures (which affected GLs that don't support ARB_texture_swizzle).



git-svn-id: http://skia.googlecode.com/svn/trunk@5353 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a3d707b4ec17e925f71cc0c39d40252d2b788314 30-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 5350 while image changes are diagnosed.



git-svn-id: http://skia.googlecode.com/svn/trunk@5351 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
b41b2bc29c0411052f9f45855a98be370d586438 30-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove fModulate from GrGLShaderBuilder

Review URL: https://codereview.appspot.com/6495051/




git-svn-id: http://skia.googlecode.com/svn/trunk@5350 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
34bcb9f80336fe0dc56ad5f67aeb0859bf84d92e 28-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Some GrGLShaderBuilder cleanup

Review URL: https://codereview.appspot.com/6500043/



git-svn-id: http://skia.googlecode.com/svn/trunk@5322 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a1bf0fffff821d9c11809c89bd98d4ced480421a 07-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> uniquely name FS functions, add lighting effects to unit test

Review URL: http://codereview.appspot.com/6458080/


git-svn-id: http://skia.googlecode.com/svn/trunk@4992 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
c73dd5c6880739f26216f198c757028fd28df1a4 07-Aug-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Update SkFlattenable buffers to be more modular.

This CL is an effort to stage the conversion to named
parameters for all SkFlattenable commands. This particular
stage only does the following two things...

1. Move flattenable buffers from SkFlattenable.h into
their own header.
2. Update and Add new read write methods for better clarity
and convenience.

BUG=

Review URL: https://codereview.appspot.com/6448095

git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a5e65ec434fed44dc616e4f64950b835b541181b 02-Aug-2012 twiz@google.com <twiz@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Introduction of set of functions to manage generation of texture fetch shader code.

A new set of routines have been added to GrGLShaderBuilder to emit texture fetches, taking into consideration the format of the texture to be accessed, and the channel swizzle.
Review URL: https://codereview.appspot.com/6446072

git-svn-id: http://skia.googlecode.com/svn/trunk@4919 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
cf8fb1f6f03fc77f9927564f9ef9abeeeec508d2 02-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Create GPU-less build of Skia.



git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
777c3aab0a902b0917871080d99b0a249ec06298 25-Jul-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove uniform names from top of GrGLProgram.cpp, builder responsible for "u" and stage num tags.

Also add LF eol-style property to some files in src/gpu/effects.

Review URL: http://codereview.appspot.com/6448049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4770 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
b9119a6b563bf737e34d22f8bb96fc09a606c76f 25-Jul-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix static assert on non-windows compilers(?)



git-svn-id: http://skia.googlecode.com/svn/trunk@4759 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
dbbc4e2da93cef5c0cfb0b3c92ff6c2c80f6e67a 25-Jul-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add GL uniform manager
Review URL: http://codereview.appspot.com/6423066/



git-svn-id: http://skia.googlecode.com/svn/trunk@4758 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
0567f222b92d17923c687bed5f54b31652150891 25-Jul-2012 bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add SkScalarPow.


git-svn-id: http://skia.googlecode.com/svn/trunk@4754 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
300f562dedd02df2f41de443c8b58ab2ceaed0f0 20-Jul-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> SkNEW instead of new for lighting effects.

http://codereview.appspot.com/6351112/



git-svn-id: http://skia.googlecode.com/svn/trunk@4689 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
187c15c84778c0ba38b9b0c5a30c7a2155f8b171 16-Jul-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix bad allocator access in r4616



git-svn-id: http://skia.googlecode.com/svn/trunk@4619 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
032b221dadb6eb8283ac2d1bc8913ee7bb5cfe7a 16-Jul-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove uniform var pointers from custom effects

Review URL: http://codereview.appspot.com/6374067/



git-svn-id: http://skia.googlecode.com/svn/trunk@4616 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
f4770d7e841a34d74d7f76a33312f4c5624da831 13-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> There were three different problems with lighting filters:

1) Texture offsets (fImageIncrement) have to be signed depending on
whether the texture is "right way up" (texture upload) or "upside down"
(render target), so the surface normals were coming out upside down.
2) Light normals have to y-negated on upload
These two bugs were cancelling each other out in SampleApp, (where we
were testing w/textures) but not in Chrome (where we were testing
w/render targets).
3) The extract-the-height-from-the-view-matrix hack I was using to
compare light positions vs. gl_FragCoord doesn't work in Chrome where we
compile with GR_STATIC_RECT_VB, and the view matrix contains more than
the viewport transform (to accomodate the canonical vertex buffer).
Fixed by passing the destination render target to
GrGLProgramStage::setData(), so it can flip the light positions in Y on
the CPU.

Review URL: http://codereview.appspot.com/6343109/



git-svn-id: http://skia.googlecode.com/svn/trunk@4605 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
d0c1a06cb98dd4a009dfa79e37ba6ca23a8c180b 12-Jul-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Introduces new SingleTextureEffect base class for GrCustomStage objects.
This class tracks the texture that the object uses. A future commit will get rid of the
GrTexture pointer currenty stored in the GrDrawState, allowing us to have CustomStages
*without* textures.

Requires gyp change on next roll.

http://codereview.appspot.com/6306097/



git-svn-id: http://skia.googlecode.com/svn/trunk@4576 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
eb311845c1b412a9a7d851444a70ec24ab60fb2c 11-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix lighting filters on Windows, and re-enable the GPU path.

Review URL: http://codereview.appspot.com/6354094/



git-svn-id: http://skia.googlecode.com/svn/trunk@4557 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
a2fdb338c72ce3b9ffda4c1012e485a390f913ee 11-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Disable GPU path for lighting filters, due to Windows weirdness. Unreviewed.



git-svn-id: http://skia.googlecode.com/svn/trunk@4547 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
0ec1eab8776639c503b79fcc8384f6172cceddb0 11-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Mac GLSL fixes; unreviewed.



git-svn-id: http://skia.googlecode.com/svn/trunk@4539 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
6730cbb80a2366c1333f48b7cd0397daed337a8b 11-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> More build fixes; unreviewed.



git-svn-id: http://skia.googlecode.com/svn/trunk@4537 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
bd9fad67b841e94e2042bbc424f197887fe7c00e 11-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Mac build fix; unreviewed.



git-svn-id: http://skia.googlecode.com/svn/trunk@4536 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
894790d77c56cd4bae8070331d275c6d2897e33c 11-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> This patch implements the diffuse and specular lighting filters in Ganesh.
There are three light types for each: distant, point and spot, whose code
generation lives in a GrGLLight class hierarchy. This similar to the CPU
implementation, where each light type provides a function to compute the vector
from the surface plane to the light (surfaceToLight) and to compute the light
colour (emitLightColour). Instead of templated member functions, as in the CPU
implementation, these are virtual functions to emit the light-specific GLSL
code.

All of the code for the GPU path lives in the same file as that for the CPU
path, SkLightingImageFilter.cpp. In order to provide Ganesh a hook to access
it, SkImageFilter now has a asNewCustomStage() virtual, which allows an image
filter to return a GrCustomStage representing that filter.

Note that this patch does not handle the border conditions correctly (the
[top|bottom][Left|Right]Normal() functions in the CPU implementation). That
will come in a future patch.

Review URL: http://codereview.appspot.com/6345081/



git-svn-id: http://skia.googlecode.com/svn/trunk@4535 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
bdb1ec453a36b3e8e8800713aef0dce934e6a6a7 09-Jul-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Minor cleanup in lighting image filters: Made the light color a member of the
light, rather than the filter, so computation is localized. Changed a couple
of non-const refs in the image filter creation API const refs. Changed "const
SkColor&" to "SkColor", since it's just a uint32_t anyway.

Review URL: http://codereview.appspot.com/6352071/


git-svn-id: http://skia.googlecode.com/svn/trunk@4466 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
51f3866995bfb5af75a9a06465ba30909b6e1c4b 27-Jun-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix leak of Light object (in this private instance, the caller is transferring
ownership of the object, so the receive does not need to call ref).
Review URL: https://codereview.appspot.com/6348045

git-svn-id: http://skia.googlecode.com/svn/trunk@4360 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
0456e0b7b85060e9b9597ce414c4c2b19aff4f58 27-Jun-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Added Inst counting to SkFlattenable-derived classes

http://codereview.appspot.com/6355043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4359 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
0833777df1f05adafd9b70c666a72d80defa4f6b 26-Jun-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup flattening code to properly serialize lighting image filters.
Review URL: https://codereview.appspot.com/6333070

git-svn-id: http://skia.googlecode.com/svn/trunk@4340 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp
f49b429ceface4f75f5f96570ea5a8b94896529d 22-Jun-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Raster implementation of diffuse and specular lighting filters. Externally,
the caller instantiates a light (distant, point or spot), and an
SkDiffuseLightingFilter or SkSpecularLightingImageFilter with that light. A
Sobel edge detection filter is applied to the alpha of the incoming bitmap, and
the result is used as a height map for lighting calculations.

Review URL: http://codereview.appspot.com/6302101/



git-svn-id: http://skia.googlecode.com/svn/trunk@4314 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkLightingImageFilter.cpp