More recontexting for SkImage. Chrome flag in CL 2323135.
Flutter migration landed in https://github.com/flutter/engine/pull/19962
Bug: skia:104662
Change-Id: Id725eb130310639457ba90f378ecdb334dd5f3cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306182
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The use of __builtin_unreachable() and __assume(false) are actually
injections of undefined behavior. They do not crash and they may allow
the compiler to assume that any values which could cause that location
to be reached cannot occur. They should only be used after code which
cannot return but the compiler cannot know that (such as inline assembly
which does not return and calls to functions which should have been
declared noreturn but were not).
Replace their use with __builtin_trap() and __failfast(). These are
similar to __builtin_debugtrap() or __debugbreak() but also indicate
that execution should not be resumed.
Change-Id: I46c1362f4e86944cc8e03f6f5837875ac71b69f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297024
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
These methods aren't used by our clients – plus we're only de-powering the
arg here so we should do fine on canaries.
Bug: skia:104662
Change-Id: I2ff5a4e06a5e82458148d555b6dc8643e7e5f60f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306336
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 3eff2459d4.
Reason for revert: did I break abandongpu bot?
Original change's description:
> Never share pixels when we make a subset image
>
> - mostly just affects Lazy images (raster was already always copying)
> - issue with other factories that offer subsetting
> - (e.g. MakeFromGenerator)
> - can we remove those options, and require makeSubset() afterwards?
> - greatly simplifies dealing with mipmaps
>
> Landing this would obsolete
> https://skia-review.googlesource.com/c/skia/+/305960
>
> Related: https://skia-review.googlesource.com/c/skia/+/306136
>
> Related: https://bugs.chromium.org/p/skia/issues/detail?id=10544
>
> Change-Id: I074420543bd2fcd46ed1620bbf0eed00371ab018
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305970
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
TBR=mtklein@google.com,bsalomon@google.com,robertphillips@google.com,scroggo@google.com,brianosman@google.com,reed@google.com
Change-Id: Iab2f92855fe61e48f0e432b7257eb7ddef78fcfa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306377
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Iec4c3dedd0790fc637a914517b2abbb8e303520f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306320
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
It isn't expected that sk_abort_no_print should return (it should
abort). This also allows removal of the SkUNREACHABLE from SK_ABORT.
Also make sk_abort_no_print actually not able to return.
Change-Id: Ibd5eda019820ed7e91de37a048efdfb0d1097aff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306188
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Since subsetting may require rasterizing/resolving the generator, we may
also need access to the GrDirectContext. To simplify apis, rely on
makeSubset() for that.
Related: https://skia-review.googlesource.com/c/skia/+/305970
Change-Id: I1980e3c823fb6cf54f197c350942c2f82b03e20f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306136
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This fixes a Chrome canary failure in skia CL 305970 where
Chrome has the flag set, and so we can't internally call the
GrDirectContext variant.
This matches the more recent migrations we've done. Hopefully
soon Chrome's GrDirectContext CL will get its final approvals and
all of this can go away.
Bug: skia:104662
Change-Id: I09cdff54e01c22578a970e5967815a2e470752bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306185
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: chromium:1101491
Bug: b/161896447
Found using
git grep -wiEIl \ '(he)|(she)|(his)|(hers)|(him)|(her)|(guy)|(guys)'
Change-Id: I6b91853de067fd4c2e84f7ec70275522ce6c8bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306186
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
They have been replaced with equivalent constants (and given the
requisite k prefix).
Change-Id: I70907eec234e0861cc97aac1ca03086faca42f9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306160
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Previously, DataEntry supported only move-construction but not move-
assignment.
Change-Id: I1dc1b2bc90a3dfe4cd74d4a6c2986b7d777f84d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306156
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This isn't used, and doesn't seem like we will have a use for it going
forward. The SkString class should be used to allocate strings.
Change-Id: I024d1d7edb5d4946fa9ecfd4e10af84afc8b5df8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306065
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
* transformed masks -> GrTransformedMaskSubRun
* GrMaskSubRun is SDFT -> GrSDFTSubRun
There is much duplicate code, which will be cleaned up shortly.
Change-Id: If54e388e89f7db15ddfd4b4354f0a1b4d6f5e36b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305686
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
We will rely on the tracking of GrBuffers on the command list to manage
lifetime of d3d buffers. This also means we won't destroy the underlying
d3d buffer resource until the destructor.
Change-Id: I26084b8fffc65038891a0e48662d6a864c5dd8c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305719
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Includes full-range Rec709 and BT2020, as well as more precise
matrices for 10 and 12 bit BT2020.
Bug: chromium:1108626
Change-Id: I28cbce982a00c082c8b510dbb7b144bdc1ce02e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305596
Reviewed-by: Dale Curtis <dalecurtis@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: 842296
Change-Id: I4564f96d4f179211df19893270ccc222abcdd446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305439
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Only works on raster backend for the now.
Bug: skia:10344
Change-Id: I2c82d5345ae83a2bb2744ab27e3d971c57ea989e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303271
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: Ic44e24057b95bb014504f02a736fb4341afc8971
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304856
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
fSubRunPtr is currently mutable, but that will change in future CLs.
Change-Id: Ia3ab40855d7ea7c42eadf8889688fefb064f1bc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304696
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Also mipMapped params to GrBackendTexture functions to mipmapped
GrBackendTexture::hasMipMaps -> GrBackendTexture::hasMipmaps
Misc test vars fMipMapped -> fMipmapped
Change-Id: Ic0651d14fc106c21b0ab45529875b95ed8dc2dfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304598
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
For consistency with other enums and public APIs.
Change-Id: I026da5529f11051693cae5691c7ad92fad5ed446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304597
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Ia2cfbca8982b57399b6681cbb4501c2933ab4df7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304576
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I016de62543b5ba16a7193262cea343a77a71ba3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304201
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
GrTypesPriv seems safe to include even without the GPU backend, which
lets us remove the condition from the struct layout. Hoisting and
reformatting the type conversion code just to make the core of the
factory easier to read. (More of this is coming).
Change-Id: I6e36b92789debc7b2630117c285c592ca7cbc37b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304001
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This is part of a larger effort to clean up the SkImage API and require
users to provide the direct GPU context for manipulating GPU images.
Bug: skia:104662
Change-Id: Ic7fd675a6ec09f001266fd79efdf084368ab6cd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303630
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The SkMaskSubRun is just a temporary name while I pull out the
different subclasses.
Change-Id: I363742a98a0596ba3d282b918cc0492ab1e0e5d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303357
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Fix: use ImageGenerator factory instead of SkCodec, in case the client
provides generators in some other fashion (other than SkCodec).
This reverts commit 442d424a72.
Change-Id: Ia22f44ef83900413f905fe38570d18a640fca98e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303496
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This is part of a larger effort to force SkImage users to specify
the direct context they want to use when manipulating GPU images.
Chrome CL 2299194 (landed) enables the staging flag.
bug: skia:10466
Change-Id: I959db57dd8dca5c2622eb5ffaa7de161c4d6d8f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302643
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
and related changes. This is another CL in the series that is replacing
GrContext with the GrDirectContext/GrRecordingContext pair.
Change-Id: Id0a3cfd5a5f92f7680d9c58f3a1753322311221c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Replaced with SkFontArguments::VariationPosition and
SkFontArguments::VariationPosition::Coordinate since the arguments are
about a variation specification and it's coordinates.
SkFontParameters::Axis actually deals with axes and their properties.
Change-Id: I377c9c5efa8e7b7e2649fc038f765062e30391e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302905
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
- add f32<->f16 functions to skvx
- add f32<->f16 x86 instructions to skvm::Assembler
- add f32<->f16 ops to skvm,
using the skvx functions in the interpreter
Still TODO:
use the new x86 instructions in the JIT
(For now like in many other ways, the aarch64 JIT
continues to languish. Will pick that back up one day.)
Change-Id: Ib8dc1ccdc75ecb23769ea4947d66d3ab22520f23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302942
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Although it appeared that the experimental_simd CanvasKit build was
working, the build was not producing actual wasm SIMD operations. This
CL fixes that issue by changing the build arguments.
This issue also fixes an incorrect type issue with the SkVx wasm SIMD
implementation.
Bug: skia:10453
Change-Id: If26f84b09e4d84df36be589245878c821972dffc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302669
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>