Commit Graph

43347 Commits

Author SHA1 Message Date
Florin Malita
17b9d1d1de [skottie] Initial Hue/Saturate effect support
Due to limitations in BodyMovin/AE JSX, full effect data is not
available (specifically the "channel range" property).

We only support static master hue, static master saturation and
static master lightness at this point.

This CL also introduces a new animation builder pattern:
DiscardableAdapterBase and attachDiscardableAdapter().

The former is a base class for adapters with full animator ownership.
This enables a) capturing raw adapter pointers in animator lambdas and
b) syncing to SG only once, after all local animators are updated).

The latter is a helper for managing adapter creation and optional
destruction (when all adapter properties are static we can discard it).

Change-Id: Iecc4b78830e5464e7958cb12cdfd75a61010aa25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231956
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-02 18:04:14 +00:00
Mike Klein
95529e8216 x86 store16
Nothing particularly tricky.  Very much like store8,
but with one fewer shuffle.

This lets some of the 565 blitters JIT!

Change-Id: I853905bda30a0cda89f3fcb5fef1dfe62725063b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232059
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 17:47:34 +00:00
Robert Phillips
c326aaf134 Increase specificity of GrColorType computed for YUV planes
When a single channel texture is used for a YUV channel we will
interpret it as kGray_8. When a single channel texture is used
as an A channel we will interpret it as kAlpha_8.

Change-Id: I746f8d761d7779266a4106311a93d651266bb422
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232017
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-02 17:44:04 +00:00
Mike Reed
b2e3c649ef fix bicubic to not be confused by rotated ctms
... a bunch of gm diffs, but all are expected.

Guard flag: SK_SUPPORT_LEGACY_BICUBIC_FILTERING

Bug: skia:9293
Change-Id: I992222ebdee806baa84aff950cd9da270ad3070f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232019
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-02 17:41:16 +00:00
Robert Phillips
d344284e77 More SkAutoPixmapStorage
A left over code review request

Change-Id: Ib58abaee4761d14b8ec67f88dc903ac1ed06a58e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232016
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-02 16:59:04 +00:00
Chris Dalton
6b49810f98 Extract a GrRenderTask base class from GrOpList
This is a more abstract representation of something that can
participate in the DAG by modifying a GrSurfaceProxy's pixels. This
will serve as the direct base class for future DAG participants that
aren't opLists, and help to eventually remove GrTextureOpList.

Bug: skia:
Change-Id: Ia903c0188e0f6a6602781b90ee8da87ba3cc13f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-02 16:56:09 +00:00
Mike Klein
52010b7dd8 x86, load16
Very similar to load8.

The only interesting thing is how different vpinsrw is from vpinsrb (and
vpinsrd and vpinsrq)... different map of instructions entirely.

Change-Id: Ia413b83604dd2d277d59495c5f693f505c35be9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232058
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 16:52:44 +00:00
Hal Canary
ebfcf0c073 experimental/editor: cleanup
Remove unneeded setText().
    Change default font.
    EditorApplication constructor does no real work.

Change-Id: Ie257fbc9873d99ccb3972842493d65a12b0e7904
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231479
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-02 16:51:04 +00:00
Mike Klein
94d054b53c x86 uniform8
Add vbroadcastss(Ymm, Xmm) and expand movzbl() to support an offset.

The sequence

    movzbl          (load a byte, zero-extend to 4 byte)
    vmovd           (move that 4 byte value to an xmm)
    vbroadcastss    (broadcast low 4 bytes of xmm to all lanes of ymm)

implements uniform8.

Change-Id: I1d3125920d19dcb3cad5980495310bc95b9dffee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232057
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 16:41:44 +00:00
Hal Canary
149f3f1978 tools/sk_app: fWindowContext is unique_ptr<>
Change-Id: I828f298e336da22756588d981481c76b890af2ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231648
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-02 16:16:34 +00:00
Mike Klein
788967eb37 add vbroadcastss(Ymm, GP64, int)
vbroadcastss with a register argument and immediate offset implements
uniform32.  And this turns on the JIT for some new SkVMBlitter paths
that pass more arguments that I'd previously wired up, so add a few
more.

