Make SkImage_Lazy::onMakeColorSpace return a new SkImage_Lazy
with the color space of SkImage_Lazy::fInfo changed.
Update the call to SkImageGenerator::getPixels to specify
image info with this new color space.
Update the call to SkImageGenerator::generateTexture to specify
this new color space. Update SkPictureImageGenerator to respect
the color space argument. Add a SkTransferFunctionBehavior
argument to SkImageGenerator::generateTexture to indicate if
color conversion is to be doing using an xform canvas.
Update Generator_GrYUVProvider::refAsTextureProxy to include a
color conversion step to respect this new color space.
TBR=reed@google.com
Bug:739559
Change-Id: I156a858884659e9dfae739a653bab2ef89274959
Reviewed-on: https://skia-review.googlesource.com/21605
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Christopher Cameron <ccameron@chromium.org>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:6842
Change-Id: I0bf58f2a00de66cae161561fc87e7adaac651e4f
Reviewed-on: https://skia-review.googlesource.com/22064
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Special cases:
- "sRGB"
- "AdobeRGB"
- "DCI-P3"
- "Linear Transfer with sRGB Gamut"
- "2.2 Transfer with sRGB Gamut"
- "sRGB Transfer with DCI-P3 Gamut"
- "Linear Transfer with DCI-P3 Gamut"
- "sRGB Transfer with Rec-BT-2020 Gamut"
- "Linear Transfer with Rec-BT-2020 Gamut"
tools/colorspaceinfo now prints out the Tag.
Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and
gLinear_TransferFn, gDCIP3_TransferFn.
BUG=skia:6720
Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235
Reviewed-on: https://skia-review.googlesource.com/20225
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Fix up callsites, and remove tests that no longer make sense.
Bug: skia:6828
Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
Reviewed-on: https://skia-review.googlesource.com/21664
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Do not consider kErrorInInput a failure. This probably means a corrupted
image stored in the SKP. This will fix the buildbot.
In addition, fix some other problems:
- Return an error when no SkPicture is created, rather than crashing.
- Use a different name for failed decodes, so they don't get overwritten
by future failed or successful decodes.
Bug: skia:6840
Change-Id: Ia1d04e145a58495fb955d4b07dbb260cb7a35809
Reviewed-on: https://skia-review.googlesource.com/22031
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This reverts commit 086ce11386.
Reason for revert: Looks to be upsetting the bots (grglgpu.cpp(2766): fatal error: "assert(!useHWAA || rt->isStencilBufferMultisampled())")
Original change's description:
> Make TessellatingPathOp be a non-legacy GrMeshDrawOp
>
> Change-Id: Ic92fdca7bdca91eab3a87e4fea3972ffdcfd5b12
> Reviewed-on: https://skia-review.googlesource.com/21867
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=jvanverth@google.com,bsalomon@google.com
Change-Id: Ibb0c8f8f4e2dea018b54686ab780535e2f69539a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22060
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Change-Id: Ic92fdca7bdca91eab3a87e4fea3972ffdcfd5b12
Reviewed-on: https://skia-review.googlesource.com/21867
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I814c696e38c685a294f9696984612807bc94b43d
Reviewed-on: https://skia-review.googlesource.com/21862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Recipe rollers can't find any reviewers for CLs.
Bug: skia:
Change-Id: I6222d4250f8f012dc1a145d1721f9f274a52f2a8
Reviewed-on: https://skia-review.googlesource.com/21866
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
See anglebug.com/2098
No-Tree-Checks: true
Change-Id: I793459f57a75ccefc7f071ef506e9d128c5abbe4
Reviewed-on: https://skia-review.googlesource.com/21860
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Update unittest to build test image with legal premul pixels.
Bug: skia:
Change-Id: Iebd1d2f81cac77f8913bd79f6ac25983ed710641
Reviewed-on: https://skia-review.googlesource.com/21735
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Also adds support for static texel buffer access patterns.
Bug: skia:
Change-Id: Iadf1b82adbc5f84960841b7526e16d1aa77de621
Reviewed-on: https://skia-review.googlesource.com/21705
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 6945c946ea.
Reason for revert: Should be able to upload to partner bucket now
Original change's description:
> Temporarily stop uploading to partner bucket in RecreateSKPs bot
>
> Bug: skia:6797
> Change-Id: I812837d02b90b78b6df3980649ccf6362e939afc
> Reviewed-on: https://skia-review.googlesource.com/20820
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>
TBR=borenet@google.com,rmistry@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:6797
Change-Id: I145275da0050da01fca3e6e9c3c5efd84bdadea1
Reviewed-on: https://skia-review.googlesource.com/21738
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Previously, when asked to render aliased text with distance fields,
we would get the aliased glyph from the cache and then try to
anti-alias the edge. This change instead grabs the anti-aliased glyph,
then deliberately aliases the edge.
Bug: chromium:707979
Change-Id: I05766af17d7ae58bca27aaffd9e08e5c586e789c
Reviewed-on: https://skia-review.googlesource.com/21728
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Instead of plugging private fields from the factory, pass to ctor.
Change-Id: Iea186e394182bddb6a569de1a05f2e40d6815c80
Reviewed-on: https://skia-review.googlesource.com/21734
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
A recent run of the experimental VC++ /analyze builder gave this
warning:
skia\src\gpu\gl\grglgpu.cpp(851) : warning C6287: Redundant code: the left and right sub-expressions are identical.
The code it complained about was this:
if (width < 0 || width < 0) {
which was introduced in https://skia-review.googlesource.com/c/20445/
This change makes the obvious fix.
Change-Id: I9d1743293fac9dd15ed82cf85efef907d727921e
Reviewed-on: https://skia-review.googlesource.com/21620
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The cache is scoped with the SkColorSpaceXformer object.
This ensures we're not transforming nodes with a degree > 1 multiple
times, and preserves the DAG topology.
Change-Id: I0b072cdac95f9f1c34e0565ed4f258aba986e1ae
Reviewed-on: https://skia-review.googlesource.com/21726
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
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>
Previously, SkGifCodec treated an error in the LZW data as incomplete,
since we can still draw the partially decoded image. But a client doing
incremental decodes needs to distinguish this from truly incomplete
data. In the case of an error, the client should not attempt to provide
more data and decode again.
Add kErrorInInput, and return it when SkGifCodec sees a fatal error.
Treat it the same as kIncompleteInput when it comes to filling and DM.
Bug: skia:6825
Change-Id: Ic6ce3a62c0b065ed34dcd8006309e43272a3db9f
Reviewed-on: https://skia-review.googlesource.com/21530
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
numImages is read from untrusted data, and as an unsigned short could
be up to 65,536. Avoid calling new with this number, which could result
in a crash if it pushes the device over the memory limit.
Change-Id: Ifff9e0ac6ade2b3d8584af656ea7d2f9eb4998e2
Reviewed-on: https://skia-review.googlesource.com/21269
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
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>
When asking for help on more than one item,
e.g. foo -h me -h oh -h my just print Flags:
once.
TBR=scroggo@google.com
Change-Id: I67080c7390e6bacf4c36096304dd959229fdd07b
Reviewed-on: https://skia-review.googlesource.com/21660
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>