Commit Graph

22548 Commits

Author SHA1 Message Date
Mike Klein
dadac55c7f simplify matrix color filter clamps
We must keep alpha sanely [0,1].

This makes the existing clamps unconditional, which seems the most
compatible with our clients' expectations, and which makes the CPU
backend agree with the GPU backend.

I'm not sure I've got a more principled reason to clamp than those.

Clamping means we can't really concatenate these into a new matrix
filter ever, deleting a bunch of code supporting that and a few
unit tests that thought we could.

(Good candidate for a user-defined effect with user-defined clamping.)

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: Ib92a4c882320e65ae705833bf623e4e961bc6651
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200394
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-03-12 20:29:11 +00:00
Mike Reed
c723b70d91 Initial add SkMixers
Just using with composeshader for now, plan to try that sort of generalization
for colorfilters and imagefilters in follow-on cls.

Bug: skia:
Change-Id: Ic9650b8ea6f6278e6bfd657e90befbf9e71f383c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198823
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-12 20:27:12 +00:00
Mike Klein
232783f0c5 add private non-copying SkReadBuffer::readString()
... and use it when looking up deserialized type factories.

Change-Id: I23d6dd549d4258908a961971a8de380776c91e1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/171220
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
2019-03-12 20:22:56 +00:00
Khushal
b6b8ad3b2f remote fonts: Remove debug asserts for deserialization failures.
The fuzzers are tripping on these asserts.

Bug: 940370
Change-Id: I08adfa5b9b3e083f3671bd9a5e952f26860e185f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199960
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-03-12 20:17:51 +00:00
Ethan Nicholas
4100b7cad2 added SK_API to SkSK::Compiler
Bug: skia:
Change-Id: If7c2941ec1c266ecee08894c5284e9434de1ef91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200463
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-03-12 20:16:51 +00:00
Mike Klein
aa42ac6afc remove unused clamp_a_dst
Change-Id: Ic94bb9082d9f140069bb9a2c528816887752fbaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200548
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-12 20:09:11 +00:00
Robert Phillips
570f4e51fd Always explicitly allocate except in Android Framework (take 3)
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.

We want:
  Flutter and Chrome to always explicitly allocate but not sort opLists outside of DDLs
  Android to never explicitly allocate and, thus, automatically never sort opLists

This needs the following Chrome suppression CL to land first:
https://chromium-review.googlesource.com/c/chromium/src/+/15182 (Add flag to skia/config/SkUserConfig.h to unblock Skia roll)

TBR=bsalomon@google.com
Change-Id: I3f51005ebc975ec754c2e0d2c646c0c324b02158
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200507
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-12 19:37:21 +00:00
Mike Klein
61770d8a99 simplify filterColor()
This implementation also pins.

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: Icd6764ffc967dcebb8a46e8a7727c8e7f3f23ec0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200397
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-12 17:55:51 +00:00
Robert Phillips
2a2d732c39 Revert "Always explicitly allocate except in Android Framework (take 2)"
This reverts commit 88b93da63d.

Reason for revert: Chrome

Original change's description:
> Always explicitly allocate except in Android Framework (take 2)
> 
> This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
> 
> We want:
>   Flutter and Chrome to always explicitly allocate but not sort opLists outside of DDLs
>   Android to never explicitly allocate and, thus, automatically never sort opLists
> 
> This cannot land until after the following Chrome CL lands:
> 
> https://chromium-review.googlesource.com/c/chromium/src/+/1516096 (Disable opList sorting within Skia)
> 
> 
> Change-Id: Ic7d6a1a77a08f2fe42324773f62cccf8175ab3d7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199931
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Ida481ee9833d6db366b3d315fb4e9850d7c005ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200506
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-12 16:29:43 +00:00
Robert Phillips
60dd62ba20 Revert "Always try to reduce opList splitting in DDL contexts/drawingManagers"
This reverts commit 2cce805f1f.

Reason for revert: Chrome

