History log of /external/skia/include/gpu/GrColor.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
de1a60534648ca8a6eb3ae32e06a7a9e9c0591f3 22-Mar-2017 Brian Osman <brianosman@google.com> Support premul/unpremul of F16 during read/writePixels

Added PremulOutput and UnpremulOutput FP helpers. These are used
(rather than GrConfigConversionEffect) when working with FP16
textures (and will also be used for other configs that can't be
round-tripped via rounding).

BUG=skia:5853

Change-Id: I101592c26c4f0b379d5e5a8678ef7b2f08e6ad56
Reviewed-on: https://skia-review.googlesource.com/9980
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
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/include/gpu/GrColor.h
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/include/gpu/GrColor.h
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/include/gpu/GrColor.h
78f20e0e97472c39377bcb610d845ae6ef5d6ace 12-Jan-2017 Brian Osman <brianosman@google.com> Cleanup GrPixelConfig helper functions

Remove unused functions, and convert another to switch style.

BUG=skia:

Change-Id: I93edbece54f147d868801bb008e6f935a8cb997f
Reviewed-on: https://skia-review.googlesource.com/6947
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
d0be1ef36c64c2a420cbd82f4c033704d4c54a07 11-Jan-2017 Brian Osman <brianosman@google.com> Remove kIndex_8_GrPixelConfig

It's been disabled for a long time (GPUs don't support it, and it actually
caused performance regression in testing).

BUG=skia:4333

Change-Id: I6e2bf755f765168fd616de6c9c023c6fbd5abd20
Reviewed-on: https://skia-review.googlesource.com/6897
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
986563bcff26300ea4317b4dd84917d5240bb723 10-Jan-2017 Brian Osman <brianosman@google.com> Add Gray8 pixel config

This is still just linear (non-sRGB), but adding sRGB will
be the next step. I've verified that this is really making
R8 textures when uploading Gray8 bitmaps. Tests pass, and
the all_bitmap_configs GM still renders correctly (unlike
when we just mapped Gray8 to Alpha8).

This adds another pixel config, which could grow our cache
footprint, but the benefits of not using 4bpp for 1bpp data
should outweigh that?

Re-land of https://skia-review.googlesource.com/c/6817/,
with fixes for Vulkan.

BUG=skia:6110

Change-Id: Ia763c276808be28027ed0005ee4b88637306583f
Reviewed-on: https://skia-review.googlesource.com/6839
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
4641d7d0550c6abcb6ffbda9941f6add268c017c 10-Jan-2017 Brian Osman <brianosman@google.com> Revert "Add Gray8 pixel config"

This reverts commit f2956459f707de596dcb2c79a7ee1fa62d599c0d.

Reason for revert: GM and image failures on some bots (rendering red, not gray).

Original change's description:
> Add Gray8 pixel config
>
> This is still just linear (non-sRGB), but adding sRGB will
> be the next step. I've verified that this is really making
> R8 textures when uploading Gray8 bitmaps. Tests pass, and
> the all_bitmap_configs GM still renders correctly (unlike
> when we just mapped Gray8 to Alpha8).
>
> This adds another pixel config, which could grow our cache
> footprint, but the benefits of not using 4bpp for 1bpp data
> should outweigh that?
>
> BUG=skia:6110
>
> Change-Id: I4fc4c2479fc25f1d278e174a9bb5b542a0cb184c
> Reviewed-on: https://skia-review.googlesource.com/6817
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

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

Change-Id: I95a4fc0450a569d5791f6bceb7fae61c7e5eba61
Reviewed-on: https://skia-review.googlesource.com/6838
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
f2956459f707de596dcb2c79a7ee1fa62d599c0d 09-Jan-2017 Brian Osman <brianosman@google.com> Add Gray8 pixel config

This is still just linear (non-sRGB), but adding sRGB will
be the next step. I've verified that this is really making
R8 textures when uploading Gray8 bitmaps. Tests pass, and
the all_bitmap_configs GM still renders correctly (unlike
when we just mapped Gray8 to Alpha8).

