Commit Graph

3506 Commits

Author SHA1 Message Date
Ben Wagner
2c312c4f58 Remove SkDrawFilter.
Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af
Reviewed-on: https://skia-review.googlesource.com/137895
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-12 02:36:44 +00:00
Hal Canary
d4998178ae Whitespace Fixup
Change-Id: I6c4c4b43dfa6b59832c63f8fcf43192b4973d88b
Reviewed-on: https://skia-review.googlesource.com/140565
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-11 19:27:58 +00:00
Brian Osman
532b3f944a Remove clamping of kPlus with F16 configs
The most common use-case for F16 is to draw things that are explicitly
outside of [0,1]. We can't prevent out-of-range values in general, users
could just draw out-of-range content in src mode. We've decided that
it's best to avoid surprising behavior, and trust the user in these
situations.

This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183

Bug: skia:
Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4
Reviewed-on: https://skia-review.googlesource.com/140500
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-11 14:30:58 +00:00
Brian Osman
c87cfb674b Remove old lazy image decoding heuristic logic
This led to removing a lot of transfer function behavior code. There is
more that could be done, and we need to add in decoding to dst color
space, but this CL is almost entirely mechanical.

Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6
Reviewed-on: https://skia-review.googlesource.com/140349
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-11 14:07:08 +00:00
Brian Osman
c69c4410be Remove matrixconvolution GM hacks for linear blending
GMs now match betwen gl and glsrgb

Change-Id: Ibc6acf29d93d8bfab81a14be5d794d6e24844324
Reviewed-on: https://skia-review.googlesource.com/140346
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>
2018-07-10 20:14:05 +00:00
Weiliang Chen
3e95e578c2 Use TextureProxy size directly in GrYUVToRGBEffect FragmentProcessor
Instead of take extra input to indicate size for texture proxies of
different planes, directly use texture proxy's size.

Bug: skia:7903
Change-Id: I5d6c859510f7390948c6dcfbdd17343faa786aca
Reviewed-on: https://skia-review.googlesource.com/130964
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
2018-07-03 21:30:27 +00:00
Jim Van Verth
8664a1d7d7 Add ear-clipping code to triangulate simple polygons.
Use this to fill concave shadows.

Bug: skia:7971
Change-Id: I63dc1ed845f9fa3fcd86f1ad13b03da23cae0313
Reviewed-on: https://skia-review.googlesource.com/135200
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-29 13:29:57 +00:00
Brian Osman
a66f4dad51 Revert "Reland "Revert "Update GPU DM/nanobench configs for color testing"""
This reverts commit d5161b9a62.

Reason for revert: This should be okay again.

Original change's description:
> Reland "Revert "Update GPU DM/nanobench configs for color testing""
> 
> This reverts commit c0fb3c8b9f.
> 
> Reason for revert: Had to revert dependent CL.
> Original change's description:
> > Revert "Revert "Update GPU DM/nanobench configs for color testing""
> > 
> > This reverts commit 2a284de7a5.
> > 
> > Re-landing without esrgb configs. Going to enable those separately,
> > as they require some blacklisting.
> > 
> > Bug: skia:
> > Change-Id: I2315849d4f5c45c2e5512f84f9f867d02ff6fe30
> > Reviewed-on: https://skia-review.googlesource.com/136589
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> 
> TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
> 
> Change-Id: I942d4235c17100fd933bf9cbfe923e3ae80657b1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/137721
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com

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

Bug: skia:
Change-Id: I280dac49eb74d6c1cbf7c2f52a3f6a68fa2510ae
Reviewed-on: https://skia-review.googlesource.com/138301
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-28 18:20:17 +00:00
Khushal
c421ca1d6e gpu: Expose GrContextPriv::abandoned in the public API.
TBR=bsalomon@google.com

Bug: 854416
Change-Id: Iab71ca6e4724a925b0b9791267aac5ddc34f5b15
Reviewed-on: https://skia-review.googlesource.com/137692
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-06-27 01:08:45 +00:00
Brian Osman
d5161b9a62 Reland "Revert "Update GPU DM/nanobench configs for color testing""
This reverts commit c0fb3c8b9f.