Original change's description:
> Always try to reduce opList splitting in DDL contexts/drawingManagers
> 
> This may get us in trouble w/ local DDL testing (since we run all our GMs through DDLs). For Chrome this shouldn't yet be a problem (since they are only using DDLs for compositing).
> 
> This does mean we're on a tight timeline to land predictive intermediate flushes before Chrome starts using DDLs for rasterization.
> 
> Change-Id: I0bb95c075cff3ee49498ff267d76c3a61d16373e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199722
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Idb2dbda1a41844b2541526d504b117fd4cd628cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200505
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-12 16:29:14 +00:00
Robert Phillips
2cce805f1f Always try to reduce opList splitting in DDL contexts/drawingManagers
This may get us in trouble w/ local DDL testing (since we run all our GMs through DDLs). For Chrome this shouldn't yet be a problem (since they are only using DDLs for compositing).

This does mean we're on a tight timeline to land predictive intermediate flushes before Chrome starts using DDLs for rasterization.

Change-Id: I0bb95c075cff3ee49498ff267d76c3a61d16373e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199722
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-12 15:37:20 +00:00
Greg Kaiser
2f3b0dd0d3 GrQuadPerEdgeAA: Fix typo in 'if' check
We were checking d1And2[2] twice, and not checking d1And2[3] at
all.  We fix this to check each of them once.

Change-Id: Ib44dfcb2643ce2758917763f048d93e8f39fd8d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200389
Auto-Submit: Greg Kaiser <gkaiser@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-03-12 14:18:28 +00:00
Brian Salomon
d0e1ceffcc Revert "Reintroduce deinstantiate lazy proxy types and use for promise images."
This reverts commit 8b40ac35b2.

Reason for revert: breaks viz_unittests

Original change's description:
> Reintroduce deinstantiate lazy proxy types and use for promise images.
> 
> This reverts a fraction of b2c5dae65d to
> restore the deinstantiate lazy proxy type, supporting implementation,
> and tests.
> 
> Use them for promise images to avoid thread safety issues for promise
> image resources. Makes promise image instantiation callbacks do a thread
> safe unref of their fulfilled GrTexture in GrResourceCache. The
> GrResourceCache mechanism for receiving unref messages is extended to
> allow multiple pending unrefs. All this is new.
> 
> 
> Bug: skia:8800
> Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Iba960efba4290a284294c62d0470ad7e932c174a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-12 13:37:21 +00:00
Robert Phillips
88b93da63d Always explicitly allocate except in Android Framework (take 2)
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.

We want:
  Flutter and Chrome to always explicitly allocate but not sort opLists outside of DDLs
  Android to never explicitly allocate and, thus, automatically never sort opLists

This cannot land until after the following Chrome CL lands:

https://chromium-review.googlesource.com/c/chromium/src/+/1516096 (Disable opList sorting within Skia)


Change-Id: Ic7d6a1a77a08f2fe42324773f62cccf8175ab3d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199931
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-12 13:25:28 +00:00
Brian Osman
e938c92fe7 Remove SkToSRGBColorFilter (now unused)
This was another stop-gap color management "solution".

Bug: skia:
Change-Id: I7c0c362840dd35aad51ad8780f2dab591c42a7e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199720
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-12 13:19:28 +00:00
Brian Salomon
8b40ac35b2 Reintroduce deinstantiate lazy proxy types and use for promise images.
This reverts a fraction of b2c5dae65d to
restore the deinstantiate lazy proxy type, supporting implementation,
and tests.

Use them for promise images to avoid thread safety issues for promise
image resources. Makes promise image instantiation callbacks do a thread
safe unref of their fulfilled GrTexture in GrResourceCache. The
GrResourceCache mechanism for receiving unref messages is extended to
allow multiple pending unrefs. All this is new.


Bug: skia:8800
Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-11 20:48:22 +00:00
Brian Osman
d0626aa0c4 Add clamped half-float pixel config to Ganesh
Currently doesn't do any clamping, but connects the new config to the
recently added SkColorType. Behavioral changes coming in future CLs.