This adds another pixel config, which could grow our cache
footprint, but the benefits of not using 4bpp for 1bpp data
should outweigh that?

BUG=skia:6110

Change-Id: I4fc4c2479fc25f1d278e174a9bb5b542a0cb184c
Reviewed-on: https://skia-review.googlesource.com/6817
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
bf7b620b1e44985b164a8bd68031a7613fe0bb9b 11-Nov-2016 Brian Salomon <bsalomon@google.com> Revert "Revert "Add integer texture support.""

This reverts commit 9c7edb8311409a141b0dc1d5e480c68c629f1997.

Fixes ASAN errors

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

Change-Id: I1b1dae754d357b01da7169c8e7c59d7d8d8a10f6
Reviewed-on: https://skia-review.googlesource.com/4736
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/include/gpu/GrColor.h
9c7edb8311409a141b0dc1d5e480c68c629f1997 10-Nov-2016 Leon Scroggins <scroggo@google.com> Revert "Add integer texture support."

This reverts commit 434c534bd0ec08cb355fecfb6d2110197b523e74.

Reason for revert: Undefined behavior. From

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/1272/steps/test_skia%20on%20Ubuntu/logs/stdio

../../../tests/IntTextureTest.cpp:51:44: runtime error: left shift of negative value -1
#0 0x2257480 in test_IntTexture(skiatest::Reporter*, sk_gpu_test::ContextInfo const&) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x2257480)
#1 0x1ca1066 in skiatest::RunWithGPUTestContexts(void (*)(skiatest::Reporter*, sk_gpu_test::ContextInfo const&), bool (*)(sk_gpu_test::GrContextFactory::ContextType), skiatest::Reporter*, sk_gpu_test::GrContextFactory*) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1ca1066)
#2 0x1ca080d in run_test(skiatest::Test) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1ca080d)
#3 0x1c9e5e9 in dm_main() (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1c9e5e9)
#4 0x7f2d2ba8df44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287
#5 0x1bb3028 in _start (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1bb3028)

SUMMARY: AddressSanitizer: undefined-behavior ../../../tests/IntTextureTest.cpp:51:44 in
step returned non-zero exit code: 1


Original change's description:
> Add integer texture support.
>
> This allows us to create integer textures and sample them from a GrProcessor's code.
>
> Filtering is limited to NEAREST.
>
> Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs.
>
> Vulkan support is TBD.
>
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4348
>
> Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d
> Reviewed-on: https://skia-review.googlesource.com/4348
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
>

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

Change-Id: I39f1a0a0dd3e6cde1143c8cc1217d2e3d5977b21
Reviewed-on: https://skia-review.googlesource.com/4663
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/include/gpu/GrColor.h
434c534bd0ec08cb355fecfb6d2110197b523e74 10-Nov-2016 Brian Salomon <bsalomon@google.com> Add integer texture support.

This allows us to create integer textures and sample them from a GrProcessor's code.

Filtering is limited to NEAREST.

Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs.

Vulkan support is TBD.


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

Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d
Reviewed-on: https://skia-review.googlesource.com/4348
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
/external/skia/include/gpu/GrColor.h
618d304eb394d64779be0ecdc5eff898242faa8f 25-Oct-2016 Brian Osman <brianosman@google.com> GrConstColorProcessor uses 4f colors in the destination space

Many places that construct one are explicitly specifying opaque white or
transparent black, which we can assume (based on the semantics of the
operation) should remain (0,0,0,0) or (1,1,1,1), so that's simple.

In other cases, we convert our source color to destination space.

One wrinkle is tht SkColorFilter now needs to know the destination color
space, due to SkModeColorFilter.

BUG=skia:

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

Change-Id: I4969c0260588f4021300733f601b47dc606adf79
Reviewed-on: https://skia-review.googlesource.com/3903
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/include/gpu/GrColor.h
4cea3b9e9d9836c926a8feb55d050993d40b4b5e 08-Sep-2016 brianosman <brianosman@google.com> Push usage of GrColor4f into OverrideInput