Reason for revert: Had to revert dependent CL.
Original change's description:
> Revert "Revert "Update GPU DM/nanobench configs for color testing""
> 
> This reverts commit 2a284de7a5.
> 
> Re-landing without esrgb configs. Going to enable those separately,
> as they require some blacklisting.
> 
> Bug: skia:
> Change-Id: I2315849d4f5c45c2e5512f84f9f867d02ff6fe30
> Reviewed-on: https://skia-review.googlesource.com/136589
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: I942d4235c17100fd933bf9cbfe923e3ae80657b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/137721
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-26 19:20:53 +00:00
Mike Klein
3785471ff6 basic first pass at RGBA F32 support
Draws basically the same as f16.

The existing load_f32, load_f32_dst, and store_f32 stages all had the
same bug that we'd never noticed because dy was always 0 until now.

Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3
Reviewed-on: https://skia-review.googlesource.com/137585
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-06-26 19:02:52 +00:00
Brian Osman
c0fb3c8b9f Revert "Revert "Update GPU DM/nanobench configs for color testing""
This reverts commit 2a284de7a5.

Re-landing without esrgb configs. Going to enable those separately,
as they require some blacklisting.

Bug: skia:
Change-Id: I2315849d4f5c45c2e5512f84f9f867d02ff6fe30
Reviewed-on: https://skia-review.googlesource.com/136589
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-26 17:51:22 +00:00
Brian Salomon
493489054f Refactor GrPipeline dynamic state.
Remove scissor rect from GrPipeline.

Draws can specify "fixed dynamic state" which doesn't use the dynamism at
all or can specify dynamic state arrays with an entry per GrMesh.

When we state other than scissor rects this will allow the caller to
use a mix of truly dynamic and fixed dynamic state. So a caller that
only has dynamic scissor rects doesn't need to store its remaining
unvarying state in an array.

Change-Id: I8fcc07eb600c72a26cc712b185755c2116021a8a
Reviewed-on: https://skia-review.googlesource.com/137223
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-06-26 15:35:12 +00:00
Robert Phillips
6d36370c06 Add bullet proofing for preAbandonContext
With the more agressive abandonment of the GrContext state in https://skia-review.googlesource.com/c/skia/+/137121 (Fix abandonment of programs) (i.e., nulling out of the interface) it is necessary to add more guards so that we don't try calling GL methods when the context has been abandoned.

Change-Id: Ib2a3c17b9eaebd1eb84eb82a2781cf9d5a6a34a3
Reviewed-on: https://skia-review.googlesource.com/137362
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-25 13:52:55 +00:00
Ben Wagner
17bca9a4ea Make fontmgr_bounds change with veryVerbose
When using the --veryVerbose command line flag, make the fontmgr_bounds
gm label each box with the name of the typeface and the glyph ids used
for each extrema.

Change-Id: Icf029366e51688cb4be1a3369f6d24bcba8386aa
Reviewed-on: https://skia-review.googlesource.com/137190
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-22 20:18:27 +00:00
Brian Osman
2a284de7a5 Revert "Update GPU DM/nanobench configs for color testing"
This reverts commit 5e11777a06.

Reason for revert: Bots with no F16 support failing (as expected).

Original change's description:
> Update GPU DM/nanobench configs for color testing
> 
> - Rename '*srgbnl' to '*srgb'.
> - Add '*narrow' and '*enarrow' for testing a gamut narrower than sRGB.
> - Stopped blacklisting glessrgb. It no longer uses sRGB pixel configs,
>   so should work fine on all GPUs.
> - Also runs 'esrgb' (F16 sRGB) everywhere. This is likely to fail on
>   some devices that have poor (or no) F16 support.
> 
> Change-Id: I941d0758adb3b0c895c7a8a85ff0ae4aa5bff6e7
> Reviewed-on: https://skia-review.googlesource.com/136171
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: I091269b93bc9e76c9d42f701d2018610b9c33a89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/136300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-20 20:59:18 +00:00
Brian Osman
5e11777a06 Update GPU DM/nanobench configs for color testing
- Rename '*srgbnl' to '*srgb'.
- Add '*narrow' and '*enarrow' for testing a gamut narrower than sRGB.
- Stopped blacklisting glessrgb. It no longer uses sRGB pixel configs,
  so should work fine on all GPUs.
