Instead of relying on cpu-features.c, just do what it does.
Good reading: http://man7.org/linux/man-pages/man3/getauxval.3.html
While it's nice to use the headers when possible, should either of these headers not be available, we can fall back to doing it all manually:
extern "C" uint32_t getauxval(uint32_t)
static const int AT_HWCAP = 16;
static const int HWCAP_CRC32 = (1<<7);
To keep things simple I've slimmed cpu feature detection down to just the features we actually make use of. This removes all runtime feature detection for ARMv7... we expect NEON to be globally available, and so far we haven't used the other FMA/FP16 bits on ARMv7. ARMv8 feature dection remains the same, CRC32 before, CRC32 after. x86 (cpuid-based detection) and MIPS (nothing) are untouched.
We need to keep //third_party/cpu-features for //third_party/libwebp.
Change-Id: I6c96df9a09ae68c8c0e54c1152aa177ba9bafc83
Reviewed-on: https://skia-review.googlesource.com/5800
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This is a precursor to using mask load, mask store, and gather instructions for f16. This is a slight performance win too, through slightly simpler code generation. Having done this, it now makes sense to give a name to f16->f32 conversion, from_f16().
Finally, while we're at this, also send store_f32 through store(), so that now all formats use load, gather, and store uniformly.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: I403f16f712936e2bcf3294e72c863cb6c6fbcf0c
Reviewed-on: https://skia-review.googlesource.com/5731
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
in response to 5784
Change-Id: I3ad34a30743e7ffbd04767668c288a4f884eb19c
Reviewed-on: https://skia-review.googlesource.com/5732
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
We were always already supplying this, makes it simpler
BUG=skia:
Change-Id: I36ac35205df5ab2a0fb7ec26e83ddb1547154816
Reviewed-on: https://skia-review.googlesource.com/5778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The storage cost is the same, so might as well do this when building the pipeline instead of when running it. This also avoids the awkward cvtsi2ss instruction that screws with register renaming.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: I1c7d5bad558870256a31e3da969eee5d80fb93a8
Reviewed-on: https://skia-review.googlesource.com/5782
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: Ie3c41aa0910599c9413b4943fbe63000226e526f
Reviewed-on: https://skia-review.googlesource.com/5776
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I35efd4ad2b7132145c1e477f0b1f283276e9fad5
Reviewed-on: https://skia-review.googlesource.com/5704
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
- explicitly separate bilinear_ stages in x and y too
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: Ib7b4f9d26ea6abe9171068e92424479d811ee606
Reviewed-on: https://skia-review.googlesource.com/5636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I1b3aee2c16075bc481d96052a82f3b3da82061fe
Reviewed-on: https://skia-review.googlesource.com/5699
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Fixes a bad merge.
This reverts commit 073285c059.
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>
It's mostly "How to Effectively Fight with GYP", which is no longer interesting.
BUG=skia:6043
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=5761
Change-Id: I760e8d9c6577846b34d8f1f0d2e37b5a3c553ccf
Reviewed-on: https://skia-review.googlesource.com/5761
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This is less to type in most cases, and gives us more information
(for things like picture-backed images, where we need to know all
about the destination surface).
Additionally, strip out the plumbing entirely for bitmap sources,
where we don't need to know anything.
BUG=skia:
Change-Id: I4deff6c7c345fcf62eb08b2aff0560adae4313da
Reviewed-on: https://skia-review.googlesource.com/5748
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 3944484020.
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 419d81eed4.
>
> 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>
This contains fixes for GLPrograms test and mixed samples rendering.
This reverts commit 419d81eed4.
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>
No one (other than test code) was using this API, and it lacks the context
to do the right thing. Specifically, if this forces a decode of an encoded
image, we don't know the intended use (re: color spaces) to determine how
we should decode.
BUG=skia:
Change-Id: I6ff700b3a5adce8257f35c5e3dd5ba557b2a3219
Reviewed-on: https://skia-review.googlesource.com/5614
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This CL reverts https://skia-review.googlesource.com/c/5148/ (Fix gpu blurring on platforms that "useDrawInsteadOfClear") (all the worstCaseWidth/Height stuff) and adds a new GrRenderTargetContext entry point (absClear) to specify clears that can't be discarded or altered.
BUG=skia:
Change-Id: I18b1373ecf4a153ca8c0f290ab8b1d00770426da
Reviewed-on: https://skia-review.googlesource.com/5484
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
We have much more capacity on the Pixel Cs.
BUG=skia:
Change-Id: I65e136d5e2f44ec4bef9c168a86e706537878532
Reviewed-on: https://skia-review.googlesource.com/5755
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
BUG=chrome:655247
Change-Id: I1c987939ac224075cdd385c879dd091fb0efd82a
Reviewed-on: https://skia-review.googlesource.com/5753
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Seems like the bots don't run hooks. That's okay, even ideal.
They'll keep getting GN via recipes.
DOCS_PREVIEW= https://skia.org/?cl=5725
Change-Id: I000bad3390dddaeb4548972f29c96b8b3288ea6c
Reviewed-on: https://skia-review.googlesource.com/5725
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
BUG=skia:
Change-Id: I523357617135678d0be43a1b41150be58e89f780
Reviewed-on: https://skia-review.googlesource.com/5754
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
ClipPaths can be clipped too, e.g.:
<clipPath id="clip1" clip-path="url(#clip2)">...</clipPath>
Since we're not really drawing clips but resolving their geometry,
asPath() needs to take composed clipping into account (and intersect as
needed).
R=reed@google.com,robertphillips@google.com,stephana@google.com
Change-Id: I25959e22fe50f72042147cfe6b416b6b9ac20cd4
Reviewed-on: https://skia-review.googlesource.com/5720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
The new GN doesn't like "ar = ar + ...", etc.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Win-Clang-arm64-Release-Android
Change-Id: Ib131ee367c4af144f8ffb8562fc26b67675e4f45
Reviewed-on: https://skia-review.googlesource.com/5726
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
If there is enough data in the stream to read the reported canvas size,
but not enough to read the first image's header, we do not know the
true canvas size, since we may expand it to fit the first frame. In
that case, return nullptr from NewFromStream.
Add a test.
SkGifCodec.cpp:
Correct a comment - parse returns false if there is a fatal error.
parse() returning true does not guarantee that the size was found.
Instead of checking the width and height, check to see whether the
first frame exists and has its header defined. If not, we do not yet
know the true canvas size. Assert that the canvas size is non-zero,
which is a fatal error from parse.
SkGifImageReader.cpp:
Move the code to set the header defined before the SkGIFSizeQuery exit
condition. This allows SkGifCodec to check the first frame's header to
determine whether the size is known.
GifTest.cpp:
Add a test which truncates the file just before the image header (and
after the global header). Prior to the other changes, this would create
an SkCodec. For an image that needs its canvas size expanded, the
SkCodec would have an incorrect size.
CodecPartialTest.cpp:
randPixels.gif now needs more than half of its data to create an
SkCodec, so set a minimum for test_partial.
Change-Id: I40482f524128b2f1fe59b8f27dd64c7cbe793079
Reviewed-on: https://skia-review.googlesource.com/5701
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This reverts commit 45aac57ac6.
Reason for revert:
Pixel test suppression has landed in Chrome:
https://codereview.chromium.org/2559213002 (Add suppression for GPU Pixel test in preparation for Skia CL)
Original change's description:
> Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw"
>
> This reverts commit 78e8165ec3.
>
> Reason for revert: Chrome pixel test
>
> Original change's description:
> > Add antialiasing to SkDropShadowImageFilter's shadow draw
> >
> > A BW draw in the SkDropShadowImageFilter can lead to unexpected popping of the shadow when the dest rect lies on half pixel boundaries.
> >
> > Change-Id: Ibc59dacc79bca8955981ec2889e79facd7d2de83
> > Reviewed-on: https://skia-review.googlesource.com/5669
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=bsalomon@google.com,robertphillips@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I0b0073cd8d9f1502daaa452c2153af029c11e52a
> Reviewed-on: https://skia-review.googlesource.com/5652
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7d844c486fd6db57d3df60a32c12699f2d85ad16
Reviewed-on: https://skia-review.googlesource.com/5747
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Mostly to get
5d7f4ce [GN] Fix generate Xcode project for macOS to work with Xcode 8.
After this lands, gclient sync && python bin/fetch-gn to get the new GN.
Change-Id: I3e1a186996b1db69ef767922a5b9efff173b950c
Reviewed-on: https://skia-review.googlesource.com/5723
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 8e7432b7f9.
Reason for revert: <INSERT REASONING HERE>
external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations
void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override;
Original change's description:
> remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
>
>
> switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone
>
> BUG=skia:
>
> Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
> Reviewed-on: https://skia-review.googlesource.com/5714
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c
Reviewed-on: https://skia-review.googlesource.com/5721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
gn gen --args='malloc="tcmalloc"'
gn gen --args='malloc="jemalloc"'
or if the library is in a non-standard directory
gn gen --args='malloc="tcmalloc" extra_ldflags="-L<path-to-library>"'
Change-Id: Icacd837d11392a1971f298ccddd69a5a6781f6cf
Reviewed-on: https://skia-review.googlesource.com/5629
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Two crashes and a hang. Abort and return false
in these cases.
TBR=kjlubick@google.com
BUG=skia:5983
Change-Id: I41ac3e56d47ee423b634b2f4886085b9caada76b
Reviewed-on: https://skia-review.googlesource.com/5716
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone
BUG=skia:
Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
Reviewed-on: https://skia-review.googlesource.com/5714
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
The path contains a cubic with a very tight curve.
Split the cubic into pieces so that the individual
curves are better behaved.
Use both inflections and max curvature to
potentially split cubics. Since this may require
a bit of work, preflight to ignore cubics that
monotonically change in x and y.
Only one of the three tests referred to by the bug
below repro'd. Use path.dumpHex() instead of
path.dump() to capture the crashing data.
TBR=reed@google.com
BUG=skia:6041
Change-Id: I29a264f87242cacc7c421e7685b90aca81621c74
Reviewed-on: https://skia-review.googlesource.com/5702
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
The presence seems to be disallowed in the specs (10.8/10.9), but two
test images on the ICC website have them, and fail if we abort. Replaced
the failure with a print warning.
BUG=skia:
Change-Id: I463f1a8861eaa0eb62081c3213017dba9012c890
Reviewed-on: https://skia-review.googlesource.com/5658
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>
This spins off parts of 5620 to bake while we work through how to do the rest of libviewer.so -> viewer.apk.
Change-Id: I1cbf135cc952eeb7593e80a5a752dcadaa2dbb00
Reviewed-on: https://skia-review.googlesource.com/5656
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
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>