Just a change to preserve precision.

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

Review-Url: https://codereview.chromium.org/2324553002
/external/skia/include/gpu/GrColor.h
a4535a34d1b317543307df6901debfefe7132569 24-Jun-2016 brianosman <brianosman@google.com> GrColor4f is yet another 4f color type, unfortunately.

- Sk4f would be my choice, but it's not allowed in include/
- SkColor4f and SkPM4f are specified to be unpremultiplied/premultiplied, whereas GrColor (and GrColor4f) are either, depending on context.

This adds 12 bytes to GrPaint. Not sure if we want to pay that price. The precision loss for a single value (vs. in a gradient, etc...) may not justify changing the storage type here. Easy enough to back that part out, while still keeping the 4f intermediate type for the helper math that it adds, and for storage and parameter passing in other locations.

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

Review-Url: https://codereview.chromium.org/2088303002
/external/skia/include/gpu/GrColor.h
a6359365887048ef055196de75591311d7a015f0 21-Mar-2016 brianosman <brianosman@google.com> sRGB support in Ganesh. Several pieces:

sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

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

Review URL: https://codereview.chromium.org/1789663002
/external/skia/include/gpu/GrColor.h
c571c001cee4e0dfacd7bd17d5cd0a2900a853a9 17-Mar-2016 brianosman <brianosman@google.com> Revert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of https://codereview.chromium.org/1789663002/ )

Reason for revert:
We're getting sRGB non-8888 configs?

Original issue's description:
> sRGB support in Ganesh. Several pieces:
>
> sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
> us to disable sRGB -> Linear conversion when reading textures. This gives
> us an easy way to support "legacy" L32 mode. We disable decoding based on
> the pixel config of the render target. Textures can override that behavior
> (specifically for format-conversion draws where we want that behavior).
>
> Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
> internally, and the external format is BGR order, so TexImage calls will
> swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
> platforms.
>
> Devices without sRGB support behave like they always have: conversion from
> color type and profile type ignores sRGB and always returns linear pixel
> configs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002
>
> Committed: https://skia.googlesource.com/skia/+/9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb

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

Review URL: https://codereview.chromium.org/1814533003
/external/skia/include/gpu/GrColor.h
9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb 17-Mar-2016 brianosman <brianosman@google.com> sRGB support in Ganesh. Several pieces:

sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

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

Review URL: https://codereview.chromium.org/1789663002
/external/skia/include/gpu/GrColor.h
f1b7a1d82860e106ed7d3e0e876419e65783fb84 28-Sep-2015 bsalomon <bsalomon@google.com> Make skpaint->grpaint flow work for composing draws (verts and atlas)

One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color.

Review URL: https://codereview.chromium.org/1348583002
/external/skia/include/gpu/GrColor.h
ae4738f677c70f4ec7687422e1510ee3d80d810e 16-Sep-2015 bsalomon <bsalomon@google.com> Create fragment processor for performing input color blend with child processor

The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes.

Review URL: https://codereview.chromium.org/1334293003
/external/skia/include/gpu/GrColor.h
6fd158ea47472c4d038e48980a95e36623f840c9 28-May-2015 cdalton <cdalton@nvidia.com> Implement Porter Duff XP with a blend table

Removes the runtime logic used by PorterDuffXferProcessor to decide
blend coeffs and shader outputs, and instead uses a compile-time
constant table of pre-selected blend formulas. Separates out the dst
read fallback into its own XP.

Introduces a new blend strategy for srcCoeff=0 that can apply coverage
with a reverse subtract blend equation instead of dual source
blending.

Adds new macros in GrBlend.h to analyze blend formulas both runtime.

Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no
longer used.

Adds a GM that verifies all xfermodes, including arithmetic, with the
color/coverage invariants used by Porter Duff.

Adds a unit test that verifies each Porter Duff formula with every
color/coverage invariant.

Major changes:

* Uses a reverse subtract blend equation for coverage when srcCoeff=0
(clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't
support dual source blending no longer require a dst copy for
dst-in and modulate.

* Sets BlendInfo::fWriteColor to false when the blend does not modify
the dst. GrGLGpu will now use glColorMask instead of blending for
these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]).

