Commit Graph

1641 Commits

Author SHA1 Message Date
Ben Wagner
21bca28bda Move SkMessageBus.h into src/core
Not used by anything else in the include directory, probably don't want
to accidentially expose it either.

Change-Id: I50d255e2cac43d8405305a825fd194bb36edd8fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213826
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-15 15:33:48 +00:00
Ben Wagner
8bd6e8f198 Move SkTSearch.h into src.
No public headers are using it anymore, so move it from include/private
into src/core where SkTSearch.cpp resides.

Change-Id: I4499c629487ff1b8c391b44708616d67567a3e9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213674
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-15 14:15:07 +00:00
Ben Wagner
5162a74b0a Remove GpuLayerCacheTest
The gpu code doesn't have a layer cache anymore to test.

Change-Id: Iec931112e5e12c90f2cad0c6012dfd1d0f14ad25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213665
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-14 19:28:44 +00:00
Mike Klein
046ecb1b5e remove SkMiniPicture and co.
This was an optimization for Chromium that I believe is no longer
relevant in a world of PaintOpBuffers.

Change-Id: Ic7526715a0ef1c3cec387a44189b7d56d5107af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-14 19:19:44 +00:00
Mike Klein
a705cb93c7 remove SkLiteDL
It's been dead code since it was inlined into Android last summer.

Change-Id: I252f6392d9436ef357f22a54bab8a33c9d1b3ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213625
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-14 18:55:44 +00:00
Herb Derby
8fae51b699 Introduce SkStrikeSpecStorage.
SkStrikeSpecStorage is the centralized class for creating different sets of
SkScalerContextRecs/Effects for different text rendering methods.

It is initailly called SkStrikeSpecStorage, but as a last stage will be
renamed to SkStrikeSpec as it encompasses the current functionality of
the existing SkStrikeSpec.

I'm breaking up a much larger prototype for this CL and several
following CLs. The prototype is at:

https://skia-review.googlesource.com/c/skia/+/209109

Change-Id: I617eaae6fcb4b0b29914c3f1a82c52c81d81aabe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212733
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-13 21:01:47 +00:00
Chris Dalton
a6fcb761d8 ccpr: Clip path octo bounds by the scissor
Finds the (octagonal) intersection of the path's bounding octagon and
the scissor, and draws that octagon instead. This allows us to avoid
ever using the scissor when drawing paths to the main canvas. It will
also let us use that same octagon without scissor when resolving the
stencil buffer to coverage in MSAA mode.

Bug: skia:
Change-Id: Ia7fe60343424bc77532fa9919d3fa108337a5d63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212840
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-13 15:32:43 +00:00
Brian Salomon
ab32f65653 Add SkSurface::asyncReadPixels()
Initial version. Current limitations: No Metal support, no color space
conversions, for each src color type only one dst color type is legal (
which may or may not be the src color type), no alpha type conversions.

Bug: skia:8962

Change-Id: I6f046a32342b8f5ffb1799d67d7ba15c250ef9bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212981
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-10 19:13:07 +00:00
Herb Derby
a1b7be612c Add thread safety annotations.
Start out with spinlock. I tried to be more extensive, but some
of our abstractions confused the analysis. Will expand further
in following CLs.

Change-Id: I3e320c957d8ef427065a2b7e7d2187b7c6b0aef1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213060
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-10 13:40:38 +00:00
Chris Dalton
8610e9c9de ccpr: Add a GrOctoBounds class
Encapsulates all the various code dealing with 45-degree bounding
boxes into a central GrOctoBounds class.

Bug: skia:
Change-Id: Ibc8ac4371af8f310e711579c3c77e0b3a53aff0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212563
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-09 18:00:11 +00:00
Brian Salomon
2561aa1e3d Revert "Large circle clipping gm."
This reverts commit 360dc593c0.

Reason for revert: Doesn't reproduce issue.

