Bug: skia:
Change-Id: I7ad0077345f7589528c89cd84d252539a1df6614
Reviewed-on: https://skia-review.googlesource.com/16703
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
I took a new, unprincipled approach here, which is to just mimic the
legacy code path exactly (e.g. hue_modeproc in SkXfermode.cpp).
This fixes how we handle alpha in these blend modes, and ought to be
faster by avoiding the unpremul.
BUG=skia:6621
Change-Id: I21635290985ff42d9421d2718f7a88cf44a85d7f
Reviewed-on: https://skia-review.googlesource.com/16711
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I395be972abf571af79ccf6ed5917bf463fd2166d
Reviewed-on: https://skia-review.googlesource.com/16709
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting.
Bug: skia:6603
Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4
Reviewed-on: https://skia-review.googlesource.com/16664
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This is fairly aggressive in that it will break any client
that is currently using SkImageGenerator with kIndex8.
I'm guessing that we don't have any clients doing that.
Bug: skia:6620
Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca
Reviewed-on: https://skia-review.googlesource.com/16601
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I70a927261b6530d2352d8d5a713b309aa518e6b0
Reviewed-on: https://skia-review.googlesource.com/16545
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
No "real" API changes.
TBR=reed@google.com
Bug: skia:
Change-Id: I08c29f76806388394938f204f2a50b2fd6ea8942
Reviewed-on: https://skia-review.googlesource.com/16662
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
BUG=skia:
Change-Id: I1a8aef36043d4091bffae95b0275fa7fa8a35c97
Reviewed-on: https://skia-review.googlesource.com/9441
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This is just a name refactor and I'm happy to delay it until we're done
with the current wave of gradient CLs. The main ideas:
- we use the "linear_gradient" stages for all gradients,
so cut the "linear" and just call them "gradient";
- remind ourselves that the 2-stop stage requires even spacing, i.e.
stops at 0 and 1. This name should harmonize with Herb's new
general evenly spaced gradient stage, currently
"evenly_spaced_linear_gradient", and after it lands and I rebase,
"evenly_spaced_gradient"
- remind ourselves which polar coordinate xy_to_polar_unit returns,
the angle.
Change-Id: I0fd0c8bd4c1ead7d2d0fff45a199d318b71f34ac
Reviewed-on: https://skia-review.googlesource.com/16500
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
This reverts commit 892501d09b.
Reason for revert:
https://bugs.chromium.org/p/chromium/issues/detail?id=721682
:(
Original change's description:
> Evenly space gradient stage.
>
> This seems like an experiment at this point because I don't know how to do
> this kind of thing on arm.
>
>
> Numbers from Skylake...
> Before:
> ./out/Release/nanobench --config srgb \
> --match gradient_linear_clamp_3color gradient_linear_clamp_hicolor -q 19:48:13
> Timer overhead: 36.7ns
> ! -> high variance, ? -> moderate variance
> micros bench
> 439.92 ? gradient_linear_clamp_3color srgb
> 2697.60 gradient_linear_clamp_hicolor srgb
> 437.28 gradient_linear_clamp_3color_4f srgb
> 2700.50 gradient_linear_clamp_hicolor_4f srgb
>
>
> After:
> micros bench
> 382.35 gradient_linear_clamp_3color srgb
> 593.49 gradient_linear_clamp_hicolor srgb
> 382.36 gradient_linear_clamp_3color_4f srgb
> 565.60 gradient_linear_clamp_hicolor_4f srgb
>
>
> Numbers on my Mac Trashcan are about even; there is no
> speedup or slowdown between master and this change.
>
> Change-Id: I04402452e23c0888512362fd1d6d5436cea61719
> Reviewed-on: https://skia-review.googlesource.com/15960
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,fmalita@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ic6a064c66686b6f238ca1417ba1abd9ce25de1b4
Reviewed-on: https://skia-review.googlesource.com/16660
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: Iab3dbb007ae67b5d82a727cb1fd5ced6b10b325a
Reviewed-on: https://skia-review.googlesource.com/16605
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Add some simple checks so we can tell whether a shadow's umbra is
completely covered by the occluder, partially covered, or less than
halfway covered.
Change-Id: I092281c4933bd0380946eb0fdd458ce04b0d713c
Reviewed-on: https://skia-review.googlesource.com/16603
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This seems like an experiment at this point because I don't know how to do
this kind of thing on arm.
Numbers from Skylake...
Before:
./out/Release/nanobench --config srgb \
--match gradient_linear_clamp_3color gradient_linear_clamp_hicolor -q 19:48:13
Timer overhead: 36.7ns
! -> high variance, ? -> moderate variance
micros bench
439.92 ? gradient_linear_clamp_3color srgb
2697.60 gradient_linear_clamp_hicolor srgb
437.28 gradient_linear_clamp_3color_4f srgb
2700.50 gradient_linear_clamp_hicolor_4f srgb
After:
micros bench
382.35 gradient_linear_clamp_3color srgb
593.49 gradient_linear_clamp_hicolor srgb
382.36 gradient_linear_clamp_3color_4f srgb
565.60 gradient_linear_clamp_hicolor_4f srgb
Numbers on my Mac Trashcan are about even; there is no
speedup or slowdown between master and this change.
Change-Id: I04402452e23c0888512362fd1d6d5436cea61719
Reviewed-on: https://skia-review.googlesource.com/15960
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
While we're refactoring how gradients work it's going to be easier
to centralized how and when we tile.
- PS2 changed linear and radial in place to alwys clamp.
- PS3 moved tiling to the base class, where it's even harder to
screw up. Sweeps don't need but don't mind tiling.
- PS4 clamps when iff evenly spaced
PS4 has image diffs for only a few GMs that I'm not familiar with.
If its logic reads as correct to you, they may be bug fixes?
Change-Id: I5e37d6e88aaea898356d4c57db0cd5bf414c0295
Reviewed-on: https://skia-review.googlesource.com/16501
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
1) Only store GrColors in GrTextUtils::Paint. We still store
premul and unpremul versions, but this is slightly clearer.
2) GrTextUtils::Paint also needs info from the render target
context to linearize and transform the color to dst space.
Bug: skia:6605
Change-Id: I6e12c55eafaecd2a090c82b4f56827401305bf3a
Reviewed-on: https://skia-review.googlesource.com/16486
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I8eb8cef5456c05a8e314d8404698893c7af82d13
Reviewed-on: https://skia-review.googlesource.com/16368
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We only are really interested in 8888 GMs for this bot.
Unit tests and other configs don't need to run.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER
Change-Id: Iec4e5566cc27e82fea0d5832c514a5141ff80cfa
Reviewed-on: https://skia-review.googlesource.com/16499
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
As we have factored things, we _do_ need to map y. This matrix maps us
back from dst to src space now, but not all the way to t.
We let the subclass inject its own logic for x,y -> t.
(Linear gradients do actually still do this by modifying the first
matrix rather than appending another matrix for x,y -> t. But in
general we cannot not map y here anymore.)
Change-Id: I2f9a87c7b510269a8b218a0247cbff416fe8d6c9
Reviewed-on: https://skia-review.googlesource.com/16495
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: Id5e29b483c2b6f698219abfc5bbb2d858c4fc117
Reviewed-on: https://skia-review.googlesource.com/16427
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Enables debug output on iOS. Everything will work the
same except there will be more output for dm and nanobench.
This should help us flush out remaining flakiness and
will be removed once it's not necessary anymore.
Bug: skia:
Change-Id: Idfdc7cf829e93b905fdb0ac2bbab1e78250b7ae0
Reviewed-on: https://skia-review.googlesource.com/16491
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
Add a clamp value to indicate the percentage of the blurWidth to apply.
Change-Id: I962dc57ed786fa67ed1606b1148f1b2c568025e5
Reviewed-on: https://skia-review.googlesource.com/16424
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>