This moves the work of finding headers from `gn gen` time into the action itself. We can do this safely now because we're constructing a skia.h.d deps file, which Ninja uses to track if-these-are-dirty-then-this-is-dirty relationships. Everything can now live in one handy find_headers.py.
Upshot is, `gn gen` runs ~50ms faster, and I think the code's clearer this way too.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4065
Change-Id: I2f1e7adf68be8e961eb77596786a795134bbb9a6
Reviewed-on: https://skia-review.googlesource.com/4065
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
- when the shader is opaque, srcover becomes src
- don't load dst when blitting in src mode with full coverage
- fold coverage into src alpha when in srcover mode
It's not obvious that we can fold coverage into src alpha when using a 565 mask, so I've not attempted that. What would we do about alpha?
Over all GMs this causes a single 1-bit difference in sRGB mode. No 565 or f16 diffs.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4349
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: Ib9161f498c4efa6b348ca74522166da64d09a7da
Reviewed-on: https://skia-review.googlesource.com/4349
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This breaks the color filter down into a couple logical steps:
- go to unpremul
- apply the 4x5 matrix
- clamp to [0,1]
- go to premul
Because we already have handy premul clamp stages, we swap the order of clamp and premul. This is lossless.
While adding our stages to the pipeline, we analyze the matrix to see if we can skip any steps:
- we can skip unpremul if the shader is opaque (alphas are all 1 ~~~> we're already unpremul);
- we can skip the premul back if the color filter always produces opaque (here, are the inputs opaque and do we keep them that way, but we could also check for an explicit 0 0 0 0 1 alpha row);
- we can skip the clamp_0 if the matrix can never produce a value less than 0;
- we can skip the clamp_1 if the matrix can never produce a value greater than 1.
The only thing that should seem missing is per-pixel alpha checks. We don't do those here, but instead make up for it by operating on 4-8 pixels at a time.
We don't split the 4x5 matrix into a 4x4 and 1x4 translate. We could, but when we have FMA (new x86, all ARMv8) we might as well work the translate for free into the FMAs.
This makes gm/fadefilter.cpp draw differently in sRGB and F16 modes, bringing them in line with the GPU sRGB and GPU f16 configs. It's unclear to me what was wrong with the old CPU implementation.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4346
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: I14082ded8fb8d63354167d9e6b3f8058f840253e
Reviewed-on: https://skia-review.googlesource.com/4346
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4370
Change-Id: Ic19ce3795dce6f2a854a061e2e127ced4edce941
Reviewed-on: https://skia-review.googlesource.com/4370
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Version 1 uploaded to CIPD but not Google Storage. So this is 0 -> 2.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4361
Change-Id: I42597c68e309f861021e16d689088869975e4329
Reviewed-on: https://skia-review.googlesource.com/4361
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This class is already just an alias for std::unique_ptr<T[]>, so replace
all uses with that and delete the class.
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot
Change-Id: I40668d398356a22da071ee791666c7f728b59266
Reviewed-on: https://skia-review.googlesource.com/4362
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This is no longer used and can be removed.
Change-Id: I6aab1cf243aa1f09bdcd26517a392bbcf11c9444
Reviewed-on: https://skia-review.googlesource.com/4360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The buildbot bots don't use this package, so the buildbotless ones don't need it either.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4317
Change-Id: Ife1a31a8a33ea99a925834ddff13d4866eb52b6d
Reviewed-on: https://skia-review.googlesource.com/4317
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
We're going above 260 as-is.
If this doesn't work... hopefully we don't need any of the long-named files.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4316
Change-Id: I3074c28adfbd4fccb5230eaacf2d6f0c4980bbbe
Reviewed-on: https://skia-review.googlesource.com/4316
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
- GalaxyS3 and GalaxyS4 bots no longer exist.
- Add gpudft config for all bots, per conversation with bsalomon. We may need to scale this back if the tests take too long to run.
- Daisy and Tegra2 bots no longer exist.
- Re-enable interlaced PNGs per conversation with scroggo.
- Re-enable msaa on iOS per conversation with bsalomon and stephana.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4311
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android-Trybot;master.client.skia:Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot,Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug-Trybot
Change-Id: I12d6e1e2182f9706fda6bd88e1fd987dc2bc57cf
Reviewed-on: https://skia-review.googlesource.com/4311
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
The spec has been updated to require setting the range for z/depth values
to be 0-1 when the image is 2D instead of just ignoring the field as before.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4308
Change-Id: Ic054ee732472cd9c69f7197fd62cb0cb4f2b26ce
Reviewed-on: https://skia-review.googlesource.com/4308
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
We can build for Android from Windows now. I intend to add a bot to keep it that way, just like Build-Mac-Clang-arm64-Debug-GN_Android does for Mac. The Windows Android builder will need this NDK.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4280
DOCS_PREVIEW= https://skia.org/?cl=4280
Change-Id: Ifaeeb9b81822a410bdf79b39c7e66d0765f78e0b
Reviewed-on: https://skia-review.googlesource.com/4280
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Our internal definition is (and will continue to be) that anything with
a color space is gamma correct. F16 is irrelevant (whether or not we
choose to support untagged F16). This makes these helpers less than
helpful, and lets us remove them from (public) API.
API change is just removal (of unused functions).
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4228
Change-Id: Ia84a423548bfee14a3ba4a43d6d5b8c4686fb5ff
Reviewed-on: https://skia-review.googlesource.com/4228
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
signalBoring() no longer exists. When the fuzzer runs out of randomness,
it just returns 0. Fuzzers should not go into infinite loops if this
happens. do while loops are particularly error-prone.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3963
Change-Id: Iebcfc14cc6b0a19c5dd015cd39875c81fa44003e
Reviewed-on: https://skia-review.googlesource.com/3963
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
After getting discouraged by the non-separable xfermodes, I decided to look at filling out the color filters instead. This one's nice and easy.
There's only 1 GM that exercises this color filter, and it's drawing noticeably lighter now in f16 and sRGB configs. 565 is unchanged. This makes me think the diffs are due to lost precision in the previous method, which was going through the default fallback to 8888 filterSpan().
I double checked: the f16 config now draws nearly identically to the gpuf16 config. It used to be quite different.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4183
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: Ic6feaecae5cf18493b5df89733f6a5ca362e9a75
Reviewed-on: https://skia-review.googlesource.com/4183
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This was always intended to be a temporary dependency to use for
testing. It has served its purpose.
Also, this has already been dropped (accidentally, I think) by
the new GN build.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4220
Change-Id: Ic72ee08bbfaf86ed86a4122fd38be2921eb1327e
Reviewed-on: https://skia-review.googlesource.com/4220
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
This extends the pattern in freetype2 to expat, icu, libjpeg-turbo, libpng, libwebp, and zlib, and gives all these an arg to control which to use.
Homebrew doesn't have dng_sdk, piex, or sftnly, or I'd have done the same for them too.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4260
DOCS_PREVIEW= https://skia.org/?cl=4260
Change-Id: I82e780502bf2217336e791787f172a6fc8f55460
Reviewed-on: https://skia-review.googlesource.com/4260
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Updates the GrPipeline to have user stencil settings instead of actual
settings. This allows us to further defer creating and attaching a
stencil buffer.
This change is a partial step. The ultimate goal is to attach the
stencil buffer and create the stencil settings during render target
flush, but for the sake of keeping this CL smaller, we create the
stencil settings right before use for now.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468653002
Review-Url: https://codereview.chromium.org/2468653002
Add a new accessor to retrieve the repetition count.
Remove constants (and corresponding copyright) in SkCodecAnimation.
These may make sense for the calling code, but are not needed here.
kRepetitionCountInfinite corresponds to Blink's kAnimationLoopInfinite.
Move cLoopCountNotSeen to private. It is used to determine whether we
still need to parse. Add a new enum to the parse query - only parse
enough to determine the repetition count.
Unlike Chromium, SkGifCodec does not account for deleting the reader
(which SkGifCodec does not do) or failed decodes.
Add a test.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2447863002
Review-Url: https://codereview.chromium.org/2447863002
This was another workaround for a flaky bug that happened on Adreno devices.
With all the devices updated to newer drivers I want to see if it still
happens. I haven't been able to repo the original bug locally with multiple
runs, so I think it is time to step it up to the bots.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4212
Change-Id: Idc260785096b054cf0fb30ce9ff0d97178c10ed6
Reviewed-on: https://skia-review.googlesource.com/4212
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>