Don't allow creation of mip-mapped textures when caps says we don't
support mip-mapping.
Skip testing of mip-mapped resources in the resource size test,
when creation will fail.
For iOS devices with ES2, the APPLE BGRA8888 extension is more
trouble than it's worth. Even though it lets the internal and
external formats not match, it appears that the driver remembers
the first external format, so subsequent attempts to upload with
the other swizzle will fail. Up until now, creation of these
textures was failing anyway, so now just make it more explicit
that we don't support BGRA in this situation.
BUG=skia:
Change-Id: Ic2e3ba1673398d542edd46a555ef47b5d0979c01
Reviewed-on: https://skia-review.googlesource.com/18261
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The color in the unit test turned out to be right on the edge
of not round tripping well, and I guess rounding pushed it over
the edge, so I've tweaked it to a new one that seems better.
Change-Id: I46095fafc9d6b68fd417ff9dc32003f42929c5a5
Reviewed-on: https://skia-review.googlesource.com/18238
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Consider the following sequence of events:
1. SkPictureImageFilter::onFilterImage creates a local canvas, wraps it
in a SkColorSpaceXformCanvas, and passed to...
2. SkPictureImageFilter::drawPictureAtLocalResolution creates a local
canvas (localCanvas) wraps that in a SkColorSpaceXformCanvas, draws
the picture to it, doing sRGB->fColorSpace conversion
3. We then call makeImageSnapshot to produce a SkSpecialImage, localImg,
which is not tagged with any color space.
4. When the draw that localImg to the passed-in SkColorSpaceXformCanvas,
which then performs sRGB->fColorSpace conversion a second time.
We now have performed color conversion twice.
One fix for this would be to have the image produced by the call to
localSurface->makeImageSnapshot() be tagged with fColorSpace. This is
somewhat involved.
The less invasive fix is to remove the SkColorSpaceXformCanvas in
SkPictureImageFilter::onFilterImage, and push it down into the two
branches, SkPictureImageFilter::drawPictureAtLocalResolution and
SkPictureImageFilter::drawPictureAtDeviceResolution.
BUG=728332
Change-Id: If2aa32e18ad660b3e361f1d90845eeb8555fe404
Reviewed-on: https://skia-review.googlesource.com/18282
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
Bug: skia:
Change-Id: I02fd77796880b42ce55549a8340b116e1c5f19d6
Reviewed-on: https://skia-review.googlesource.com/18305
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
These methods are removed in an upcoming version of the recipe engine.
R=borenet@google.com
Bug: skia:
Change-Id: I2db5cc683dac35b9ce65fe1b175e9f9a6d6b5efe
Reviewed-on: https://skia-review.googlesource.com/18324
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Originally reviewed here: https://skia-review.googlesource.com/c/17452/
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind
Change-Id: I2e593e897ce93147ec593c2a5de143217274ba2a
Reviewed-on: https://skia-review.googlesource.com/18267
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: Ie01859eafbde292fe7f5228512c4134acf6d452b
Reviewed-on: https://skia-review.googlesource.com/18265
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
No reason to allocate dynamically, now that the impl is private.
Change-Id: I1b6f34fa903149d88fe82f5947c1df899446967e
Reviewed-on: https://skia-review.googlesource.com/18237
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Fixes GrSurfaceTest failure on the trash can
BUG=skia:
Change-Id: I0def62ea7a2693043f6a359a47a3e9e1177ca84d
Reviewed-on: https://skia-review.googlesource.com/18152
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Adds an instance buffer to GrMesh and instance attribs to
GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit
tests for instanced rendering with GrMesh.
Bug: skia:
Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a
Reviewed-on: https://skia-review.googlesource.com/16200
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
SkColor vertex colors need to be linearized (from sRGB),
and possibly converted from sRGB gamut to destination gamut.
Bug: skia:6659
Change-Id: I2b1b1dd0fa5938519693f56a728fed5957f13fd5
Reviewed-on: https://skia-review.googlesource.com/17534
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
rename to make it easy to delete any impl that also had onAppendStages...
i.e. rename to make it clear that it is just an impl trick for rasterpipeline.
Bug: skia:
Change-Id: If3c3b2811eff12d399cdf7a77552c01e72c06996
Reviewed-on: https://skia-review.googlesource.com/18234
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Bug: skia:6668
Change-Id: I324602b1381f701ec780c02b26775c5e9e09cb84
Reviewed-on: https://skia-review.googlesource.com/17834
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it.
Reland of: https://skia-review.googlesource.com/c/17323/ (Update clearOp for split-OpList world)
Change-Id: Ia61ce4d6ce245380fc9651928a46c22039fc12cf
Reviewed-on: https://skia-review.googlesource.com/18026
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
While we're deleting sprite blitters, here's another good candidate.
Change-Id: If10fc677e6bd120413b6ec54ae2e7876c2de7091
Reviewed-on: https://skia-review.googlesource.com/18232
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Id64aadcc372b856c4ddbf7144b3d67e618efbeb3
Reviewed-on: https://skia-review.googlesource.com/18231
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Interestingly, this public api (makeWithColorFilter) is only used internally by
the legacy raster blitters. Perhaps we could remove/hide it?
... and that API is the only way we create one of these shaders.
Bug: skia:
Change-Id: I9bbd3786160844c963a78663e503e08122183701
Reviewed-on: https://skia-review.googlesource.com/18230
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 0cc507d225.
Reason for revert: Causing IntTextureText to fail on bots
Original change's description:
> Expand partial render target write pixels workaround.
>
> The workaround is extended in the following ways:
>
> 1) It now applies to any texture whose base level has *ever* been attached to a FBO.
> 2) It applies to Adreno 5xx in addition to Adreno 4xx
> 3) It applies in the atlas upload code path.
>
> This workaround (and a similar one) are narrowed to GLCaps rather than Caps.
>
> Bug: skia:
> Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5
> Reviewed-on: https://skia-review.googlesource.com/18150
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Change-Id: I53c8dd7ea7f614da57331470fcc24c6d84aba354
Reviewed-on: https://skia-review.googlesource.com/18229
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This has been a long time coming. There are probably one or two more
places we'd want to do this on the CPU side too, but it's a start.
Somewhat seriously, this is my proposed fixed for colorburn +
xfermodes2. We're not interpreting the red or green images sensibly.
BUG=skia:6680
Change-Id: Iea15be08c1907ac1ac46ef358d3d74f1cc35a156
Reviewed-on: https://skia-review.googlesource.com/18221
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: I8698aad706e2c9cc81280107cb08d83e08a9dc25
Reviewed-on: https://skia-review.googlesource.com/18145
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
The workaround is extended in the following ways:
1) It now applies to any texture whose base level has *ever* been attached to a FBO.
2) It applies to Adreno 5xx in addition to Adreno 4xx
3) It applies in the atlas upload code path.
This workaround (and a similar one) are narrowed to GLCaps rather than Caps.
Bug: skia:
Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5
Reviewed-on: https://skia-review.googlesource.com/18150
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
To test this turn on egl, e.g. --args='skia_use_egl=true', and run by altering the
library path to point to the right directory of the EGL driver you want to use, for example:
LD_LIBRARY_PATH=/usr/lib/nvidia-367/ ./out/Release/fiddle | ./tools/fiddle/parse-fiddle-output
Bug: skia:
Change-Id: I2cce80318925fe88f9407646acb67628a8e48810
Reviewed-on: https://skia-review.googlesource.com/18137
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
preliminary step to trying to remove filterSpan4f() from colorfilter
Bug: skia:
Change-Id: I6aa6cfde506ffac22188e9641a23a8285e80a5b9
Reviewed-on: https://skia-review.googlesource.com/18185
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: Ie6ea54d26eff7a165f32afbb5c8037b6c1921a5d
Reviewed-on: https://skia-review.googlesource.com/18138
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Change-Id: I1c285e818c3119bc5917dee6d7fbe4c0c62ff6d7
Reviewed-on: https://skia-review.googlesource.com/18153
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
We used to do this a while ago, then I removed compile().
This puts things back how they used to be.
Change-Id: I676ec1a06249f2356f426fd2847af093526f54d2
Reviewed-on: https://skia-review.googlesource.com/18079
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Since the only thing it looks like we alter when using the ignore
xform flag is the blur radius, this is already handled by the
computeXformedSigma function call. Thus it should be safe to just use
the current fps and draws for circle and rect.
Bug: chromium:724735
Change-Id: I7a2f52dc965dcd875b8c2802141f30607a966347
Reviewed-on: https://skia-review.googlesource.com/18122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I25f029604a04f5fc6c249a3817b0dd84379071be
Reviewed-on: https://skia-review.googlesource.com/18149
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Most importantly, remove the undefined behavior implied by "delta".
Change-Id: I8f9740804ec74dd40b049eafd4f0d51b36ce3237
Reviewed-on: https://skia-review.googlesource.com/18140
Reviewed-by: Herb Derby <herb@google.com>
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android
Change-Id: Ia0e9f32d0324e66c9d4812dbb156a2b858d49a13
Reviewed-on: https://skia-review.googlesource.com/18127
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>