- Also runs 'esrgb' (F16 sRGB) everywhere. This is likely to fail on
  some devices that have poor (or no) F16 support.

Change-Id: I941d0758adb3b0c895c7a8a85ff0ae4aa5bff6e7
Reviewed-on: https://skia-review.googlesource.com/136171
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-20 20:36:57 +00:00
Brian Salomon
92be2f74db Revert "Revert "Change how vertex/instance attributes are handled in geometry processors.""
This reverts commit 5045e501d2.

TBR=csmartdalton@google.com

Change-Id: Ifbf5f1d8f8ef340fdc69653e931b6d68d4bf0854
Reviewed-on: https://skia-review.googlesource.com/135862
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-06-19 20:01:29 +00:00
Robert Phillips
c994a93b32 Move op memory storage to GrContext (take 2)
TBR=bsalomon@google.com

Change-Id: I4a448694d4114d83cd3a720cfc8bd37de51733d1
Reviewed-on: https://skia-review.googlesource.com/135707
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-19 19:51:20 +00:00
Ben Wagner
f08d1d0ce1 Stop using SkTSwap.
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.

Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-19 02:06:31 +00:00
Mike Klein
5045e501d2 Revert "Change how vertex/instance attributes are handled in geometry processors."
This reverts commit 19c1233c44.

Reason for revert: want to make sure Google3 can roll

Original change's description:
> Change how vertex/instance attributes are handled in geometry processors.
> 
> * No longer register vertex/instance attributes on base class, just counts
> 
> * Separate instance and vertex attributes and remove InputRate and offset
> 
> * Make attributes constexpr where possible
> 
> Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6
> Reviewed-on: https://skia-review.googlesource.com/132405
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I4800632515e14fbf54af52826928ac915657b59f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135661
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-19 01:41:10 +00:00
Brian Osman
63b3bfb711 Reland "Remove old references to SampleApp"
This reverts commit 3ff2b20057.

Reason for revert: Infra fires are out.

Original change's description:
> Revert "Remove old references to SampleApp"
> 
> This reverts commit 1c477fc263.
> 
> Reason for revert: Botpocalypse.
> Original change's description:
> > Remove old references to SampleApp
> > 
> > Docs-Preview: https://skia.org/?cl=135570
> > Change-Id: I330ffa964c2d90ca8d3cd844aabcd8616ccd0540
> > Reviewed-on: https://skia-review.googlesource.com/135570
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> 
> TBR=halcanary@google.com,brianosman@google.com,caryclark@google.com
> 
> Change-Id: I514e2c7bca8a1ebd311593573a94e8a078695785
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/135600
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=halcanary@google.com,brianosman@google.com,caryclark@google.com

Change-Id: I660482ef32acecf5b1bf24d2dec919bc68fde97e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135660
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-18 21:09:09 +00:00
Brian Osman
3ff2b20057 Revert "Remove old references to SampleApp"
This reverts commit 1c477fc263.

Reason for revert: Botpocalypse.
Original change's description:
> Remove old references to SampleApp
> 
> Docs-Preview: https://skia.org/?cl=135570
> Change-Id: I330ffa964c2d90ca8d3cd844aabcd8616ccd0540
> Reviewed-on: https://skia-review.googlesource.com/135570
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=halcanary@google.com,brianosman@google.com,caryclark@google.com

Change-Id: I514e2c7bca8a1ebd311593573a94e8a078695785
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135600
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-18 19:32:09 +00:00
Brian Osman
1c477fc263 Remove old references to SampleApp
Docs-Preview: https://skia.org/?cl=135570
Change-Id: I330ffa964c2d90ca8d3cd844aabcd8616ccd0540
Reviewed-on: https://skia-review.googlesource.com/135570
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-18 19:15:48 +00:00
Brian Salomon
19c1233c44 Change how vertex/instance attributes are handled in geometry processors.
* No longer register vertex/instance attributes on base class, just counts

* Separate instance and vertex attributes and remove InputRate and offset