Change-Id: I66db1286dcdb2c4a4ba7c43f2dc2cd13564d4d34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232056
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 16:07:37 +00:00
Hal Canary
3f4a2b3499 sk_app, editor: cursor blink
Change-Id: I43044727298265ddb711456346c2b544ca8d509d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231477
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-02 15:36:40 +00:00
Brian Salomon
01915c0dd0 GrCaps::supportedWritePixelsColorType takes CT/format rather than config.
Bug: skia:6718
Change-Id: I555a1c6962e7abbe0c7a7271f563e2aab714207d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231640
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-02 15:21:30 +00:00
Michael Ludwig
297587ba1a Update skottie/sksg to use new filter factories
Bug: skia:9280
Change-Id: I944c2985a6ebdd23a11729069a0ece2c49c4f4b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230887
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-02 14:51:42 +00:00
Michael Ludwig
a861106e49 Update docs and samplecode to use new image filter factories
Bug: skia:9280
Change-Id: I03ba9bf1cc952dec77664721fdb3a311f47f7e89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230884
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-08-02 14:47:35 +00:00
Michael Ludwig
ef43f68697 Update fuzzer to use new image filter factories
Bug: skia:9280
Change-Id: I36c197a8481c99b6f8577fc613869ff89f1d5ef6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230886
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 14:46:40 +00:00
Ben Wagner
22e04c6e10 Tweak css3 weight score, prevent ties.
The old code could produce ties and didn't make much logical sense.
Now the range between 400 and 500 prefers heavier weights up to 500,
then lower weights, then the least weight above 500.