* Converts all SA blend coeffs to One for opaque inputs, and ISA to
Zero if there is also no coverage. (We keep ISA around when there
is coverage because we use it to tweak alpha for coverage.)

* Abandons solid white optimizations for the sake of simplicity
(screen was the only mode that previous had solid white opts).

Minor differences:

* Inconsequential differences in opt flags (e.g. we now return
kCanTweakAlphaForCoverage_OptFlag even when there is no coverage).

* Src coeffs when the shader outputs 0.

* IS2C vs IS2A when the secondary output is scalar.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/9a70920db22b6309c671f8e5d519bb95570e4414

Review URL: https://codereview.chromium.org/1124373002
/external/skia/include/gpu/GrColor.h
c33db93d1b285923b5deef97ecb04d4d01e05dd5 23-May-2015 bungeman <bungeman@google.com> Revert of Implement Porter Duff XP with a blend table (patchset #12 id:220001 of https://codereview.chromium.org/1124373002/)

Reason for revert:
Blocking DEPS roll into Chromium. Crashing virtual/gpu/fast/canvas/canvas-composite-*.html tests with the assert

../../third_party/skia/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp:281: failed assertion "k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()"

Original issue's description:
> Implement Porter Duff XP with a blend table
>
> Removes the runtime logic used by PorterDuffXferProcessor to decide
> blend coeffs and shader outputs, and instead uses a compile-time
> constant table of pre-selected blend formulas.
>
> Introduces a new blend strategy for srcCoeff=0 that can apply coverage
> with a reverse subtract blend equation instead of dual source
> blending.
>
> Adds new macros in GrBlend.h to analyze blend formulas both runtime.
>
> Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no
> longer used.
>
> Adds a GM that verifies all xfermodes, including arithmetic, with the
> color/coverage invariants used by Porter Duff.
>
> Adds a unit test that verifies each Porter Duff formula with every
> color/coverage invariant.
>
> Major changes:
>
> * Uses a reverse subtract blend equation for coverage when srcCoeff=0
> (clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't
> support dual source blending no longer require a dst copy for
> dst-in and modulate.
>
> * Sets BlendInfo::fWriteColor to false when the blend does not modify
> the dst. GrGLGpu will now use glColorMask instead of blending for
> these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]).
>
> * Converts all SA blend coeffs to One for opaque inputs, and ISA to
> Zero if there is also no coverage. (We keep ISA around when there
> is coverage because we use it to tweak alpha for coverage.)
>
> * Abandons solid white optimizations for the sake of simplicity
> (screen was the only mode that previous had solid white opts).
>
> Minor differences:
>
> * Inconsequential differences in opt flags (e.g. we now return
> kCanTweakAlphaForCoverage_OptFlag even when there is no coverage).
>
> * Src coeffs when the shader outputs 0.
>
> * IS2C vs IS2A when the secondary output is scalar.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9a70920db22b6309c671f8e5d519bb95570e4414

TBR=egdaniel@google.com,bsalomon@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1153993002
/external/skia/include/gpu/GrColor.h
9a70920db22b6309c671f8e5d519bb95570e4414 22-May-2015 cdalton <cdalton@nvidia.com> Implement Porter Duff XP with a blend table

Removes the runtime logic used by PorterDuffXferProcessor to decide
blend coeffs and shader outputs, and instead uses a compile-time
constant table of pre-selected blend formulas.

Introduces a new blend strategy for srcCoeff=0 that can apply coverage
with a reverse subtract blend equation instead of dual source
blending.

Adds new macros in GrBlend.h to analyze blend formulas both runtime.

Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no
longer used.

Adds a GM that verifies all xfermodes, including arithmetic, with the
color/coverage invariants used by Porter Duff.

Adds a unit test that verifies each Porter Duff formula with every
color/coverage invariant.

Major changes:

