Commit Graph

10460 Commits

Author SHA1 Message Date
Mike Reed
dab30349d7 mark SkPathBuilder as SK_API
Bug: skia:9000
Change-Id: I9c557460bc9cfbfa6c0506219452ae149b43546c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306950
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-30 22:06:21 +00:00
Elliot Evans
6b2602ed2d Remove remaining usages of skvx::mad
This CL attempts to remove the remaining subset of skvx::mad usages.
https://skia-review.googlesource.com/c/skia/+/304853 removes all usages
of skvx::mad but causes small differences in rendering, so it is not
suitable for landing.

https://skia-review.googlesource.com/c/skia/+/306702/ removes all
non-nested usages of skvx::mad

Change-Id: Iab5d4cfd0feb856c38b3ebbfe3bf3ed5aad20fe6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306722
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Elliot Evans <elliotevans@google.com>
2020-07-30 20:41:09 +00:00
Adlai Holler
e34b282ed0 Migrate MakeFromAdoptedTexture to GrDirectContext
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>
2020-07-29 20:15:00 +00:00
Ben Wagner
0795361b45 SkUNREACHABLE should fail, not be UB.
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>
2020-07-29 17:24:29 +00:00
Adlai Holler
52ea577f93 Migrate MakeFromYUVATexturesCopy* to GrRecordingContext
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>
2020-07-29 15:00:36 +00:00
Mike Reed
8c7ecc1c06 Revert "Revert "Never share pixels when we make a subset image""
This reverts commit 39d1c1ebb6.

Fix: update gm to handle failures from (bad) gpu: PreAbandonGpuContext


Change-Id: I5a8584ec3493df6c9b9bb94fb84716fda0aadccb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306378
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-29 12:42:16 +00:00
Mike Reed
3a608e5bc9 remove (unused) DirectTo... methods
Change-Id: Ie5eea2902c64fc44e4e6e53b1ee3b869d430d482
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306331
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-28 23:47:07 +00:00
Mike Reed
39d1c1ebb6 Revert "Never share pixels when we make a subset image"
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>
2020-07-28 21:29:45 +00:00
Mike Reed
3eff2459d4 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>
2020-07-28 21:20:57 +00:00
John Stiles
ace773d8c0 Use SkScalar type where appropriate.
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>
2020-07-28 20:13:37 +00:00
Ben Wagner
1e67f7fced Mark sk_abort_no_print [[noreturn]].
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>
2020-07-28 17:40:31 +00:00
Mike Reed
564d49ec10 Remove subset parameter from making encoded/generator images
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>
2020-07-28 17:33:12 +00:00
Adlai Holler
c0ca856c05 Change makeTextureImage staging to allow either API
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>
2020-07-28 15:05:26 +00:00
Leon Scroggins III
a4c8098aea Remove gendered language
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>
2020-07-28 15:02:41 +00:00
John Stiles
9119625aae Remove unnecessary macros from SkString header.
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>
2020-07-28 15:00:21 +00:00
John Stiles
738c271b4a Update DataEntry struct to properly support move semantics.
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>
2020-07-27 23:27:31 +00:00
John Stiles
0307e9114c Remove unreferenced function SkStrDup.
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>
2020-07-27 21:31:37 +00:00
Herb Derby
53453f76b5 split transformed mask from SDFT
* 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>
2020-07-26 16:59:44 +00:00
Greg Daniel
69267913ef Remove resource from GrD3DBuffer.
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>
2020-07-24 20:30:00 +00:00
Brian Osman
b107a11f88 Add several more values to SkYUVColorSpace
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>
2020-07-24 18:49:10 +00:00
Kevin Lubick
7c8659256b Inclusive language
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>
2020-07-24 13:33:53 +00:00
Robert Phillips
b25e0650dd Convert more tests to GrDirectContext/GrRecordingContext pair
TBR=bsalomon@google.com
Change-Id: I5bb78f4e36c4037669e7907cbe818da743480ef4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305009
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-23 12:49:06 +00:00
Mike Reed
3d30ca6d21 Add CubicResampler to makeShader
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>
2020-07-22 21:50:11 +00:00
Greg Daniel
95afafb2b0 Reland "Add GrContext api to update compressed backend textures."
This reverts commit ceebe424b1.

Reason for revert: relanding with fix

Original change's description:
> Revert "Add GrContext api to update compressed backend textures."
> 
> This reverts commit 2c180304dc.
> 
> Reason for revert: attempted workaround did not fix techno spark so needs further investigation
> 
> Original change's description:
> > Add GrContext api to update compressed backend textures.
> > 
> > Bug: chromium:1099255
> > Change-Id: I0c3f25ddb037e47e3b910fa89c3d8b3aa27b3114
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302265
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: Ib5433def02dc5dad97dcdbd4476ced6de2361e6a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1099255
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302576
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: chromium:1099255
Change-Id: Ie238a56b7f12fea8b6e251a050e5e2f4b20d2ede
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304741
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-07-22 16:46:55 +00:00
Adlai Holler
40ad5fd50a Migrate SkImage::flush methods to GrDirectContext
Flag landed in Chrome CL 2310889.

Bug: skia:104662
Change-Id: I616c7e6cd16104132bb0764c6d786a5cbeb4dd47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304797
Commit-Queue: Adlai Holler <adlai@google.com>
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>
2020-07-22 15:02:35 +00:00
Adlai Holler
247835b6c8 Reland "Migrate SkImage::makeWithFilter to GrRecordingContext"
This reverts commit d13b97f94c.

Reason for revert: Fixed chromium canary