Bug: skia:
Change-Id: I907396030c435d0aa5931063b3dc6f1b60c661af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199980
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-03-11 20:09:07 +00:00
Michael Ludwig
e6266a2d16 Handle arbitrary and degenerate quadrilaterals in GrQuadPerEdgeAA
Updates the handling of perspective quads to calculate the correct,
degenerate-safe projected quad and then derive from that the proper
perspective quad.

In 2D, updated to determine if the optimized outset/inset procedure
is valid, and if not goes through a more robust procedure that is
based on line equation intersections. In particular, the degenerate
inset/outset approach is used when the quad has a zero-length edge,
if insetting/outsetting normally would create a self-intersecting shape,
or if near parallel edge angles would create numerical instabilities.

Performance testing by forcing all rectangle draws through the degenerate
code path suggests that it is about 10% slower than the optimal approach,
at least on my workstation...

Bug: skia:
Change-Id: I2973da8d97949eacebb09a1b27c334d62c1c948e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/194008
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-03-11 20:04:03 +00:00
Herb Derby
4eff3f934d One routine to rule them all!
Change-Id: I6c448f325fca21c4919c0a0854d9d5cb9d54beb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198661
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-11 19:36:41 +00:00
Mike Reed
ca9b2082d1 rename mixer to lerp (in prep for SkMixer)
Bug: skia:
Change-Id: I55d879dd76e10c8ef9a01f2dd7cff725e8a82433
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199932
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-03-11 19:32:31 +00:00
Robert Phillips
d40dc3f81b Revert "Always explicitly allocate except in Android Framework"
This reverts commit e157745dfc.

Reason for revert: Too exciting

Original change's description:
> Always explicitly allocate except in Android Framework
> 
> This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
> 
> 
> Change-Id: Idc02985e52f074894a251c7335ef00b009c72ccd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199725
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Icb097844de6db92e8151c81616a758837ecd9dfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199929
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-11 18:41:22 +00:00
Herb Derby
ac962c9c42 Convert templates to virtuals in SkGlyphRunPainter
This removes a bunch of duplicate code, and visual cluter.
And, sets up for the next CL which unifies the SDF/Path
decisions.

* unify some parameter naming

Change-Id: Ic654dc20b22f5414834730a0c34f47608d73491a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199281
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-11 18:14:53 +00:00
Robert Phillips
e157745dfc Always explicitly allocate except in Android Framework
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.


Change-Id: Idc02985e52f074894a251c7335ef00b009c72ccd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199725
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-11 17:22:31 +00:00
Jim Van Verth
444b3094ad Improve Metal texture uploads.
Switches to using buffers rather than managed textures. The result
is much faster as it does the swizzling work on the GPU rather than
the CPU.

Bug: skia:
Change-Id: I3e708e2f15830c47b2d0ceb48eed5ab841864af6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199258
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-03-11 16:23:31 +00:00
Greg Daniel
387ec9ae82 Make vulkan GrBackendFormats with ycbcr external texture types.
Bug: skia:
Change-Id: I58b5cc2a3e03404f05de9644eb4e459a7a9a9ebb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199001
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-03-11 14:01:20 +00:00
Robert Phillips
0a22ba84e0 Add kIdentity_SkYUVColorSpace
This utility color space just maps Y to R, U to G and V to B when flattening or accessing the YUV planes. Clients can then add a colorFilter to directly manipulate the YUV values.

This cannot land in Skia until the following CL lands in Chrome:

https://chromium-review.googlesource.com/c/chromium/src/+/1506004 (Update usage of Skia's SkYUVColorSpace enum to allow the addition of a new value)

Change-Id: Id9403ebbd009b45281d4d53fca52f68692d6c69f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198160
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-11 13:47:40 +00:00
Nigel Tao
e66a0b212a Check that we do not #define WUFFS_IMPLEMENTATION
Bug: skia:8235
Change-Id: Ie36301acf1779c8c33f69d9dfc986562d96992c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199441
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2019-03-11 13:01:10 +00:00
Nigel Tao
48aa221e60 Update Wuffs version
Also re-write some C "designated initializer" expressions in
SkWuffsCodec.cpp. They may be valid C (C99), but are not necessarily
valid C++. Even though GCC and Clang extends C++ to accept them,
Microsoft Visual C++ does not.

