skia2/include
brianosman 33f6b3f6ee Manually generated sRGB mipmaps, with successively smaller draws.
Dirty GL-generated mipmaps whenever an sRGB texture is used with a new
value for TEXTURE_SRGB_DECODE. Add a new test rectangle to the gamma GM
that tests that textures are correctly converted to linear before
filtering when generating mipmaps.

Added a new unit test that alternates how a texture is interpreted (sRGB
or not), to verify that we rebuild mipmaps when needed, and that we get
the correct results out in both modes.

This test originally failed on four of our bots producing incorrect mips
in three different ways. I'm not real surprised, but it looks like
we can't rely on glGenerateMipmap to do the right thing, in conjunction
with TEXTURE_SRGB_DECODE.

Instead, actually create mip-chains using a series of draw calls.
(My first attempt used glBlitFramebuffer, and that still had bugs on
several bots). This approach appears to work correctly on any device
that fully supports sRGB.

Because the mipmap draws are fairly destructive to state, I had to
hoist them out of bindTexture. That means adding a second pass over
the texture accesses in the processor, at the very beginning of flush.

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

Review-Url: https://codereview.chromium.org/2007973002
2016-06-02 05:49:21 -07:00
..
android Delete SkBitmapRegionCanvas 2016-05-18 06:23:57 -07:00
animator Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow. 2016-03-25 12:59:53 -07:00
c add drawCircle to c api 2016-02-09 13:25:51 -08:00
codec Create SkColorSpaceXform to handle color conversions 2016-06-01 14:47:18 -07:00
config SkPDF: Use Pathops clipping 2016-03-31 07:33:57 -07:00
core [GN] Add support for disabling opts via SK_BUILD_NO_OPTS define. 2016-06-01 07:08:56 -07:00
effects simplify handle-affine: subclass overrides just describe their leaf behavior 2016-04-25 09:25:15 -07:00
gpu Manually generated sRGB mipmaps, with successively smaller draws. 2016-06-02 05:49:21 -07:00
images Delete SkPageFlipper 2016-03-25 10:31:22 -07:00
pathops Move SkTDArray to private. 2016-02-18 08:53:33 -08:00
ports Move SkTypeface to sk_sp. 2016-05-12 10:09:31 -07:00
private Clean up SkFloatBits 2016-05-27 10:47:32 -07:00
svg move SkTDict and SkTSearch into private 2016-01-03 18:36:05 -08:00
utils remove alias for SkMatrix44.h -- chrome callers have been updated 2016-05-05 19:31:46 -07:00
views Correct gesture scale and translation 2016-05-20 07:32:19 -07:00
xml remove unused BML (binary xml) code 2016-04-09 11:09:49 -07:00