Original change's description:
> Revert "Migrate SkImage::makeWithFilter to GrRecordingContext"
>
> This reverts commit 7f0129d424.
>
> Reason for revert: Broke Chrome roll
>
> Original change's description:
> > Migrate SkImage::makeWithFilter to GrRecordingContext
> >
> > The staging flag landed in Chrome CL 2307531.
> >
> > Bug: skia:104662
> > Change-Id: I8a483bfb83e890bb0566cd252a464a6add89df4f
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304003
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: I280dbffa26da71d53872266e62fa3bcaa3c00989
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:104662
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304802
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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


Bug: skia:104662
Change-Id: I815677659f776966b1c7e362ce3df444834dd482
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304803
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-07-22 12:58:23 +00:00
Adlai Holler
01373555fe Remove GrContext variant of SkImage::isValid
Chrome was migrated in CL 2310974.

Bug: skia:104662
Change-Id: I0a49a7a6787fcce4c2a934c09140a3e4dad95869
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-07-22 12:49:23 +00:00
Brian Salomon
d007281c9a Fix clang 12 Wsuggest-override and Wsuggest-destructor-override
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>
2020-07-22 01:11:36 +00:00
Adlai Holler
d13b97f94c Revert "Migrate SkImage::makeWithFilter to GrRecordingContext"
This reverts commit 7f0129d424.

Reason for revert: Broke Chrome roll

Original change's description:
> Migrate SkImage::makeWithFilter to GrRecordingContext
> 
> The staging flag landed in Chrome CL 2307531.
> 
> Bug: skia:104662
> Change-Id: I8a483bfb83e890bb0566cd252a464a6add89df4f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304003
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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

Change-Id: I280dbffa26da71d53872266e62fa3bcaa3c00989
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:104662
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304802
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-07-21 20:02:10 +00:00
Mike Reed
22874781cf make more constructors constexpr
Intended to help https://skia-review.googlesource.com/c/skia/+/303271

Change-Id: I9a66e39ae7de84c30900f208b7368bdc1e2d8f0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-21 17:44:57 +00:00
Brian Salomon
8c82a87a6b Rename GrTexture/Proxy/Priv mip map members/functions
Change-Id: Ib55cab0ef76ced165d1936e7d084edc7fa579c55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304737
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-21 17:43:17 +00:00
Adlai Holler
7f0129d424 Migrate SkImage::makeWithFilter to GrRecordingContext
The staging flag landed in Chrome CL 2307531.

Bug: skia:104662
Change-Id: I8a483bfb83e890bb0566cd252a464a6add89df4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304003
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-07-21 17:37:27 +00:00
Herb Derby
1d17e49041 constify GrAtlasTextOp::Geometry
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>
2020-07-21 16:56:27 +00:00
Brian Salomon
69100f05bb Rename GrCaps fields and methods from MipMap to Mipmap
Change-Id: I44d151dc80aca8fc6426735ee17224cb5b8aa576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304603
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-21 15:56:21 +00:00
Greg Daniel
373d7dd0ed Add new GrContext::updateBackendTexture call that takes an SkColorType.
Change-Id: Iba71698f52eba3e7a99e0712a51ce48953b995db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304601
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-21 15:47:27 +00:00
Brian Salomon
40a40623c8 Rename GrBackendTexture::fMipMapped -> fMipmapped
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>
2020-07-21 15:29:06 +00:00
Brian Salomon
a6db510563 Rename GrMipMapsStatus GrMipmapStatus
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>
2020-07-21 15:12:30 +00:00
Brian Salomon
7e67dcaea6 Rename GrMipMapped GrMipmapped
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>
2020-07-21 14:06:35 +00:00
Mike Klein
5333784c8c remove stray weakref include
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>
2020-07-20 21:05:54 +00:00
Mike Reed
6d0ab954e9 read/write m44
Inspired by https://skia-review.googlesource.com/c/skia/+/303271

Change-Id: I64816f8db1742d263c8f668a7b44a08f20d82f5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304065
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-20 20:45:04 +00:00
Brian Osman
48a643daac SkRuntimeEffect: Always include GrTypesPriv, clean up variable type code
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>
2020-07-20 16:33:03 +00:00
Adlai Holler
9f1760bf73 Remove two unused deprecated SkImage functions
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>
2020-07-17 17:02:10 +00:00
Herb Derby
c24a6afdb0 create SkAtlasSubRun API subclass SkMaskSubRun
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>
2020-07-17 15:55:20 +00:00
skia-autoroll
3164b4494f Roll skcms from c21106442079 to f73242142ce5 (1 revision)
https://skia.googlesource.com/skcms.git/+log/c21106442079..f73242142ce5

2020-07-16 mtklein@papyrus.localdomain add skcms_TransferFunction_isFooish()

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC nifong@google.com,mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Change-Id: I77846e3f984c295e25f7a72c38cdb0002de24a8f
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Tbr: nifong@google.com,mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303442
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-16 21:50:37 +00:00
Mike Reed
fd6f709ce8 Revert "Revert "Serialize mipmaps""
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>
2020-07-16 21:30:27 +00:00
Adlai Holler
4caa935bfe Migrate MakeTextureImage to take GrDirectContext
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>
2020-07-16 16:17:28 +00:00
Robert Phillips
07531a0f97 Switch the DDLRecorder over to holding a GrRecordingContext ...
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>
2020-07-15 23:17:03 +00:00
Ben Wagner
c0693db3f5 Remove SkFontArguments::Axis.
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>
2020-07-15 20:59:22 +00:00
Mike Klein
4d680cdf07 a bunch of half-related stuff
- 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>
2020-07-15 20:47:31 +00:00
Elliot Evans
72b8aea019 Fix experimental_simd CanvasKit build.
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>
2020-07-15 20:39:42 +00:00