This pulls in the Wuffs bug fix:
c4b8a6a4cc
"Don't use designated initializers".

Bug: skia:8235
Bug: skia:8764
Change-Id: I57be56ce0b7f5bc1eb38ecc113a9b7ad7d2e373b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199440
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2019-03-11 12:51:00 +00:00
Robert Phillips
56181ba452 Make DDL contexts/drawing managers always sort opLists
We want:
  DDLs to always be sorted
  Live rendering to still be sorted w/in Skia
  Live rendering to still not be sorted in Chrome and Android

Additionally, we want reduced-opList-splitting to only be enabled on some of Skia's bots.

Change-Id: I15e7d69c7e109749665a86a0169ad918c993dc77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199244
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-08 18:40:17 +00:00
Mike Reed
5e398c2b5e change load/store_rgba to have src and dst variants
somewhat motivated by future mixer stages

Bug: skia:
Change-Id: Icd41ec9311f0da966164451324d28e7b3dfb3213
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199280
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-03-08 17:24:33 +00:00
Ethan Nicholas
03896ae9ce Fixed a couple of Vulkan bugs
There was a bad test in GrVkImage, and the test in SkSLVariable was
allowing interface variables to be declared dead, which was probably
not a serious problem but was causing the debug layers to whine.

Bug: skia:8837
Change-Id: I233372ae45b575949b7c8f92b119b86e649f3142
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199060
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-03-08 14:18:03 +00:00
Brian Osman
dbfcd92d5f Fix two SkPathRef bugs
- Transforming a path in place wasn't updating the gen ID of the path
- Transforming a path into another (uniquely held) path wasn't calling
  gen ID change listeners.

Bug: skia:
Change-Id: I9e244725d9bd5776d203ce6b12698cee09d0b714
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199003
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-03-07 22:59:28 +00:00
Chris Dalton
d7291ba7a1 Restore support for multisample locations
Bug: skia:
Change-Id: I971455867e54d431cc1094fca041f773f78748ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196218
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-07 22:00:48 +00:00
Jim Van Verth
61610bebdf Add Autorelease pools to clear out no longer needed Metal objects.
Bug: skia:8822
Change-Id: I2bb3528100a54a169ec9c5b26ef7d4d1cacc19db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198244
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-03-07 21:05:08 +00:00
Ethan Nicholas
5476f2e9b8 added constant swizzle support for Metal
Bug: skia:
Change-Id: Ia7d81920ddc341aa40da6af534d846f3e805a109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192031
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-03-07 20:47:04 +00:00
Ethan Nicholas
858feccb58 Got RelaxedPrecision decorations working again in SPIR-V, and removed
no-longer-needed old-style precision handling code.

Bug: skia:8829
Change-Id: I72fc2ee2a305c9c72a3efa92dd44d18239eabaf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198169
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-03-07 19:56:59 +00:00
Brian Osman
1132f74e11 Add F16Norm support to a few more pixmap helpers
Bug: skia:
Change-Id: I86fd67a792ddfc456e8dd553d9012ed9bc9101f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198822
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-07 19:33:19 +00:00
Brian Osman
dfddf340c1 Fix bit-depth selection for picture shader playback with F16Norm
Bug: skia:
Change-Id: Ic85817901ffd30faf6ba40f1b14a507ed1dd2e8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198821
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-07 18:59:09 +00:00
Mike Klein
47750765d2 treat F16Norm like F16 as far as SW tranfer functions go
Change-Id: I5dd9ad47fc43d4ba859c6b8f1253e1788258c48e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198761
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-07 18:28:59 +00:00
Mike Klein
22504dea79 add pause to SkSpinlock::contendedAcquire on Intel
Popping off work to run in the thread pool is my bottleneck running DM
on a P920.  The long-term fix there is probably to restructure the
thread pool to work-steal, but adding this little pause to the contended
spin does make a noticeable improvement on its own.  It's what
_mm_pause() is designed for, after all.