Original change's description:
> Large circle clipping gm.
> 
> Seeing if this reproduces a reported problem on PowerVR devices.
> 
> Bug: b/123437630
> 
> Change-Id: I161cd04034cb7d217ff519a4b26e521bf36ed4b5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212727
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ida6225513c24ba68d4744e7871cce38555dddb61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/123437630
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212964
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-05-09 15:18:00 +00:00
Brian Salomon
360dc593c0 Large circle clipping gm.
Seeing if this reproduces a reported problem on PowerVR devices.

Bug: b/123437630

Change-Id: I161cd04034cb7d217ff519a4b26e521bf36ed4b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212727
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-05-09 13:52:07 +00:00
Michael Ludwig
7d2ad0fdef Fix local matrix for crop rects in backdrop image filters
Bug: chromium:955467
Change-Id: I1c4cae2499db926aa6b629e8d730fcc8cb45be6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212030
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-05-06 15:11:40 +00:00
Hal Canary
ac55784e33 Tests: re-sort gni, file name convention
Change-Id: I47c4b91805770bd68101e1503a8630243ef16c21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212022
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-05-04 02:17:09 +00:00
Herb Derby
09db9d2175 Reland "SkShaper JSON output with cluster visualization"
This is a reland of 53610832a0

Fixes conversion of size_t to int.

Original change's description:
> SkShaper JSON output with cluster visualization
>
> A simple JSON output for diagnostic purposes.
> If the run is not 1:1 code points to glyphs, then
> break the run into clusters.
>
> Change-Id: I06980e0bac2cdca8a69b5b5ba0759a021fd4eb3b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209740
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Julia Lavrova <jlavrova@google.com>

Change-Id: I712293c4820eb23234d64fa019d28bac8b105637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211986
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-03 15:48:46 +00:00
Hal Canary
fd24b1fe84 Shaper : new unit test
Bug: skia:9050
Change-Id: I4edc6528c4d625f95ce42b1f96fb0c419ce45134
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211831
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-05-03 15:02:35 +00:00
Hal Canary
dc19391eef SkShaper: new benchmarks
For the record on my machine:

       2897.46 μs   shaper_tifnagh
       2912.11 μs   shaper_hebrew
       2943.12 μs   shaper_english
       2955.57 μs   shaper_greek
       2966.55 μs   shaper_cyrillic
       3057.37 μs   shaper_lao
       3067.87 μs   shaper_nko
       3364.01 μs   shaper_han_traditional
       7876.46 μs   shaper_han_simplified
       9060.30 μs   shaper_ethiopic
      13202.39 μs   shaper_balinese
      24200.44 μs   shaper_buginese
      27776.86 μs   shaper_kana
      29691.41 μs   shaper_sundanese
      30949.22 μs   shaper_newtailue
      34719.73 μs   shaper_tibetan
      35545.17 μs   shaper_thai
      36623.54 μs   shaper_taitham
      42048.83 μs   shaper_mandaic
      48342.53 μs   shaper_khmer
      65015.62 μs   shaper_javanese
      82198.24 μs   shaper_tamil
      99166.26 μs   shaper_bengali
      99824.46 μs   shaper_hangul
     101777.10 μs   shaper_sinhala
     105471.68 μs   shaper_cherokee
     131298.10 μs   shaper_myanmar
     134949.71 μs   shaper_thaana
     143183.11 μs   shaper_devanagari
     177995.12 μs   shaper_syriac
     186761.23 μs   shaper_vai
     236699.95 μs   shaper_emoji

Change-Id: I312c8333be2408090797cddfe25ef2ccc6eaf82b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211823
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-05-03 14:22:35 +00:00
Mike Reed
670c6ec66e Revert "SkShaper JSON output with cluster visualization"
This reverts commit 53610832a0.

Reason for revert: trying to fix flutter roll

Original change's description:
> SkShaper JSON output with cluster visualization
> 
> A simple JSON output for diagnostic purposes.
> If the run is not 1:1 code points to glyphs, then
> break the run into clusters.
> 
> Change-Id: I06980e0bac2cdca8a69b5b5ba0759a021fd4eb3b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209740
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Julia Lavrova <jlavrova@google.com>