* Make attributes constexpr where possible

Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6
Reviewed-on: https://skia-review.googlesource.com/132405
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-06-18 17:13:58 +00:00
Chris Dalton
4c458b12f6 ccpr: Use lazy proxies with GrCCAtlas
Bug: skia:
Change-Id: I576d9303d451352778de0425e3ecbc561331cd09
Reviewed-on: https://skia-review.googlesource.com/135362
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-06-18 15:32:48 +00:00
Jim Van Verth
d2b5084d97 Change scaling of antialiased perspective text in dftext to help glitches.
Bug: skia:
Change-Id: I499c04949ddd957404cda6b34ab0073b539f6dd3
Reviewed-on: https://skia-review.googlesource.com/133582
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-06-15 16:04:45 +00:00
Robert Phillips
4f6ba2e522 Revert "Move op memory storage to GrContext"
This reverts commit c8cee446bf.

Reason for revert: TSAN issues

Original change's description:
> Move op memory storage to GrContext
> 
> TBR=bsalomon@google.com
> Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
> Reviewed-on: https://skia-review.googlesource.com/131500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia0d2b7408314d9b67d57388315376bbea23d3780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135181
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-15 15:59:45 +00:00
Robert Phillips
c8cee446bf Move op memory storage to GrContext
TBR=bsalomon@google.com
Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
Reviewed-on: https://skia-review.googlesource.com/131500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-15 11:33:14 +00:00
Hal Canary
c640d0dc96 Revert "Revert "SkTypes: extract SkTo""
This reverts commit fdcfb8b7c2.

> Original change's description:
> > SkTypes: extract SkTo
> >
> > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> > Reviewed-on: https://skia-review.googlesource.com/133620
> > Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa
Reviewed-on: https://skia-review.googlesource.com/134506
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 14:55:17 +00:00
Jim Van Verth
bdde428d53 Add variable offset support
Bug: skia:7970
Change-Id: I9dadf75f21e19ebe26f82643bcc47dd5794d8970
Reviewed-on: https://skia-review.googlesource.com/134421
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-14 13:54:57 +00:00
Florin Malita
527a297d6e Handle missing json resource gracefully in 3dgm
If the json resource is not found (it is not currently packaged with the
APK), Viewer crashes.

TBR=
Change-Id: I0a0bdf7f97fdac8afc84d539c88d2a391e54855c
Reviewed-on: https://skia-review.googlesource.com/134515
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-06-13 19:43:16 +00:00
Hal Canary
fdcfb8b7c2 Revert "SkTypes: extract SkTo"
This reverts commit 2a2f675926.

Reason for revert: this appears to be what is holding up the Chrome roll.

Original change's description:
> SkTypes: extract SkTo
>
> Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> Reviewed-on: https://skia-review.googlesource.com/133620
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,halcanary@google.com

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae
Reviewed-on: https://skia-review.googlesource.com/134504
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-13 13:45:47 +00:00
Hal Canary
22be4c4801 SkMacros split from SkTypes.h
Change-Id: I383719ee181c6925ebf62ffc70e1c0f12ee7cf84
Reviewed-on: https://skia-review.googlesource.com/134326
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-12 18:39:33 +00:00
Hal Canary
2a2f675926 SkTypes: extract SkTo
Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
Reviewed-on: https://skia-review.googlesource.com/133620
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-12 15:03:21 +00:00
Robert Phillips
7c525e62d4 Plumb GrContext everywhere
There is no good way to split the monster CL up. This breaks out
the GrContext plumbing but doesn't use it.

Change-Id: I90856d428d372bcec3f8821e6364667b367927d4
Reviewed-on: https://skia-review.googlesource.com/133382
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-06-12 14:43:03 +00:00
Cary Clark
27dddae313 rebase
This reverts commit 32a4910e57.

Reason for revert: SkMatrix::toString use has been removed from flutter
and has been picked up in fuchsia

Additionally some bookmaker changes take into account recent
additions of typedef comments and the generated header comment.

Original change's description:
> Revert "remove toString"
>
> This reverts commit 5191880cbf.
>
> Reason for revert: broke flutter
>
> Original change's description:
> > remove toString
> >
> > toString may have been used by obsolete debugger only
> > find out if that is so
> >
> > R=​brianosman@google.com,bsalomon@google.com
> >
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
>
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c

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

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

Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Docs-Preview: https://skia.org/?cl=133583
Bug: 830651
Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b
Reviewed-on: https://skia-review.googlesource.com/133583
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-08 20:36:53 +00:00
Bruce Wang
f0aacafe9e Add SkTypeface::makeClone.
This adds an method to typeface to allow users to create a copy of the
typeface with different arguments for its parameters. This is far more
efficient when animating a variation font.