Change-Id: I09ab3a940547e5c4b4b2fa1f3f945f08aed47b99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198620
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-03-07 17:06:29 +00:00
Mike Reed
2539429036 undo old colorspace hacks related to savelayers
... there appears also to be a bug in the 'global' imagefiltercache,
where it doesn't respect the outputProps colorspace..?

Bug: skia:8793, skia:8830
Change-Id: Ib8a113fa21eae5f581b44b051a790be9133aa411
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198247
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-07 16:26:49 +00:00
Brian Salomon
88b8d1124b Revert "Distinguish between "flushed" and "finished" idle state callbacks on GrTexture."
This reverts commit 9ac0407006.

Reason for revert: Breaking DDL Win10 skpbench bot

Original change's description:
> Distinguish between "flushed" and "finished" idle state callbacks on GrTexture.
> 
> This is necessary to convert the promise image API to call Release when all
> work is flushed and Done when all work is complete (future work).
> 
> Change-Id: I9745952bb0978ca2aaa79aeed460730b2fea856e
> Bug: skia:8800
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197163
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:8800
Change-Id: I5e6c4ea072beb4fb67a53d2ea2b007a7d201799d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198603
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-07 15:47:59 +00:00
Brian Salomon
d716d4402a Revert "Change promise image contract to for when Release and Done are called."
This reverts commit c5e8e150c8.

Reason for revert: Reverting to revert 9ac0407006 https://skia-review.googlesource.com/c/skia/+/197163


Original change's description:
> Change promise image contract to for when Release and Done are called.
> 
> Now Release is called when all work related to the SkImage is flushed
> and Done is called when it is finished on the GPU in Vulkan. In GL they
> are still both called back-to-back after flushing.
> 
> Bug: skia:8800
> Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I13e8211d89ed1b7694c2d7734eeaaf4ba9ad410a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-07 15:23:41 +00:00
Herb Derby
a677af71b2 Removed unused fallback code
Change-Id: I2dc9cde4bd7b7b54e7de677455b38fb3c9b86edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198242
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-07 15:21:09 +00:00
Mike Klein
be27245416 fix f16norm mips
Change-Id: Ibfcf5e3aba33800e6f63de633cbde197a3b17057
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198222
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-07 15:03:59 +00:00
Brian Salomon
c5e8e150c8 Change promise image contract to for when Release and Done are called.
Now Release is called when all work related to the SkImage is flushed
and Done is called when it is finished on the GPU in Vulkan. In GL they
are still both called back-to-back after flushing.

Bug: skia:8800
Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-03-07 13:43:59 +00:00
Mike Reed
b8b05e6be0 remove dead SK_SUPPORT_LEGACY_CHOOSERASTERPIPELINE code
Bug: skia:8793
Change-Id: I6f7f794f3734b709383ad73402cf1042cc2d68f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198251
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-03-07 12:26:29 +00:00
Herb Derby
692122e3ef Don't apply the view matrix twice for complicated fallback
In complicated fallback the matrix was being applied to create
the glyph cache and then rendering to the screen. Create the
glyphs with the identity matrix.

Change-Id: Ib399726ef73257f2890784c1f4ad598fef074ab3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198248
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-03-07 02:39:08 +00:00
Florin Malita
34336e3633 Make SkCubicMap immutable
Drop setter, only keep the parameterized constructor.

Change-Id: I31517df23688b8bd7485bf70c9c055cd1c87edcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198245
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-03-06 22:55:08 +00:00
Florin Malita
93092ff457 Make SkCubicMap public
Bug: skia:8803
Change-Id: I3aa0814d538d95dc3a5a1034993b823d2151ab85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/193961
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-03-06 19:58:28 +00:00