TBR=herb@google.com,jlavrova@google.com

Change-Id: I19f8e40032378a856453d059fb5dcdb2f117b75c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211940
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-05-03 11:30:37 +00:00
Hal Canary
7c70143055 GMs: re-sort gni, script to regenerate gni, file name convention
Change-Id: I4b61c2a66f8d6b2d8c4a5ffd8c373b643415c70c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211598
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-05-02 20:08:37 +00:00
Herb Derby
53610832a0 SkShaper JSON output with cluster visualization
A simple JSON output for diagnostic purposes.
If the run is not 1:1 code points to glyphs, then
break the run into clusters.

Change-Id: I06980e0bac2cdca8a69b5b5ba0759a021fd4eb3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209740
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-05-02 19:22:13 +00:00
Hal Canary
b82ac3660c SkPDF: fix repeat tilemode with alpha
Also fix the corners of clamp mode with alpha.

Also, add a GM.

Bug:chromium:957275

Change-Id: Icd288ff522e7ea70662380791f5ee2de628a5ef2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211594
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-05-02 15:58:06 +00:00
Brian Osman
35ea04d613 Remove skcms shim header
Change-Id: I094fd08c25593a7957c3e91b330ec914a7cf86da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211585
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-01 20:25:14 +00:00
Robert Phillips
6db27c28c6 Reduce opList splitting by default in Skia
Local Skia and DDL recording will always attempt to reduce opList splitting.
Android, Flutter, Google3 and non-DDL Chrome will not.

Note that this is a bit aggressive. Intermediate flushes based on memory usage have not yet been implemented.

The plan is to run this locally in Skia until the next Chrome branch and then enable it everywhere else (when intermediate flushes have been implemented).

OpList splitting reduction in Chrome is disabled in the following Chrome-side CL:

https://chromium-review.googlesource.com/c/chromium/src/+/1588756/ (Disable opList splitting reduction in Skia)

It is disabled in Android in:

https://googleplex-android-review.git.corp.google.com/c/platform/external/skia/+/7259923 (Update #defines to suppress Ganesh features in SkUserConfigManual.h)

It is disabled in Flutter and Google3 w/in this CL.

Change-Id: I59ff448d2c42629fab6cffccb2894d030c73431d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211101
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-01 15:24:08 +00:00
Brian Osman
ac9be9dbc5 Remove shader text trace events and simplify the SKSL/GLSL printing code
- Moves the pretty-printer and line-by-line printer into a new GrShaderUtils.
- Maintain strings as SkSL::String longer, to avoid possibly re-converting
  from char* when we need to print them.
- GL shader compilation doesn't need the SkSL settings, so stop plumbing that.
- Converting SkSL to GLSL was taking the GL enum to specify the kind of shader,
  but only used it to convert to a SkSL::Program::Kind. Just take that. To make
  this simpler, move the GLSL printing code into that function, clumped with
  the SkSL printing code. Reuse that banner printer in GrGLPrintShader, too.

Change-Id: I4536547604612a6fa1596e5a8e97f6322e12a1fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211583
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-01 15:12:18 +00:00
Michael Ludwig
784184ab93 Prevent outset Ws from going negative
Bug: skia:9028
Change-Id: I8e3d37050d3fce7602eee62ae911eae756e603a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211100
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-04-30 19:50:36 +00:00
Ben Wagner
d1701ba884 IWYU for gms starting with 'a'.
There is still a bit of manual mucking about with iwyu output to get
things nice, but the checker seems to be doing ok and the process is now
a bit easier. Will see how it goes.

This also pointed out the amount of code behind ifdefs should be
minimized by using the build system and 'constexpr if' when possible.