Change-Id: I4e80f43c039d795efc49a7329c5c64f9da0fd9b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231957
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-02 14:42:31 +00:00
Stephen White
bb6bed1d07 First implementation of GrDawnProgramBuilder.
Conversion of SkSL to (Dawn-friendly) SPIR-V.
Conversion of GlBlendCoeff -> dawn::BlendFactor.
Conversion of GlBlendEquation -> dawn::BlendOperation.
Creation of dawn::ColorState from color format, write mask, blend state.
Building of basic BindGroupLayouts and BindGroups (the equivalent of
Vulkan's DescriptorSets).
Handling the RTAdjustment uniform, which handles the viewing transform.

Change-Id: If8aef19d71f81bc805defcf5fd7c4ebe3b9547db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231177
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-02 14:25:00 +00:00
Michael Ludwig
06eacf44d5 Add new SkImageFilters factory API
In preparation for moving the filter-specific headers from include/effects and into src/effects/imagefilters, this exposes a more convenient API where all filters provided by Skia are accessible from the same factory.

It also only exposes the factories that take the shared enums (SkColorChannel, SkTileMode), so the per-filter enums can be phased out (SkBlurImageFilter::TileMode, etc.). It also accepts an SkIRect* instead of an SkImageFilter::CropRect* since all uses seem to be for integer rectangles and flags are either always on or always off. This will allow us to later remove the CropRect type.

Bug: skia:9280
Change-Id: I71f77ff44b573f87b837d6523b9eb565521f0f36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230876
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 13:33:35 +00:00
Greg Daniel
eadfac9878 Rework maxRenderTargetSampleCount and isFormatRenderable in GrCaps.
With this maxRenderTargetSampleCount only takes a GrBackendFormat and
returns a sample count based on that only. If a caller wants to know if
a given Format and GrColorType pair is renderable they should use
isFormatRenderable which now also takes a desired sample count.

This change also allows the removal of GrPixelConfig version of
maxRenderTargetSampleCount and internalMultisampleCount.

Bug: skia:6718
Change-Id: I563c61f8349e56f6681378170a45f33ac5cddfa9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231558
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 13:31:45 +00:00
Nathan Rogers
fdd03910d6 Add a TRACE_EVENT for SkGpuBlurUtils::GaussianBlur
This function has been found to have strong influence over UI
performance for the Fuchsia project (in both the GPU work it goes on to
create, and the execution of the function itself when shader compilation
is required).  Add a trace event for it to increase its visibility in
traces.

Change-Id: Ia29cc26fc047d03fb0a4db48dae5ea2ebcd07099
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230017
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Nathan Rogers <nathanrogers@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 12:39:04 +00:00
skia-recreate-skps
ccb8f1c82e Update Go deps
Change-Id: I3414526eb3bdf08d27da1d5f60325f56b789ba10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231928
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2019-08-02 05:26:13 +00:00
skia-autoroll
29ec74ce48 Roll third_party/externals/angle2 1dbbc7b3e232..369f9e5df60b (7 commits)
1dbbc7b3e2..369f9e5df6

git log 1dbbc7b3e232..369f9e5df60b --date=short --no-merges --format='%ad %ae %s'
2019-08-01 geofflang@chromium.org GL: Support Rectangle textures as sources for glCopyTextureCHROMIUM.
2019-08-01 syoussefi@chromium.org Vulkan: Enable passing ES2 multisample tests
2019-08-01 dongja@google.com Vulkan: Fix array handling in default uniforms
2019-08-01 jmadill@chromium.org Capture/Replay: Refactor entry points.
2019-08-01 syoussefi@chromium.org Disable atomic counter buffer tests on AMD/Windows/GL
2019-08-01 jmadill@chromium.org Refactor return values from entry points.
2019-08-01 xinghua.cao@intel.com Use memoryBarrier to sync image load and store

Created with:
  gclient setdep -r third_party/externals/angle2@369f9e5df60b

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=benjaminwagner@google.com
Change-Id: I3ee00b7724a4c0582edb6778070ad8d8c738c037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231923
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-02 05:07:13 +00:00
skia-autoroll
d8714df9c6 Roll ../src 9aeb39b9ab0a..01452febf2d0 (403 commits)
9aeb39b9ab..01452febf2


Created with:
  gclient setdep -r ../src@01452febf2

The AutoRoll server is located here: https://autoroll.skia.org/r/chromium-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
TBR=benjaminwagner@google.com
Change-Id: I5f040f4f3c56edf0d131da1aadc4ed58f15ea3b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231924
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-02 05:04:05 +00:00
skia-autoroll
0e04cdf70f Roll third_party/externals/swiftshader 27e2873765fa..f63c4e51101a (3 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/27e2873765fa..f63c4e51101a

git log 27e2873765fa..f63c4e51101a --date=short --no-merges --format='%ad %ae %s'
2019-08-01 bclayton@google.com Reactor: Don't auto-initialize Pointer<T> variables with null.
2019-08-01 bclayton@google.com Reactor: Add nullptr_t copy / assignment operators to Pointer<T>
2019-08-01 bclayton@google.com SpirvShader: Add a single-entry, last-used sampler cache

Created with:
  gclient setdep -r third_party/externals/swiftshader@f63c4e51101a

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=benjaminwagner@google.com
Change-Id: I51e8bdbe9e5d35d9d1ee203058d766f93de4ee3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231922
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-02 04:33:01 +00:00
skia-autoroll
39dda0fe6a Roll third_party/externals/angle2 1ebe6014389e..1dbbc7b3e232 (5 commits)
Add FrameCapture.cpp to third_party/angle2/BUILD.gn
to mirror "Capture/Replay: Fix capture-enabled libs build."

1ebe601438..1dbbc7b3e2

git log 1ebe6014389e..1dbbc7b3e232 --date=short --no-merges --format='%ad %ae %s'
2019-07-31 ynovikov@chromium.org Skip couple TextureBorderClampIntegerTestES3 tests.
2019-07-31 jmadill@chromium.org Capture/Replay: Fix capture-enabled libs build.
2019-07-31 lujc@google.com Vulkan: Optimize memory allocation offset rounding
2019-07-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/glslang/src f04f1f93a70f..eea340047eca (1 commits)
2019-07-31 xinghua.cao@intel.com Correct barriers of glMemoryBarrier in test cases

Created with:
  gclient setdep -r third_party/externals/angle2@1dbbc7b3e232

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=benjaminwagner@google.com

Change-Id: I3fb7d3a2df08c89d2b63babe002756d05567b14c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231396
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-02 01:12:49 +00:00
recipe-roller
eb11c7e626 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/24146be8336f4431e79afd24dee5545a059e4267 depot_tools: Simplify CheckCallAndFilter[AndHeader] (ehmaldonado@chromium.org)
recipe_engine:
  https://crrev.com/218f005d8f06d6e223cecd87864545b51c544884 [internal/engine] Restore conditional print for negative error codes. (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I8a588a288592b9e90991036a79e121a8aaef3364
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231680
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-08-01 23:10:07 +00:00
Florin Malita
4800949bf4 Reland: SkColorfilters::HSLAMatrix
Introduce an SkColorFilter_Matrix flavor operating in HSLA space.

(CPU-only for now)

TBR=mtklein

Change-Id: I3a8686775593ccc9ce0e46159a17bec7f4ab4228
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231736
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-01 23:04:22 +00:00
Mike Klein
c588af9a69 bigger channel buffers in fm_bot
In really catastrophic cases like an fm binary hacked up to crash all
the time, we'll deadlock splitting failed batches up into individual
re-runs here

    // If a batch of sources ran and failed, split them up and try again.
    for _, source := range w.Sources {
        wg.Add(1)
        queue <- work{[]string{source}, w.Flags}
    }

Those <- writes will block once queue becomes full, which is really easy
to do here since we originally got close to filling the queue, and now
we're multiplying that by some K factor with all those failures.

There's probably a better way to do this than to make the queues have a
~1M element buffer, but it's kind of the easiest thing to do without
really restructuring how the code works.  If this proves fussy I'll
probably stop using channels and replace them with a mutex and a slice.

Change-Id: I95d61f9003c708ff5e149c6c030ef10adb14c6df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231679
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-01 23:01:07 +00:00
Brian Salomon
85769bf4a2 Renove GrPixelConfig from GrGLGpu::uploadTexData
Bug: skia:6718
Change-Id: Ia1b4773c55dc195a5ae129676d7b095b99ca4057
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231645
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-01 22:59:17 +00:00
Mike Klein
0e00816875 sketch SkVMBlitter
I'm having a hard time implementing SkRasterPipeline with SkVM,
so maybe it makes sense to try stepping over it instead?

Have not done much timing, except that it's noticeably slower
to generate GMs with this blitter turned on than turned off:
use of uniforms is forcing us into the interpreter.

I decided to start off with a perfect div255()... I'm curious to
see if we can live with perfect instead of an approximation.

Change-Id: I752f4a32ebe32ca550c9762aaad9ad86670b79d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231117
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-08-01 22:22:03 +00:00
Mike Reed
64acf4f7cf remove unneeded bitmapprovider abstraction
Change-Id: Idd413389bb0828a6fc73b7285b4ed7b6fe48af6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231638
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-08-01 21:24:02 +00:00
Mike Klein
40f9138361 Revert "let color filters tell us their alpha format"
This reverts commit 0355f05b26.

Reason for revert: roll?

Original change's description:
> let color filters tell us their alpha format
> 
> There are a bunch of native premul->premul color filters, and about an
> equal number of native unpremul->unpremul filters that all have roughly
> the same logic to interoperate with a premul color pipeline.  I haven't
> seen anything that wants premul in and unpremul out or vice versa.
> 
> (It's easy to find by grepping for ::unpremul.)
> 
> This CL flags the natively unpremul color filters and centralizes the
> logic to handle premul interop.  This mostly eliminates the need for
> SkColorFilter subclasses to know shaderIsOpaque, but not quite entirely.
> It's of course used in the centralized SkColorFilter::appendStages(),
> but is still also needed by any subclass that calls that, any subclass
> that composes other color filters. I've commented out any unused
> shaderIsOpaque arguments.
> 
> In the future we could imagine handling this outside in a more
> sophisticated way, like eliding unnecessary alpha format conversions.
> We'd need to move this logic out of SkColorFilter::appendStages() to
> it's callers... the blitter, composing subclasses, and any other misc.
> 
> Should be no diffs and no interesting perf change.
> 
> I couldn't help but correct some misuse of "protected" where I was
> editing anyway.  I'm feeling a mega CL coming...
> 
> Change-Id: If3528820ca639357864b8b99c8fe11ab60c1ae0d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231465
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Ide8b887fe7ff445f503864ee935908bcb56f637e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231677
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-01 21:11:36 +00:00
Mike Klein
44d095fe18 Revert "SkColorfilters::HSLAMatrix"
This reverts commit f4c5f63ab9.

Reason for revert: trying to revert my earlier CL.  Sorry!  I'll let you reland this one first and I'll rebase next time.

Original change's description:
> SkColorfilters::HSLAMatrix
> 
> Introduce an SkColorFilter_Matrix flavor operating in HSLA space.
> 
> (CPU-only for now)
> 
> Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I6a4e85d3810e2ca30d072937c035c929917d36c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231678
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-01 21:10:31 +00:00
Brian Salomon
f77c1460f8 Make read/write/transfer pixels functions take surface color type
Bug: skia:6718
Change-Id: I9cac1b9dc8c04969719c79b7b7ce10c18fb428d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231563
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-01 21:06:30 +00:00
Mike Klein
140a4767f0 make presubmit failures clearer
A presubmit failure will now print something like

~/skia (reed↑2|…) $ git cl presubmit
Running presubmit commit checks ...
Some files need rewritten #includes:
	src/core/SkBitmapCache.cpp
	src/core/SkBitmapController.cpp
	tests/SkResourceCacheTest.cpp
To do this automatically, run
python tools/rewrite_includes.py src/core/SkBitmapCache.cpp src/core/SkBitmapController.cpp tests/SkResourceCacheTest.cpp

** Presubmit ERRORS **
`python tools/rewrite_includes.py --dry-run gn/core.gni src/core/SkBitmapCache.cpp src/core/SkBitmapCache.h src/core/SkBitmapController.cpp src/core/SkBitmapController.h src/core/SkBitmapProcState.cpp src/core/SkBitmapProcState.h src/shaders/SkBitmapProcShader.cpp src/shaders/SkBitmapProcShader.h src/shaders/SkImageShader.cpp tests/SkResourceCacheTest.cpp tools/rewrite_includes.py` failed

Change-Id: I84018a6e102efa8b477a2523f6b0fc927a674e1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-01 20:49:11 +00:00
Robert Phillips
bac46728fc Add a means of printing out the GrBackendFormat
Change-Id: I78b145765bc6ad2f0568ff9bee97397844c23728
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231557
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-01 20:42:32 +00:00
Nathaniel Nifong
79342e492c Add a kind of asset for MSKPs so the skpbench bot can read them.
Bug: skia:9209
Change-Id: Ic16d33341b4fbfd3a77e5dce782b134cd855d0b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230133
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-08-01 20:29:52 +00:00
Robert Phillips
7854746ead Make GrGLCaps::getYUVAColorTypeFromBackendFormat also map R8 to GrColorType::kGray_8
This change allows Chrome to treat its single channel YUV planes uniformly (as kGray_8_SkColorType).

Change-Id: Icc80ae4e4cbb192318635b443741b216f2008609
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231417
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-01 19:24:20 +00:00
Brian Salomon
77a684f899 Use GrConvertPixels in GrOpFlushState::doUpload
Add special case to GrConvertPixels for non-converting copies.

Change-Id: I8b5a7513e28e966e4269f42dbed387d8800d25fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231559
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-01 19:15:55 +00:00
Stan Iliev
a56b04ad3d Allow to rebind GL texture if AHB content has changed
Add an output function argument updateProc to MakeBackendTexture.
updateProc needs to be invoked, when AHB buffer content has
changed.  OES_EGL_image_external spec requires to bind the
texture, when buffer content has changed.
glEGLImageTargetTexture2DOES is invoked too (spec is not clear,
but MTK devices require it).

Test: Built and ran android
Bug: b/138674291
Change-Id: If7cf3051bc513c037440ab3331e0a0fdfcba5c2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231482
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-01 19:04:50 +00:00
Florin Malita
f4c5f63ab9 SkColorfilters::HSLAMatrix
Introduce an SkColorFilter_Matrix flavor operating in HSLA space.

(CPU-only for now)

Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-01 19:02:55 +00:00
Mike Reed
d2f4be3dd0 make bicubic decision logic shareable
Follow-on CL will use this new priv method to fix the BitmapState logic.
That change will be complicated, as we will likely have to guard it
to stage layout changes with clients.

Bug: skia:9293
Change-Id: If3bc4356944ee673a3e56897a70c373b47ecaedd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-08-01 18:57:52 +00:00
Greg Daniel
0258c90803 Remove use of isConfigRenderable.
Bug: skia:6718
Change-Id: I7eb25601e55042252a4fdcddfa4bb906ce0307dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231108
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-01 18:57:51 +00:00
Mike Klein
0355f05b26 let color filters tell us their alpha format
There are a bunch of native premul->premul color filters, and about an
equal number of native unpremul->unpremul filters that all have roughly
the same logic to interoperate with a premul color pipeline.  I haven't
seen anything that wants premul in and unpremul out or vice versa.

(It's easy to find by grepping for ::unpremul.)

This CL flags the natively unpremul color filters and centralizes the
logic to handle premul interop.  This mostly eliminates the need for
SkColorFilter subclasses to know shaderIsOpaque, but not quite entirely.
It's of course used in the centralized SkColorFilter::appendStages(),
but is still also needed by any subclass that calls that, any subclass
that composes other color filters. I've commented out any unused
shaderIsOpaque arguments.

In the future we could imagine handling this outside in a more
sophisticated way, like eliding unnecessary alpha format conversions.
We'd need to move this logic out of SkColorFilter::appendStages() to
it's callers... the blitter, composing subclasses, and any other misc.

Should be no diffs and no interesting perf change.

I couldn't help but correct some misuse of "protected" where I was
editing anyway.  I'm feeling a mega CL coming...

Change-Id: If3528820ca639357864b8b99c8fe11ab60c1ae0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231465
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-08-01 17:28:00 +00:00
Michael Ludwig
c711a86493 Combine erode and dilate implementations
Combine the GPU and Raster morph type and direction enums, and have the
morphology base class accept the type as an argument instead of a virtual.
Adds somewhat complex deserialization code to be backwards compatible with
the old erode and dilate create procs.

Also updates SkXfermodeImageFilter's implementation to be named with the
"Impl" suffix instead of _Base, and updates both filters to have the common
code layout for image filter implementations.

Change-Id: I5082914f9754c2be71becfceb0c7d9a8fd06f569
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231099
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-01 17:24:10 +00:00
Florin Malita
80e7bd03d4 [skottie] Suppress placeholder range selector warnings
For text animators without associated range selectors, BodyMovin still
exports a selector entry with invalid (0) domain/shape props.

Suppress warnings for these, as they are expected with BM.

TBR=
Change-Id: I7ec3737ebc2a33f4ba6955975c50ea7bf116b003
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231481
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-01 17:18:31 +00:00
Robert Phillips
1c4e8bb85f Disable LUM16F support for all Adreno devices
TBR=egdaniel@google.com
Change-Id: I8b353eba04e7f682af88044434957b9a81653095
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231478
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-01 16:50:57 +00:00
Michael Ludwig
69e1462010 Remove SkDEBUGFAIL in SkDisplacementMapEffector ctor
Bug: chromium:988237
Change-Id: Idf7c77b009f9dc9daa56426c18a85f8441dc319c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231476
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-01 15:02:36 +00:00
Robert Phillips
ffe27290ff Add GrCaps::getTestingCombinations
This will decrease our reliance on GrPixelConfig for testing.

Bug: skia:6718
Change-Id: I951f57cce229792d994391dbba74dd206bbfb923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230893
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-01 14:46:36 +00:00