Change-Id: Ie41a5b76bef8eaf05b56b65774eaf38aad0dc4cf
Reviewed-on: https://skia-review.googlesource.com/132934
Commit-Queue: Bruce Wang <brucewang@google.com>
Reviewed-by: Bruce Wang <brucewang@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-08 19:13:13 +00:00
Jim Van Verth
4ba1a6f0bf Revert "Change persp dftext to only antialiased"
This reverts commit 8345aa6302.

Reason for revert: Causing inexplicable test failures.

Original change's description:
> Change persp dftext to only antialiased
> 
> Originally I had aliased text in here because I thought it would trigger
> the bug, but it doesn't and it's a bad idea for perspective text.
> Changed it to a reasonably large size just to get another test case.
> 
> Bug: skia:8042
> Change-Id: Ia81161063c76431e04503349ad6b33afb7523605
> Reviewed-on: https://skia-review.googlesource.com/132833
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: Ieec8fad7733a6ea435b2b211d5718c65cc263cbb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8042
Reviewed-on: https://skia-review.googlesource.com/133040
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-06-07 19:54:22 +00:00
Jim Van Verth
8345aa6302 Change persp dftext to only antialiased
Originally I had aliased text in here because I thought it would trigger
the bug, but it doesn't and it's a bad idea for perspective text.
Changed it to a reasonably large size just to get another test case.

Bug: skia:8042
Change-Id: Ia81161063c76431e04503349ad6b33afb7523605
Reviewed-on: https://skia-review.googlesource.com/132833
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-06-07 16:41:11 +00:00
Jim Van Verth
2525a37c08 Add test of tiny text with perspective.
There is an issue with rendering tiny text with SDFs,
and it's unclear which platforms this occurs on. Adding
this to the GM will make it clearer.

Bug: skia:8042
Change-Id: I0596c8e17a3b3cc7d6b51bef33097cfaba3bc64e
Reviewed-on: https://skia-review.googlesource.com/132823
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-06-07 14:05:28 +00:00
Stephen White
77169c8fd6 GrTessellator: fix for overlapping outer boundary edges in AA case.
When inflating outer path boundaries for edge AA, two outer boundary
edges may be collinear. In this case, they form part of the overlap
region, but they must not be removed on collapse, since they form
part of the outer boundary of the shape.

Bug: 846655
Change-Id: I4808b570cc4f82d6202862f7a8ecf0f8add771ef
Reviewed-on: https://skia-review.googlesource.com/132084
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2018-06-05 13:58:59 +00:00
Jim Van Verth
70276915db Set bounds correctly for color emoji that need post-cache transfoms
We need to handle the bounds for transformed color emoji the same
way we handle the bounds for distance field text. Without this
bounds correction, the glyphs were being clipped out.

Also adds a sample to test this case.

Bug: 848616
Change-Id: I39dedbe2fd19331ad67978c95519f5c9d46f59fc
Reviewed-on: https://skia-review.googlesource.com/131523
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
2018-06-01 18:31:47 +00:00
Brian Osman
2b23c4bf31 Dest color space no longer impacts mipmaps or texture sampling
PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap
mode on GrTexture, sRGB decode state per-texture. Because we
were often choosing sRGB configs for RGB color types, legacy
rendering would then be incorrect (too dark). So...

PS7: Stops ever using sRGB pixel configs when translating
image info or color type. Also removes a bunch of GrCaps bits
and a GrContextOption that are no longer relevant.

PS9: Adjusts surface creation unit test expectations, and
changes the raster rules accordingly.

At this point, sRGB configs are (obviously) going to be broken.

Locally, I ran 8888, gl, and the gbr- versions of both. Across
all GMs x configs, there are 13 diffs. 12 are GMs that create
surfaces with a color-space attached (and thus, the offscreen
is no longer getting sRGB pixel config). The only remainder
constructs an SkPictureImageGenerator, (with an attached color
space) and renders it to the gbr-gl canvas, which triggers a
a tagged surface inside the generator.