* Uses a reverse subtract blend equation for coverage when srcCoeff=0
(clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't
support dual source blending no longer require a dst copy for
dst-in and modulate.

* Sets BlendInfo::fWriteColor to false when the blend does not modify
the dst. GrGLGpu will now use glColorMask instead of blending for
these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]).

* Converts all SA blend coeffs to One for opaque inputs, and ISA to
Zero if there is also no coverage. (We keep ISA around when there
is coverage because we use it to tweak alpha for coverage.)

* Abandons solid white optimizations for the sake of simplicity
(screen was the only mode that previous had solid white opts).

Minor differences:

* Inconsequential differences in opt flags (e.g. we now return
kCanTweakAlphaForCoverage_OptFlag even when there is no coverage).

* Src coeffs when the shader outputs 0.

* IS2C vs IS2A when the secondary output is scalar.

BUG=skia:

Review URL: https://codereview.chromium.org/1124373002
/external/skia/include/gpu/GrColor.h
fb5df43af87e77beeb7ca0759678f0cc95a8c6da 21-May-2015 jvanverth <jvanverth@google.com> Add RGBA half float texture format.

BUG=skia:3829

Review URL: https://codereview.chromium.org/1148243002
/external/skia/include/gpu/GrColor.h
b0ae649b7ebda86ef53bf913798b809d500973ed 29-Dec-2014 bsalomon <bsalomon@google.com> Add device space skshader GM to test kDevice_GrCoordSet

Review URL: https://codereview.chromium.org/816003002
/external/skia/include/gpu/GrColor.h
fa1e8a7cefd71f7b75f0b85f8eefe111814dd86f 22-Dec-2014 jvanverth <jvanverth@google.com> Add sRGB texture support.

Review URL: https://codereview.chromium.org/791823003
/external/skia/include/gpu/GrColor.h
2e3b3e369d79e78f7635d4c20e83a47ab571bdf2 09-Dec-2014 joshualitt <joshualitt@chromium.org> This cl moves color and coverage off of drawstate. In an effort to keep this CL manageable, I have left the compute invariant input / output in a bit of a strange state(fixing this will be complicated).

In addition, NVPR makes this very complicated, and I haven't quite figured out a good way to handle it, so for now color and coverage DO live on optstate, but I will figure out some way to refactor that in future CLs.

BUG=skia:

Review URL: https://codereview.chromium.org/783763002
/external/skia/include/gpu/GrColor.h
4ccf0b94054a4c16641c027edb4b0cfd0daddb65 08-Dec-2014 egdaniel <egdaniel@google.com> Fix GrUnPreMulColor.

Current version incorrectly unpacked the resulting sk unpremulled color into rgba.

BUG=skia:3208

Review URL: https://codereview.chromium.org/787713002
/external/skia/include/gpu/GrColor.h
28f9c606e4c8e61015e864219c4bc83a3fdb4a86 05-Dec-2014 jvanverth <jvanverth@google.com> Add support for half float alpha textures.

This allows us to create distance field textures with better precision,
which may help text quality.

BUG=skia:3103

Review URL: https://codereview.chromium.org/762923003
/external/skia/include/gpu/GrColor.h
4bd4e8031df0b38a71fc7344fede5a352484ccbb 01-Dec-2014 egdaniel <egdaniel@google.com> Add function to return an unpremuled version of a GrColor

BUG=skia:

Review URL: https://codereview.chromium.org/773553002
/external/skia/include/gpu/GrColor.h
c87dd2ce965cd1bbc8a74abe0c141658a469d7f2 14-Nov-2014 djsollen <djsollen@google.com> Enable unused param checking for public includes.

This CL cleans up the existing violations and enables the
build time check to ensure that we don't regress.

The motiviation behind this change is to allow clients who include
our headers to be able to build with this warning enabled.

Review URL: https://codereview.chromium.org/726923002
/external/skia/include/gpu/GrColor.h
e27065ae243575f6d5d545909ad3030773c14db8 06-Nov-2014 egdaniel <egdaniel@google.com> Send coverage VA as floats instead of bytes
NOTREECHECKS=True