Change-Id: Ic63fa33c65e5ff40b58858e15fc51f27d862e20d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211349
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-04-30 19:39:37 +00:00
Mike Klein
f5f4e81e33 Revert "SKIA_IMPLEMENTATION is only relevant in shared builds"
This reverts commit 8413ff13fe.

Reason for revert: turns out that's not true.  It's how we pick the right Vulkan headers.

Original change's description:
> SKIA_IMPLEMENTATION is only relevant in shared builds
> 
> Change-Id: If4ce780a74d59e5ec5c9d950a560527d4de7e030
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210130
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

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

Change-Id: I35fc5458930254597279875125bb392af4b8e74c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211092
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-04-29 16:20:05 +00:00
Jim Van Verth
75c5326bae Cache some more Metal state.
Caches MTLSamplerStates and MTLDepthStencilStates.

Bug: skia:8243
Change-Id: Id362507caedb3453b53d17f77dfbcee42ec52578
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209811
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-04-29 14:17:06 +00:00
Robert Phillips
d425dee662 Enable opList sorting everywhere
This should have very little impact until we enable opList-splitting-reduction.

Change-Id: Iacc3d1b34c390b65b5ee185bcbdd118d5023aaa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210630
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-04-29 14:00:46 +00:00
Mike Klein
8413ff13fe SKIA_IMPLEMENTATION is only relevant in shared builds
Change-Id: If4ce780a74d59e5ec5c9d950a560527d4de7e030
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210130
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-04-25 17:03:09 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
ba201aea74 make -Werror or /WX optional, off by default
Most external users complain about -Werror,
and I've heard anecdotally that devs find it annoying too.

This turns it off by default, but keeps it on the bots.

Change-Id: I6e87c92215261ebf6e961f816177386d5d58f28e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209787
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-23 20:39:34 +00:00
Mike Reed
361a640cc9 change colormatrixfilter to be 0...1 for translate
... once I've updated callers of SkColorMatrix, that can be changed to
0...1 as well.

Replacement for https://skia-review.googlesource.com/c/skia/+/209408

Bug: skia: 4872
Change-Id: Ieb0173e7af4c34f6a2c0b90787afb5387c216d68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209806
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-04-23 16:51:56 +00:00
Jim Van Verth
75c3ae4c2e Add GrMtlCommandBuffer
Used to encapsulate encoder creation. Bundles blitencoder
commands into a single encoder.

Bug: skia:8243
Change-Id: I53a4303678bb4f4e6667a3655cfe414b2e50615d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209435
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-04-23 16:20:26 +00:00
Mike Klein
4b19592a57 remove duplicate SkBase64.h
There's already an identical header in include/utils/SkBase64.h.
(And it's used by Flutter, so we need to keep the include/ one.)

Change-Id: Ia86f5b18d4351ec871902d0fd0e9f076f5d62fc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209664
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-04-22 17:53:03 +00:00
Hal Canary
2e904bc66b SkPDF: move type1 font code into single file
Change-Id: I0e0bf4cdb298b161cabf74eacc4b3950d7240643
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209172
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-04-18 21:01:58 +00:00
Brian Salomon
8a97f56c06 Swap x/y radii for EllipticalRRectOp depending on matrix.
Bug: chromium:946965
Change-Id: Ia85e07d7fc76aa9e0b0a8fe0daf3ab80d517cbd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209167
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-04-18 19:56:00 +00:00
Mike Klein
da8a6e1126 Add clang-cl arm64 builds
Nothing too tricky...
   1) tell clang-cl to --target=arm64-windows
   2) work around minor libpng issue temporarily

Change-Id: I4f0d792438610268821b67b92caf08fd78dcec4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208882
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-17 16:48:04 +00:00
Ben Wagner
db13d38748 Move SkTLazy.h to src/
It is no longer used in public or private includes or by any users.

Change-Id: Id3803531b411dc7a565b2bb688505eb2c1212cfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208661
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-04-16 20:31:20 +00:00
Brian Salomon
c0d79e525f Avoid multiplication by alpha in fragment shader when known to be 1.
Implemented for image shaders, image draws, and gradient shaders.