Bug: skia:
Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789
Reviewed-on: https://skia-review.googlesource.com/131282
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-01 17:00:26 +00:00
Stephen White
531a48ed78 GrTessellator: fix winding merged to zero on split edge.
Occasionally, the top edge of a split edge can be merged out of
existence (if it can't be mathematically distinguished from one of its
adjacent edges). In this case, we need to save its winding count
before it's merged so that the other half of the split doesn't also
get zero winding.

NOTE: this adds a new test case to the concavepaths GM.

Bug: skia:7785
Change-Id: Iff8b0a2ed3065e57b737ff915ff436146987caf6
Reviewed-on: https://skia-review.googlesource.com/131223
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2018-06-01 14:40:55 +00:00
Mike Reed
2f0edd5c9a draw skottie in 3d
Bug: skia:
Change-Id: I6321da0d9f06b4d5637d2ce611e1c81cc75c0eb2
Reviewed-on: https://skia-review.googlesource.com/131113
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-05-31 19:09:24 +00:00
Brian Osman
c7ad40f76f Remove SK_SUPPORT_GPU checks in tool-only code
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).

This is almost entirely mechanical.

Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-31 18:59:44 +00:00
Cary Clark
89ad31e97c Revert "Reland "remove toString""
This reverts commit 92e37b6d79.

Reason for revert: toString still used by flutter

Original change's description:
> Reland "remove toString"
> 
> This reverts commit 32a4910e57.
> 
> Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia
> 
> Original change's description:
> > Revert "remove toString"
> > 
> > This reverts commit 5191880cbf.
> > 
> > Reason for revert: broke flutter
> > 
> > Original change's description:
> > > remove toString
> > > 
> > > toString may have been used by obsolete debugger only
> > > find out if that is so
> > > 
> > > R=​brianosman@google.com,bsalomon@google.com
> > > 
> > > Docs-Preview: https://skia.org/?cl=119894
> > > Bug:830651
> > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > > Reviewed-on: https://skia-review.googlesource.com/119894
> > > Commit-Queue: Cary Clark <caryclark@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> > 
> > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 830651
> > Reviewed-on: https://skia-review.googlesource.com/129340
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Cary Clark <caryclark@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 830651
> Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34
> Reviewed-on: https://skia-review.googlesource.com/129623
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 830651
Reviewed-on: https://skia-review.googlesource.com/131082
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-31 12:27:44 +00:00
Cary Clark
92e37b6d79 Reland "remove toString"
This reverts commit 32a4910e57.

Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia

Original change's description:
> Revert "remove toString"
> 
> This reverts commit 5191880cbf.
> 
> Reason for revert: broke flutter
> 
> Original change's description:
> > remove toString
> > 
> > toString may have been used by obsolete debugger only
> > find out if that is so
> > 
> > R=​brianosman@google.com,bsalomon@google.com
> > 
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> 
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 830651
> Reviewed-on: https://skia-review.googlesource.com/129340
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

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

Bug: 830651
Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34
Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-31 11:43:13 +00:00
Ravi Mistry
35b40ce7af Revert "Check for ANGLE's implementation of texture_rectangle"
This reverts commit 00f8866a32.

Reason for revert: Seems to be breaking angle test bots. Eg:
https://chromium-swarm.appspot.com/task?id=3dcb7f58728de610&refresh=10

Original change's description:
> Check for ANGLE's implementation of texture_rectangle
> 
> ANGLE has implemented extension to support for texture_rectangle. Check
> for its existence as well as GL_ARB_texture_rectangle extension.
> 
> Intended to follow up on Chrome side to avoid copy into texture 2d for
> PaintCanvasVideoRenderer.
> 
> Bug: skia:7903
> Change-Id: I450aa7fcd08628831251a9e142fd50719723282d
> Reviewed-on: https://skia-review.googlesource.com/130962
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Weiliang Chen <weiliangc@chromium.org>

TBR=bsalomon@google.com,weiliangc@chromium.org

Change-Id: I9fbf9ff314ffcf3abcc5275bd68124f4b329da21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7903
Reviewed-on: https://skia-review.googlesource.com/131060
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2018-05-30 20:54:49 +00:00