This adds and uses a byte_tables stage that converts to bytes, looks up
in the tables, then converts back to floats.
We treat this as color filter as pure math, not considering anything
colorspace related: no transfer functions, no gamut to change, etc.
Change-Id: If5fefc1bcef61a0fb0ae279002a0dd1547e429ea
Reviewed-on: https://skia-review.googlesource.com/7413
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
And roll recipes to the point where they pass target_cpu to GN,
adding x86_64 as an alias for x64.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-GN_iOS,Build-Mac-Clang-arm64-Release-GN_iOS,Build-Mac-Clang-arm-Debug-GN_iOS,Build-Mac-Clang-arm-Release-GN_iOS
Change-Id: I1933d5803ec7f59f78576c5a7b16489362905a97
Reviewed-on: https://skia-review.googlesource.com/7403
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
BUG=chromium:683578
Change-Id: I3f9b79eeeba3c68cccb72bd6423811c8ff8f2067
Reviewed-on: https://skia-review.googlesource.com/7410
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I7ac33faa59bcad25b0580193af965a8525eb18e7
Reviewed-on: https://skia-review.googlesource.com/7360
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Though not required by spec, the validation layers have started spitting
out warnings if the clearValueCount in BeginRenderPass is greater than
the number of attachments actually being cleared. This just adds tracking
of the count to appease the validation layers.
BUG=skia:
Change-Id: Iac6500df3ed5ad3f5df5f045c6e533bb021857aa
Reviewed-on: https://skia-review.googlesource.com/7401
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This refactor will make it simple to add F16 and
GammaCorrect support to the webp encoder.
BUG=skia:
Change-Id: I379ba2ff0b44d865847877322e86d0c138e727c8
Reviewed-on: https://skia-review.googlesource.com/7356
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Original CL: https://skia-review.googlesource.com/c/7326/
(1) Move trimming logic into Bitmap/Pixmap level for
raster. Everything goes through here, so we'll
only do the work once.
(2) This means it also goes to GPU level.
(3) Always use SkReadPixelsRec rather than inlining
the logic.
(4) Create an SkWritePixelsRec to encapsulate write
trimming.
(5) Disabled kIndex8 as a dst - always.
CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug
BUG=skia:6021
Change-Id: I25a964e3c610c4e36d195a255e2150657baec649
Reviewed-on: https://skia-review.googlesource.com/7404
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
(actually fixes undefined result in getClipBounds)
future CLs
- update all callers to new apis
- move/rename virtuals
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=7400
Change-Id: I45b93014e915c0d1c36d97d948c9ac8931f23258
Reviewed-on: https://skia-review.googlesource.com/7400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 977f64cbfa.
Reason for revert: Triggering nanobench asserts
Original change's description:
> Refactor trimming logic for read/writePixels()
>
> (1) Move trimming logic into Bitmap/Pixmap level for
> raster. Everything goes through here, so we'll
> only do the work once.
> (2) This means it also goes to GPU level.
> (3) Always use SkReadPixelsRec rather than inlining
> the logic.
> (4) Create an SkWritePixelsRec to encapsulate write
> trimming.
> (5) Disabled kIndex8 as a dst - always.
>
> BUG=skia:6021
>
> Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510
> Reviewed-on: https://skia-review.googlesource.com/7326
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6021
Change-Id: If9aacc6ce8b20e3dfe8a0f22ebca653f28356175
Reviewed-on: https://skia-review.googlesource.com/7379
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
This reverts commit d2eb581ebc.
Reason for revert: broke Google3 MSAN run of dm
Original change's description:
> offset angle check edge in common
>
> When curves cross, their intersection points may be nearby, but not exactly the same.
> Sort the angles formed by the crossing curves when all angles don't have the same
> origin.
>
> This sets up the framework to solve test case that currently fail (e.g., joel6) but
> does not fix all related test cases (e.g., joel9).
>
> All older existing test cases, including extended tests, pass.
>
> Rework the test framework to better report when tests expected to produce failing
> results now pass.
>
> Add new point and vector operations to support offset angles.
>
> TBR=reed@google.com
> BUG=skia:6041
>
> Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e
> Reviewed-on: https://skia-review.googlesource.com/6624
> Commit-Queue: Cary Clark <caryclark@google.com>
> Reviewed-by: Cary Clark <caryclark@google.com>
>
TBR=caryclark@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:6041
Change-Id: I43db0808522ac44aceeb4f70e296167ea84a3663
Reviewed-on: https://skia-review.googlesource.com/7373
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
When building Chrome with VC++ 2017 the QuickFDot6Inverse::table pointer
is initialized to zero. This is certainly a bug, and it has been
reported to the VC++ team. But, the table pointer appears to be
unnecessary. Changing the code to reference the array directly should
give identical or perhaps even better code.
The change to the array indexing code is as follows:
- return table[x];
+ gFDot6INVERSE[kInverseTableSize + x];
This looks like a step backwards, but it isn't. 'table' is a pointer.
So, by default the compiler will load this pointer and then load the
value from the array. gFDot6INVERSE is an array, not a pointer. This
means that the adding of kInverseTableSize is trivially done at
compile time, and there is no loading of a pointer - only one data
segment memory access is needed.
The compiler may have realized that this optimization was ready before,
but now it is more trivial. And, this works around the VC++ 2017 bug so
that Chrome with VC++ 2017 will launch.
https://connect.microsoft.com/VisualStudio/feedback/details/3119337
BUG=683729
Change-Id: Iad443b59a70af83b39260e244e3242e782fafdbb
Reviewed-on: https://skia-review.googlesource.com/7284
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
(1) Move trimming logic into Bitmap/Pixmap level for
raster. Everything goes through here, so we'll
only do the work once.
(2) This means it also goes to GPU level.
(3) Always use SkReadPixelsRec rather than inlining
the logic.
(4) Create an SkWritePixelsRec to encapsulate write
trimming.
(5) Disabled kIndex8 as a dst - always.
BUG=skia:6021
Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510
Reviewed-on: https://skia-review.googlesource.com/7326
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
(This CL also turned on Analytic AA for concave paths by removing SK_SUPPORT_LEGACY_AAA flag.)
Performance:
The SK_ALWAYS_INLINE was restored because it could bring 30%-50% speedup
in certain convex cases (e.g., fill_big_triangle). We also have to
reduce the number of branchings in the concave code path to enable such
speedup. (Although the speedup is for convex cases. The assembly code is
so strange...)
Intersection:
Previously, the criterion is too loose and that caused some bad pixels
(mostly unnoticeable by human eyes without magnifying). For example,
pixel (198, 222) of
https://gold.skia.org/detail?test=parsedpaths&digest=979e81de6f7b3f9e7e8dc810e31cad8d
BUG=skia:
Change-Id: I5e8191865c3df625f895cd4588c67c283fcbeaec
Reviewed-on: https://skia-review.googlesource.com/7318
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Change-Id: I1ced904f0929653aa9bac09fee86607533e28be6
Reviewed-on: https://skia-review.googlesource.com/7359
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
1.0f is the most commonly used constant, so we put it first in the
constant struct. This usually cuts an instruction off loading it.
Change-Id: Ie54a9482aa3e90e9e5d8fcaa40dbd353af0fa1ca
Reviewed-on: https://skia-review.googlesource.com/7367
Reviewed-by: Mike Klein <mtklein@chromium.org>
This reverts commit 58ce2bc51a.
Reason for revert: warnings / errors when building ANGLE.
Original change's description:
> Try /MTd on Debug Windows builds.
>
> The people clamor for it! I doubt we'll care in our testing.
>
> BUG=skia:5928
>
> Change-Id: I80d3948fd1f5d0b956c308bc3a6183b8660575ae
> Reviewed-on: https://skia-review.googlesource.com/7364
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
>
TBR=mtklein@chromium.org,bungeman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5928
Change-Id: Id6ab3de7ebb5394749233429bada2f5244ff2978
Reviewed-on: https://skia-review.googlesource.com/7372
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This just tidies up the .cpp files a bit, and makes it easier to make
sure all exported functions use the aapcs-vfp callig convention, which
hard-float implies.
As a small simplification, fold -march=armv7-a into --target.
No generated code changes.
Change-Id: I2694970a6e48bd69c41dd280a44ddd0029e52ae8
Reviewed-on: https://skia-review.googlesource.com/7371
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
The people clamor for it! I doubt we'll care in our testing.
BUG=skia:5928
Change-Id: I80d3948fd1f5d0b956c308bc3a6183b8660575ae
Reviewed-on: https://skia-review.googlesource.com/7364
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: Ie193e5bf576b8d3ddbd4c99d3707e3211557cc01
Reviewed-on: https://skia-review.googlesource.com/7368
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: Iec5fc759e331de24caea1347f9510917260d379b
Reviewed-on: https://skia-review.googlesource.com/7363
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Another step towards reducing the number of texture upload paths.
BUG=skia:
Change-Id: Ica185e7334f52dc9ebf87e21fe6f60589ef87bb3
Reviewed-on: https://skia-review.googlesource.com/7346
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 3329cceab5.
Reason for revert: Bot failures are unrelated to the original change.
Change-Id: I21b5927dc4384a25930bdefe16e57bcc9276ffa4
Reviewed-on: https://skia-review.googlesource.com/7347
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Ganesh doesn't support Index8, because GPUs don't really
support it. So serializing it in the deferred blob just
meant doing an expansion before upload. This forces that
to happen when we build the blob. It also paves the way
for removing the last usage of MakeTextureFromPixmap,
which I'd like to remove.
BUG=skia:
Change-Id: I7c0292098d71e2f8ec1f9910e1234761822ce957
Reviewed-on: https://skia-review.googlesource.com/7340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit f833215420.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Make it possible to query GrXPFactory for dst texture without GrPipelineAnalysis.
>
> Change-Id: I8c140eb4e3e5f2d21ecbf8f8f3c8533dc7f50e7c
> Reviewed-on: https://skia-review.googlesource.com/7316
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I790afb9a01422cb4c2d3a4be4ecd20e8c4466b29
Reviewed-on: https://skia-review.googlesource.com/7342
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix)
Relanding of: https://skia-review.googlesource.com/c/6977/
Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02
Reviewed-on: https://skia-review.googlesource.com/7265
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=mtklein@google.com
Change-Id: Iad5cda6bc9b9728ade249e8e88ae830798955a3e
Reviewed-on: https://skia-review.googlesource.com/7339
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
I think the -0.5f was an implementation detail of Herb's bilerp that we
don't need here. It happened to also be clamping us to something less
than limit (limit-0.5), so we do need to replace that with a little
nudge to keep us on tile.
Change-Id: I4ebd32e0ad38c724a17dc8bc35d9ea228eeeca32
Reviewed-on: https://skia-review.googlesource.com/7338
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
When curves cross, their intersection points may be nearby, but not exactly the same.
Sort the angles formed by the crossing curves when all angles don't have the same
origin.
This sets up the framework to solve test case that currently fail (e.g., joel6) but
does not fix all related test cases (e.g., joel9).
All older existing test cases, including extended tests, pass.
Rework the test framework to better report when tests expected to produce failing
results now pass.
Add new point and vector operations to support offset angles.
TBR=reed@google.com
BUG=skia:6041
Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e
Reviewed-on: https://skia-review.googlesource.com/6624
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This CL enables Vulkan Test bots on the NexusPlayer
TBR:bsalomon@google.com
BUG=skia:
Change-Id: I0cc8b01107afcc84e0cb0631f361f3615fc8dd9b
Reviewed-on: https://skia-review.googlesource.com/5681
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We can use SSE's 16 bit mul-hi to get a very good approximation to the
ideal multiplier. This lets us trim several instructions.
This removes the need for the constant 0x0001 and instead uses 0x8081.
I've reordered the constants so that 0x8000 comes first, which helps
trim an instruction here and there on ARM.
Change-Id: I3d490c802df39a89424230c4cfc491f52210c275
Reviewed-on: https://skia-review.googlesource.com/7282
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
A trivial change but it does better indicate the nature of the method
Change-Id: I44a0e77dba28df892f4200496d78797ed5fd37df
Reviewed-on: https://skia-review.googlesource.com/7331
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
I noticed scale_u8 is implemented in SkSplicer_stages but not _lowp.
That's not for any good reason... scale_u8 makes fine sense in _lowp.
All other stages missing in _lowp are nuts to attempt without floats.
This also renames the to_fixed15 lambdas to from_u8 functions.
Everything in the file converts to or from fixed15; the interesting
question is the other format. Similarly, from_fixed15 becomes to_u8.
Change-Id: I10616b6772c65bd1acb9857f4f5b5f70a4f01bf4
Reviewed-on: https://skia-review.googlesource.com/7323
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
I recentely removed the only call site of this so it should be
safe to delete now.
BUG=skia:
Change-Id: Id7fa94b9af5d73c4f7bb5e5a657d6fc6728923b5
Reviewed-on: https://skia-review.googlesource.com/7330
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I7b11a323b0c74ee70f52b1bd8be376fb7188cb19
Reviewed-on: https://skia-review.googlesource.com/7204
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This lands the rest of the original CL.
It fixes some flawed logic in SkSwizzler handling Gray8
images.
Original CL:
https://skia-review.googlesource.com/c/7085/
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-x86_64-Release-Fast
Change-Id: Ie2f0c545ea474f1872f284dfb286987b6eadf03d
Reviewed-on: https://skia-review.googlesource.com/7320
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>