Reimplement GrFragmentProcessor::OverrideInput as GrOverrideInputFragmentProcessor.fp.
It allows specification of whether the replacement input color should be
a literal in the shader code or a uniform. For above use case use with literal white.

Make key in variables in fp files work for 4f colors.

Fix issue in CPP code gen from .fp where when + key vars that pushed multiple values
into the shader key only skipped the first key value when the when condition is not
true.

Bug: skia:7722

Change-Id: Id7c865132d620e8cdea8b00f2a627103eef171ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201985
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-04-16 14:03:04 +00:00
Brian Osman
6c431d5202 Towards a simpler SkSL -> GLSL pipeline (and better shader reflection)
The pretty printer didn't actually need the original (separate) strings,
so make it just operate on a single SkSL::String. Also remove the unused
line numbering, and the unit test. (Testing of test code, yay!)

With that done, cut down on passing around arrays of char* + length, and
just do the compaction to a single SkSL::String in the program builder.

Change-Id: Ieef9d9a8e3c5620c011b17477f1b0f9a9faa6273
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208226
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-16 13:49:17 +00:00
Greg Daniel
a3aa75ab29 Add callback to flush for knowing when gpu is finished work.
Bug: skia:8802
Change-Id: I093c2a4e879b635b169a849d9af3e9f7a3d84a88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207870
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-04-15 13:52:28 +00:00
Mike Reed
0c60708737 add utility for caching char2glyph
Try: out/release/nanobench --match _charToGlyph

Pseudo plan to use this:
- attach to whatever typeface backends need it (probably just freetype)
- have a purge/limiting scheme (e.g. only cache N entries)
- if we care, make the search fancier (e.g. binary, slope, etc.)

Bug: 951647
Change-Id: Ib1042ca5891d2742499faf1314579c402121a855
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207703
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-04-13 00:03:58 +00:00
Brian Osman
eec1e9e4f1 Even more DLL build fixes
These changes let us build a non-official component build on Windows,
using either MSVC or clang

Change-Id: Ia3279aa19e007e70ff28925ff70a0bfe8144d96f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207307
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-10 21:02:40 +00:00
Mike Reed
e3f17b911f remove SkMixer, since we have explicit lerps/blends in SkShader
Change-Id: I937861df9d8ae89c0587ea59dd740989bebd35a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207305
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-04-10 20:59:30 +00:00
Brian Osman
c725e8f7ea Make SkShaper's GN setup more DLL friendly
Similar to the Skottie refactor that just landed, this avoids having an
empty component when shaper is disabled (which turns into a DLL with no
sources, and a missing DllMain). I think this pattern of having modules
expose the same components as empty groups is simpler (and also fixes
the fact that only two of N references in top-level BUILD.gn were
guarded). Also, no one is using the define?

Change-Id: I9d25c1cfbd42336874f4428bf61f3e34a4a18d3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207303
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-10 18:59:35 +00:00
Ethan Nicholas
21a9b56fc2 moved files generated from .fp files into generated/ directories
Bug: skia:
Change-Id: I8605cdfcc0b1c56c23a6075c7fe188ab7384681c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207221
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-04-10 18:02:02 +00:00
Hal Canary
f5edf36d44 SkPDF: split GraphicStateStack out
motivation: SkPDFDevice is too big to think about.

All pdf outputs are identical.

Change-Id: I7d56aea07907ebcc9276d81797007d6798d54ee0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207123
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-04-10 15:42:40 +00:00
Ethan Nicholas
ff4fb3335b ComposeShader GPU implementations
Bug: skia:
Change-Id: I007b46ead1900a8f5cce82dec33b6d662fc63d8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206918
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-04-09 21:04:15 +00:00
Mike Reed
b5d8c634f9 remove guard for bitmap shader api
Change-Id: I6500f036970aa7fcc86ca0a9d2066a66e4c1c039
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206692
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-04-09 16:08:00 +00:00