BUG=skia:

Review URL: https://codereview.chromium.org/700943005
/external/skia/include/gpu/GrColor.h
9c0822a4150e23cec9f9b72bd1abc2c5f9ea5a3b 11-Aug-2014 bsalomon <bsalomon@google.com> Always use both a color and coverage attribute in GrAARectRenderer.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/435743002
/external/skia/include/gpu/GrColor.h
7ef21622b2ed6b9c5fc4c149cb62944fc191f054 17-Jul-2014 krajcevski <krajcevski@google.com> Add new ASTC pixel config

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

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/399623004
/external/skia/include/gpu/GrColor.h
ee5da55477d1679eaf50b56b6017cbfc07af02a7 16-Jul-2014 joshualitt <joshualitt@chromium.org> 32 bpp floating point textures

This is VERY preliminary, but it was sufficient for me to get 32 bit floating point textures in a sample app

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

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/359803003
/external/skia/include/gpu/GrColor.h
238b456a7c6fb85c15f1ec288ea4f406a1a89da2 30-Jun-2014 krajcevski <krajcevski@google.com> R11 EAC texture compression is introduced as part of the OpenGL ES 3.0 spec. This is a format that will likely be required on most mobile phones in the upcoming years, making it better to target than LATC, which is only available on NVIDIA GPUs.

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

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/330763008
/external/skia/include/gpu/GrColor.h
f9dae780c2c46a1f08adbbe8de2faaba091254d4 06-Jun-2014 tfarina <tfarina@chromium.org> Remove GrIsPow2 in favor of SkIsPow2.

Looks like there is no good reason to have two copies of this function
doing the same thing with different name.

BUG=None
TEST=make tests
R=bsalomon@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/318873002
/external/skia/include/gpu/GrColor.h
6e7ddaae0a077a777b8b8872ec27f8faab275536 30-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move the LATC and ETC1 enum values to GrPixelConfig. I also tried to put in checks in a few places to make sure that we weren't using these pixel configurations in places that we shouldn't be.

LATC is a DXT-esque alpha compression format that goes by a few other names (RGTC, 3DC). It might be useful to investigate using it to compress the alpha masks that we get from software rasterization. This patch set adds enums for that and recognition whether or not the device can support it.

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

Author: krajcevski@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14991 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
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/include/gpu/GrColor.h
28361fad1054d59ed4e6a320c7a8b8782a1487c7 28-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add discard API to SkCanvas, plumb it to glDiscardFramebuffer()


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

Author: bsalomon@google.com

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

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

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
018f179efb2413431bdb1a9e6701eb44ef36b792 18-Apr-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Expand modulate, add, subtract, extract component glsl helpers.
Review URL: https://codereview.chromium.org/13895006

git-svn-id: http://skia.googlecode.com/svn/trunk@8755 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
b8eb2e89edf914caf5479baeffcb670d3e93f496 28-Mar-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GrGLShaderBuilder::TextureSampler extract only required info from GrTextureAccess.

This will make it possible to init a TextureSampler without a texture or a specific config.

Also unify two separate bitfields of color components in GPU code.
Review URL: https://codereview.chromium.org/13121002

git-svn-id: http://skia.googlecode.com/svn/trunk@8428 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
e16efc1882ab34a0bb3ae361a2d37f840044cf87 26-Jan-2013 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@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
7534747e631c49680f7199ccf9e71a359cfa647d 17-Sep-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add GrColor to RGBA float helper func

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





git-svn-id: http://skia.googlecode.com/svn/trunk@5572 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
c43649962221c348d656d425a3fa9b29c78231d4 07-Nov-2011 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> [GPU] Add explicit byte order and PM vs. UPM 8888 configs

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



git-svn-id: http://skia.googlecode.com/svn/trunk@2618 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h
d38f137e9b813f8193675ebd3dfbfe8bc42639e9 12-Oct-2011 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move gpu/include/* to include/gpu and gpu/src/* to src/gpu
Review URL: http://codereview.appspot.com/5250070/



git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/gpu/GrColor.h