Commit Graph

3313 Commits

Author SHA1 Message Date
Ben Wagner
d90cd3b279 Revert "Revert "IWYU for tests starting with 'D'.""
This reverts commit edf8449d2c.

Change-Id: Ibeedd9965855b3ccfe44486d15307bf3da15fd9c
Reviewed-on: https://skia-review.googlesource.com/129516
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-22 17:12:35 +00:00
Mike Klein
edf8449d2c Revert "IWYU for tests starting with 'D'."
This reverts commit b5f2897ab5.

Reason for revert: looks like this broke the build for DM in Google3.  Need more include dirs there?

Original change's description:
> IWYU for tests starting with 'D'.
> 
> Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
> Reviewed-on: https://skia-review.googlesource.com/129319
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=bsalomon@google.com,bungeman@google.com,herb@google.com

Change-Id: I01aac7dae6114685a0652cbde3defccc8a42caea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/129443
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-22 12:23:15 +00:00
Ben Wagner
b5f2897ab5 IWYU for tests starting with 'D'.
Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
Reviewed-on: https://skia-review.googlesource.com/129319
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-21 19:34:48 +00:00
Cary Clark
4dc5a45405 remove defines and add commas
Preparation for generating bookmaker files for all remaining
interfaces

Standardize enum and enum classes by including a comma after
the last entry.

Replace flatten-related #define in public interfaces
with their equivalent.

The motivation is to give documentation something to refer to.

An alternative would be to move part or all of this out of the
public interface; something I can work on in a follow-up CL.

R=reed@google.com,bsalomon@google.com

Bug: skia:6898
Change-Id: I4b865f6ec3d8f5d31e50448fef7d2714510302f0
Reviewed-on: https://skia-review.googlesource.com/129312
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-05-21 17:33:39 +00:00
Cary Clark
32a4910e57 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>
2018-05-20 23:15:48 +00:00
Cary Clark
5191880cbf 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>
2018-05-20 21:16:37 +00:00
Brian Osman
78a764860b Add drawBitmapLattice to SkDebugCanvas
One more step to full coverage of SkCanvas API. (Also, it would be nice
to implement fromJSON for both lattice types, I'll attempt that in a
follow up CL).

Change-Id: I5fe55ca90b7859e40f5e8ec83bc12b7938674b60
Reviewed-on: https://skia-review.googlesource.com/129245
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-20 18:18:06 +00:00
Ravi Mistry
da17f1e7df Omit "espn" from key_mobile_sites_smooth in RecreateSKPs bot
We already have a espn page set in Skia. Removing it from the chromium page
set does not lose us coverage.

NoTry: true
Bug: skia:7917
Change-Id: Ie5456ee7f8053ad904eb858eddfe564e3781249a
Reviewed-on: https://skia-review.googlesource.com/129303
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2018-05-20 14:53:16 +00:00
Ben Wagner
255ab8d9a5 Make SkStream readers report failure.
This also fixes an issue noticed while making this change where
SkFontDescriptor improperly round trips negative axis values.

Change-Id: Iacc5929a185659dcacc18c802c4908e4f34c6899
Reviewed-on: https://skia-review.googlesource.com/128341
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-05-18 15:06:24 +00:00
Joe Gregorio
26171e8927 [skiaserver] Start loading html/css/js from https://debugger-assets.skia.org.
Also clean up quoting and fix a hard-coded URL to https://debugger.skia.org.

Bug: skia:
Change-Id: I31283f3769c81a138d82c03214f005c7fb82c5b2
Reviewed-on: https://skia-review.googlesource.com/129164
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2018-05-18 14:10:14 +00:00
Cary Clark
ffb3d688b0 Color Documentation
- treat Color, ARGB, etc as things not requiring definitions
- fix links to Anti-alias, RGB-565
- finish everything marked incomplete, color and elsewhere
- add #Code blocks for #Typedef

R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=128547
Bug: skia:6898
Change-Id: Icf12fe70bc2bf1a8b1a5b31380b2454610949f23
Reviewed-on: https://skia-review.googlesource.com/128547
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-05-17 16:45:13 +00:00
Jim Van Verth
cbeae03cae Fix check for valid proxies returned by AtlasManager.
Also renames a lot of variables to make it clearer that getProxies()
returns the number of instantiated proxies, not the number of all
proxies.

Bug: skia:
Change-Id: Ifbc910cbd6635dccdb4e7f0df2e69a0f341130af
Reviewed-on: https://skia-review.googlesource.com/128660
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-05-16 19:28:32 +00:00
Ravi Mistry
02faa2b992 Fix capitalization of "twitter" in RecreateSKPs bot
Case has suddenly started to matter.

NoTry: true
Bug: skia:7917
Change-Id: I6020622bd12481a2ac291caf565632451a3c8da5
Reviewed-on: https://skia-review.googlesource.com/128480
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2018-05-16 15:01:54 +00:00
Cary Clark
682c58da48 Documentation refresh
- add links to types within methods
- add check to see that all references and definitions match
- add style to tables to make them easier to read
- use https everywhere
- remove trailing spaces
- move overview inside class
- split class and struct in summary tables
- add missing #Line
- clean up SkImageInfo constant documentation
- work on SkColor documentation
- allow common phrases to take different parameters
- add more flexibility to generated tables
- tighten token parent requirements
- generalize deprecated and example interfaces
- detect inner constructors

R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=121799
Bug: skia:6898
Change-Id: Ia75a23740b80259460916890b310e2a9f024962a
Reviewed-on: https://skia-review.googlesource.com/121799
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-05-16 11:35:24 +00:00
Chris Dalton
6a0e54e479 Add a vknostencils config
Bug: skia:
Change-Id: Id4781799ba0b30b01a60788afc235fd6134516cf
Reviewed-on: https://skia-review.googlesource.com/128380
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-05-15 21:57:53 +00:00
Mike Reed
81f60ecd9c Allow slides/gms to extend the UI
Bug: skia:
Change-Id: Ia5971d827e6e05ab6cc30af3105b3b32ee691a34
Reviewed-on: https://skia-review.googlesource.com/128321
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-05-15 14:29:43 +00:00
Brian Salomon
c7fe0f708c Make GrCaps and GrShaderCaps private.
Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps().

Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866
Reviewed-on: https://skia-review.googlesource.com/127389
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-05-11 14:47:27 +00:00
Ben Wagner
99a78dcb1a Add all SkPaint::Flags to Viewer app.
Originally a change to add just one more, turned into adding all of
them.

Change-Id: Ibd6b6cab75d5a018744661038cfccdb50470c234
Reviewed-on: https://skia-review.googlesource.com/127134
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-10 13:46:35 +00:00
Hal Canary
46cc3dabaf Revert "Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode""
This reverts commit 97c1108607.

Change-Id: Ic3c6addc64ced39766bbee3e10b4d88faf61ba2f
Reviewed-on: https://skia-review.googlesource.com/127021
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-05-09 18:00:35 +00:00
Greg Daniel
97c1108607 Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode"
This reverts commit 1c2bcd8b14.

Reason for revert: breaking chrome roll

Original change's description:
> SkAdvancedTypefaceMetrics: factor out GlyphToUnicode
> 
> Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63
> Reviewed-on: https://skia-review.googlesource.com/126507
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com,reed@google.com

Change-Id: Ib1ff8484ffd09cdb88d461ac00745aa32c191124
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/127000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-09 15:36:06 +00:00
Hal Canary
1c2bcd8b14 SkAdvancedTypefaceMetrics: factor out GlyphToUnicode
Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63
Reviewed-on: https://skia-review.googlesource.com/126507
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-05-09 14:24:45 +00:00
Florin Malita
38792ce0f8 Add a single-file viewer option
Pass --file/-f to open a single file for viewing.

Change-Id: Ida168765ed6a5c7d76df1a8298bfe658d39d0196
Reviewed-on: https://skia-review.googlesource.com/126761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-08 15:58:44 +00:00
Florin Malita
4e9e325725 [viewer] Avoid per-frame json UI updates
The reason we push Json updates for every frame is to support the
Android FPS meter - which happens to require the native FPS meter for
updates.

Instead of supporting two meters:

1) scale up the native FPS widget on Android (1.5x)

2) remove the Android widget

3) stop calling updateUIState() from onPaint()

Change-Id: Ica8109869035b2f885743a7e38b50688b69fa5e4
Reviewed-on: https://skia-review.googlesource.com/126621
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-07 21:30:27 +00:00
Ben Wagner
cb1393585e Allow finer rotation in Viewer app.
It turns out the ImGui sliders don't use the format string just for
display but also to modify the potential values. Change the format
string for rotation to three decimal places to match zoom.

Change-Id: I5f8d675a18687d67c2f19b03aa4c19c3ae094415
Reviewed-on: https://skia-review.googlesource.com/125960
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-05-04 19:09:08 +00:00
Florin Malita
87ccf33f15 [skottie] Disable on Android Framework builds
Make Skottie truly optional (own flag), and disable in framework builds
(to unblock landing the RapidJson refactoring).

Change-Id: I4611f915e43fe11c1f6754ab4a9f63e45af2f8d3
Reviewed-on: https://skia-review.googlesource.com/125872
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-04 18:36:03 +00:00
Brian Salomon
ec54539d39 Make RenderDoc work automatically with GLX viewer
Change-Id: I19769924882c2790cfc862373d6f26508b410eee
Reviewed-on: https://skia-review.googlesource.com/125871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-05-04 16:27:13 +00:00
Brian Osman
de81a21f32 Remove colorspaceinfo
We prefer skcms iccdump, and colorspaceinfo was relying on
soon-to-be-deleted internals of SkColorSpace.

Bug: skia:
Change-Id: I06f6e0365f1f6840339aaf2fb02a7c5aab43b39d
Reviewed-on: https://skia-review.googlesource.com/125748
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-03 19:12:02 +00:00
Yuqian Li
737b9a9d48 Remove legacy guard flags
Bug: skia:
Change-Id: I3b526f2caec6766faea72cdc89550f50e17c71d2
Reviewed-on: https://skia-review.googlesource.com/125746
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-05-03 18:48:32 +00:00
Chris Dalton
3a67b8e46b Add support for building with MoltenVK
Bug: skia:
Change-Id: If55785d7fcc6e2c92c961ac390700add874c8d6d
Reviewed-on: https://skia-review.googlesource.com/125601
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-03 16:26:01 +00:00
Yuqian Li
9127ea3488 Add name field to calmbench json
This should let perf.skia.org get the "name" keyword instead of "test".

Bug: skia:7816
Change-Id: Icb2e9f7c6109a0cfb06499ee58f9fd0cc834e5c3
Reviewed-on: https://skia-review.googlesource.com/125540
Auto-Submit: Yuqian Li <liyuqian@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2018-05-03 15:18:02 +00:00
Ben Wagner
20fa1e94a0 Update SkRandomScalerContext to handle mask filters.
SkRandomScalarContext would apply all path and mask filters twice, once
on the proxy and once to itself.

This also changes the SkScalerContext mask generation in anticipation of
removing the mask format overrides.

This also changes the textblobrandomfont test to fix the line spacing
and emoji handling.

Change-Id: Ib2a633d49ccb801a1849dd982185f44c1d2ea85f
Reviewed-on: https://skia-review.googlesource.com/124644
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-05-03 01:00:08 +00:00
Brian Osman
805a727d26 Add toggle for 'real' vs. 'fake' perspective in Viewer
Real perspective draws content with perspective applied. Fake
perspective rasterizes in ortho, then stretches the image by the
perspective matrix.

Change-Id: I738cd379f9a58b965469ef8a57fb2dfd597fda10
Reviewed-on: https://skia-review.googlesource.com/125442
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-05-02 20:09:38 +00:00
Khushal
38a0843688 fonts: Reland push font remoting.
This relands the following changes:
1) https://skia-review.googlesource.com/c/skia/+/120283
2) https://skia-review.googlesource.com/c/skia/+/125029
3) https://skia-review.googlesource.com/c/skia/+/125140

The original changes had to be reverted due to a memory leak in
SkBaseDevice from SkTextBlobCacheDiffCanvas. This has been addressed by
https://skia-review.googlesource.com/c/skia/+/125160

TBR=herb@google.com

Bug: skia:7515, 831354
Change-Id: I73f4fcb1c397f31bf01553ff48c71ed2d6dd0770
Reviewed-on: https://skia-review.googlesource.com/125326
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
2018-05-02 18:39:31 +00:00
Herb Derby
fcac00f2f1 Reland "Remove devKerning"
This is a reland of c86c5c0144

Original change's description:
> Remove devKerning
> 
> Dev kerning is not supported by any scalers. This is
> mostly removed. The remaining fields fRsbDelta and
> fLsbDelta are kept to keep Android compiling.
> 
> Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
> Reviewed-on: https://skia-review.googlesource.com/124921
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c
Reviewed-on: https://skia-review.googlesource.com/125300
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-02 15:15:08 +00:00
Herb Derby
efe39bcfb8 Take sk_sp<SkDevice> instead of SkDevice*
Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680
Reviewed-on: https://skia-review.googlesource.com/125160
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Herb Derby <herb@google.com>
2018-05-02 14:46:17 +00:00
Mike Klein
8a232023e1 Revert "fonts: Set up remote glyph caching to push fonts."
This reverts commit 101d56359a.

Reason for revert: 5 of 5

Original change's description:
> fonts: Set up remote glyph caching to push fonts.
> 
> Currently the SkStrikeClient is designed to pull fonts from the server
> on demand, and to pre-fetch a batched request by analyzing the ops using
> a SkTextBlobCacheDiffCanvas. This change modifies the design to support
> a push based model, where the server pushes fonts required by the client
> and sets up the requisite SkGlyphCaches on the client prior to
> rasterizing the ops.
> 
> This model still relies on the SkTextBlobCacheDiffCanvas for analyzing
> the glyphs required for rasterizing an op. The glyph caches required for
> raster are locked and missing glyphs to be sent to the client are tracked
> by the SkStrikeServer. The embedder can serialize this font data at any
> point, but must ensure that this data is deserialized by the
> SkStrikeClient at the remote end, before rasterizing any ops analyzed
> prior to serialization. Any refs on the caches are released once the
> font data is serialized by the server.
> 
> The locking of glyph caches relies on the embedder providing discardable
> handles. These handles can be created on the server and serialized to be
> sent to the client, and map to an instance of SkGlyphCache. This allows
> the server to control the lifetime of the caches on the client.
> 
> Bug: skia:7515
> Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b
> Reviewed-on: https://skia-review.googlesource.com/120283
> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=mtklein@google.com,herb@google.com,khushalsagar@chromium.org

Change-Id: If72caf968ddcbf70b8b9d71782a2339a118ed202
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7515
Reviewed-on: https://skia-review.googlesource.com/125264
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-02 13:55:08 +00:00
Mike Klein
c76e26a6bb Revert "Remove devKerning"
This reverts commit c86c5c0144.

Reason for revert: 4 of 5

Original change's description:
> Remove devKerning
> 
> Dev kerning is not supported by any scalers. This is
> mostly removed. The remaining fields fRsbDelta and
> fLsbDelta are kept to keep Android compiling.
> 
> Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
> Reviewed-on: https://skia-review.googlesource.com/124921
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=bungeman@google.com,herb@google.com,reed@google.com

Change-Id: If865f702868192a1b72cd811baa996dd1282bbce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/125263
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-02 13:54:54 +00:00
Herb Derby
c86c5c0144 Remove devKerning
Dev kerning is not supported by any scalers. This is
mostly removed. The remaining fields fRsbDelta and
fLsbDelta are kept to keep Android compiling.

Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
Reviewed-on: https://skia-review.googlesource.com/124921
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-01 21:12:15 +00:00
Khushal
101d56359a fonts: Set up remote glyph caching to push fonts.
Currently the SkStrikeClient is designed to pull fonts from the server
on demand, and to pre-fetch a batched request by analyzing the ops using
a SkTextBlobCacheDiffCanvas. This change modifies the design to support
a push based model, where the server pushes fonts required by the client
and sets up the requisite SkGlyphCaches on the client prior to
rasterizing the ops.

This model still relies on the SkTextBlobCacheDiffCanvas for analyzing
the glyphs required for rasterizing an op. The glyph caches required for
raster are locked and missing glyphs to be sent to the client are tracked
by the SkStrikeServer. The embedder can serialize this font data at any
point, but must ensure that this data is deserialized by the
SkStrikeClient at the remote end, before rasterizing any ops analyzed
prior to serialization. Any refs on the caches are released once the
font data is serialized by the server.

The locking of glyph caches relies on the embedder providing discardable
handles. These handles can be created on the server and serialized to be
sent to the client, and map to an instance of SkGlyphCache. This allows
the server to control the lifetime of the caches on the client.

Bug: skia:7515
Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b
Reviewed-on: https://skia-review.googlesource.com/120283
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2018-05-01 18:15:15 +00:00
Chris Dalton
117d9729c1 skpbench: Add support for Pixel 2
Bug: skia:
Change-Id: Ic0901ca84bf8e3fda29b3bd7a0504396445ca0f4
Reviewed-on: https://skia-review.googlesource.com/124282
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-30 15:29:13 +00:00
Florin Malita
6eb85a1cf1 [skottie] Show load stats in SkottieSlide
TBR=
Change-Id: Ie3a1036d9a90cb16d2795134c453759aeff06e3c
Reviewed-on: https://skia-review.googlesource.com/124461
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-30 15:19:03 +00:00
Yuqian Li
58b90f7f17 Raise exceptions from child threads to the main thread
Bug: skia:7883
Change-Id: Ia71550b94867588c124e93eac347c67e35aa48e8
Reviewed-on: https://skia-review.googlesource.com/124380
Auto-Submit: Yuqian Li <liyuqian@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2018-04-30 11:42:09 +00:00
Brian Osman
bdaf97bdb8 Rotate about the slide center, and before perspective
This causes rotation to happen in the perspective plane, which is
more (?) interesting/useful.

Change-Id: If57a81de6662591be67cb68f0278f71038ac8d40
Reviewed-on: https://skia-review.googlesource.com/124160
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-26 20:52:43 +00:00
Brian Osman
9bb47cf0ff Add perspective support (rect to rect) to Viewer
Change-Id: I312d5b3e6b7f37a3a7bfd5561bcdb31b43e207b8
Reviewed-on: https://skia-review.googlesource.com/123934
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2018-04-26 20:21:23 +00:00
Cary Clark
d98f78cd01 alternative no anonymous enums
Anonymous enums play havoc with documentation;
there's no name to refer to. It may be that all
enums may either be named or replaced with constexpr
without breaking anything. Try replacing all
anonymous enums in include/core to see what happens.

This names SkCanvas::SaveLayerFlagsSet but leaves
SkCanvas::SaveLayerFlags as a uint32_t, to reduce
risk as compared to review.skia.org/123584.

There's also some chance that external linkage will
break if some client refers to anonymous enum in a way
that could require its address: see
https://stackoverflow.com/questions/22867654/enum-vs-constexpr-for-actual-static-constants-inside-classes
(This CL does not require definitions + declarations)

Brought bookmaker docs in line with this change.
This also tripped over missing code in bookmaker
handling constexpr so added that as well.

R=reed@google.com,bsalomon@google.com

Docs-Preview: https://skia.org/?cl=123920
Docs-Preview: https://skia.org/?cl=123584
Bug: skia:6898
Change-Id: I14a342edcfd59e139ef9e4501f562417c4c60391
Reviewed-on: https://skia-review.googlesource.com/123920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-26 17:11:53 +00:00
Chris Dalton
218c29453f Remove the MSAA path renderer
Bug: skia:
Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff
Reviewed-on: https://skia-review.googlesource.com/123726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-25 19:59:59 +00:00
Adrienne Walker
6f719aeeae Add CheckGeneratedFiles recipe check for gpu workarounds
Followup to https://skia-review.googlesource.com/122800

Bug: chromium: 829614
Change-Id: Idde753e0f8943290208625ba5b6332a5fdc07184
Reviewed-on: https://skia-review.googlesource.com/123536
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2018-04-25 19:26:27 +00:00
Hal Canary
fd9bcabca1 sk_tools/Resources: optional SK_TOOLS_REQUIRE_RESOURCES flag
BUG=skia:7842
Change-Id: I1ce7d12308cd8ee101163d73dfc79f2d2155c632
Reviewed-on: https://skia-review.googlesource.com/123425
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-04-24 18:08:06 +00:00
Ben Wagner
d02a74d649 Add Transform section to viewer tools window.
This adds sliders for Zoom and Rotate.

Change-Id: Ie568e5381d76bd5a457760e2d6224e42e64c7f16
Reviewed-on: https://skia-review.googlesource.com/123027
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-23 17:21:30 +00:00
Ben Wagner
7a3c6748f3 Backspace opens slide picker (not paint) in viewer.
A recent change added the "Paint" section to the viewer tools window. The
code around forcing the slide picker open when the backspace key was
pressed was inadvertantly separated from the slide picker section, so
now the paint section is confusingly held open instead. This changes the
logic so that the slide picker is once again the target of backspace.

Change-Id: Ibfcb78bb0a1e2bdbb2ccce54b38e8206e0303753
Reviewed-on: https://skia-review.googlesource.com/122949
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-23 14:57:00 +00:00
Adrienne Walker
1df7cd8712 Reland "Add stub gpu workaround generators"
This is a reland of 94d25b970b

Original change's description:
> Add stub gpu workaround generators
> 
> Like https://chromium-review.googlesource.com/c/chromium/src/+/1005362,
> this patch adds a way for Chrome and Skia to share a set of driver
> workaround names so that they can be turned on by Chrome (or Skia) as
> needed.
> 
> To avoid weird cross-repository dependencies, the generator script is
> duplicated in Skia.
> 
> This patch just adds a few dummy workaround names to make sure the build
> process is working.  The followup to this is to add workaround init
> to GrContext/GrContextOptions and to start implementing individual
> workarounds.
> 
> Implementing these workarounds is to support Chrome's "out of process
> raster" which will use Ganesh without a command buffer, and so will not
> have the workarounds that the command buffer provides.
> 
> Bug: chromium:829614
> Change-Id: I40745a777a95805995991fedb81657ae418b52d9
> Reviewed-on: https://skia-review.googlesource.com/120608
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

Bug: chromium:829614
Change-Id: Idb3309ffa894f7585ee493388b56565e9d4a3101
Reviewed-on: https://skia-review.googlesource.com/122800
Auto-Submit: Adrienne Walker <enne@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-20 17:50:45 +00:00
Ben Wagner
7464a262a2 Add more angle_gl_* configs for NVIDIA.
Bug: skia:7823
Change-Id: I9fbf0875696661ca87b37cf8949bd5f0b48b314d
Reviewed-on: https://skia-review.googlesource.com/122600
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-19 21:32:34 +00:00
Brian Osman
fb9f39a98a Remove duplicate predefined configs
Change-Id: I065bb1c20a6a246a2864b394f025fc12614c6a18
Reviewed-on: https://skia-review.googlesource.com/122543
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-19 20:47:04 +00:00
Ben Wagner
4b5e4b3f93 Remove unused parameters from internalGetPath.
The fillPath and fillToDevMatrix parameters to
SkScalerContext::internalGetPath are never used. Remove them.

Change-Id: I4fda9b3a24232924e9f94be4abcf8ac10ac7901c
Reviewed-on: https://skia-review.googlesource.com/122360
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-19 15:24:04 +00:00
Greg Daniel
57bf4a3dbf When creating testing backendTexture take colorspace into account.
Bug: skia:
Change-Id: Ifa8dbad3eca81790648476f9a6d3fa5a088fede9
Reviewed-on: https://skia-review.googlesource.com/122341
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-19 15:02:34 +00:00
Leon Scroggins
2ae45ae83a Revert "Add stub gpu workaround generators"
This reverts commit 94d25b970b.

Reason for revert: Breaking the Chromium roll

Original change's description:
> Add stub gpu workaround generators
> 
> Like https://chromium-review.googlesource.com/c/chromium/src/+/1005362,
> this patch adds a way for Chrome and Skia to share a set of driver
> workaround names so that they can be turned on by Chrome (or Skia) as
> needed.
> 
> To avoid weird cross-repository dependencies, the generator script is
> duplicated in Skia.
> 
> This patch just adds a few dummy workaround names to make sure the build
> process is working.  The followup to this is to add workaround init
> to GrContext/GrContextOptions and to start implementing individual
> workarounds.
> 
> Implementing these workarounds is to support Chrome's "out of process
> raster" which will use Ganesh without a command buffer, and so will not
> have the workarounds that the command buffer provides.
> 
> Bug: chromium:829614
> Change-Id: I40745a777a95805995991fedb81657ae418b52d9
> Reviewed-on: https://skia-review.googlesource.com/120608
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

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

Change-Id: Ie0b69d7d028dabca1fd70813b6920386c8838247
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:829614
Reviewed-on: https://skia-review.googlesource.com/122240
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-04-19 12:25:14 +00:00
Adrienne Walker
94d25b970b Add stub gpu workaround generators
Like https://chromium-review.googlesource.com/c/chromium/src/+/1005362,
this patch adds a way for Chrome and Skia to share a set of driver
workaround names so that they can be turned on by Chrome (or Skia) as
needed.

To avoid weird cross-repository dependencies, the generator script is
duplicated in Skia.

This patch just adds a few dummy workaround names to make sure the build
process is working.  The followup to this is to add workaround init
to GrContext/GrContextOptions and to start implementing individual
workarounds.

Implementing these workarounds is to support Chrome's "out of process
raster" which will use Ganesh without a command buffer, and so will not
have the workarounds that the command buffer provides.

Bug: chromium:829614
Change-Id: I40745a777a95805995991fedb81657ae418b52d9
Reviewed-on: https://skia-review.googlesource.com/120608
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-04-18 23:10:33 +00:00
Hal Canary
64f75eecdd SkQP: speed up tools/skqp/make_apk_list\
NoTry: true
Change-Id: I94852a9375329a6c9df269004b89efb48d2e4691
Reviewed-on: https://skia-review.googlesource.com/122083
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-04-18 19:39:44 +00:00
Ben Wagner
a580fb3f9e Add paint flags to viewer GUI.
Overriding bits of the paint was added with keyboard bindings but
without being reflected in the GUI. This adds these flags to the GUI.

Change-Id: I633801fb776248952afe7cbe8857676ef8b57135
Reviewed-on: https://skia-review.googlesource.com/121796
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-17 16:10:14 +00:00
Ben Wagner
37c5403890 Add pixel geometry and dft selection to viewer app.
Change-Id: I2fea84793383c44b102fa97b23f59235ef302ff9
Reviewed-on: https://skia-review.googlesource.com/121581
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-04-16 22:46:50 +00:00
Cary Clark
2d4bf5f288 document SkColor.h
SkColor.h uses #define liberally, and has many global symbols,
two things bookmaker hasn't seen in other includes.

Revised .h -> .bmh converter to work with SkColor.h as well
as updating how .bmh indices are built.

Generated SkColor_Reference.bmh for globals, and
SkColor4f_Reference.bmh for class.

Other than the existing comments, this doesn't update the
documentation or add new examples.

Docs-Preview: https://skia.org/?cl=118985
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I5978257ee0e51319823efbe8dfc467a08c99ffe0
Reviewed-on: https://skia-review.googlesource.com/118985
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-04-16 16:26:20 +00:00
Herb Derby
209a5f3bea Remove all notion of transport from the API - V2.
There is only a need to pass buffers in and out of the system.
All transport is external to the system.

BUG=skia:7515

Change-Id: Ie50cbc3fa1b9776e56dab8e49e91ce640e0b3954
Reviewed-on: https://skia-review.googlesource.com/119893
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-04-16 15:58:40 +00:00
Derek Sollenberger
6aab2ab762 Include shadow ops in the debugger.
Bug: skia:7803
Change-Id: Ic4441e696a56b898e5095f747ab1b9a9c0e0f858
Reviewed-on: https://skia-review.googlesource.com/121100
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-04-12 17:21:10 +00:00
Robert Phillips
ba375a8884 Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS
This relies on the Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/999796 (Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS to SkUserConfig.h) landing first.

Change-Id: Ie0a2b7b84cc02e46957765a0a7d6444a5320769d
Reviewed-on: https://skia-review.googlesource.com/119140
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-12 14:56:10 +00:00
Mike Reed
1f275851ec remove unused/dumb methods from SkRect
Bug: skia:
Change-Id: I407dc94256a347c7a9343b75a5af43c4294891d3
Reviewed-on: https://skia-review.googlesource.com/119360
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2018-04-11 19:40:57 +00:00
Brian Osman
255735e53b Remove code that was only used by the old debugger
Change-Id: I1035d9fa5f9888f3b6c332b16a0bde69f357a4a8
Reviewed-on: https://skia-review.googlesource.com/119144
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-09 13:30:54 +00:00
Herb Derby
4473907dee Revert "Remove all notion of transport from the API."
This reverts commit 4961a93858.

Reason for revert: Breaks MSVC

Original change's description:
> Remove all notion of transport from the API.
> 
> There is only a need to pass buffers in and out of the system.
> All transport is external to the system.
> 
> Change-Id: I26dfc8e0b4cce9969395c96d5230078e7dca3f3d
> Reviewed-on: https://skia-review.googlesource.com/119062
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Khushal Sagar <khushalsagar@google.com>

TBR=herb@google.com,reed@google.com,khushalsagar@google.com

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

Change-Id: I62cbac1be4483702ba7464822d93fb9f818f88b7
Reviewed-on: https://skia-review.googlesource.com/119580
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-04-08 04:29:01 +00:00
Herb Derby
4961a93858 Remove all notion of transport from the API.
There is only a need to pass buffers in and out of the system.
All transport is external to the system.

Change-Id: I26dfc8e0b4cce9969395c96d5230078e7dca3f3d
Reviewed-on: https://skia-review.googlesource.com/119062
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Khushal Sagar <khushalsagar@google.com>
2018-04-06 18:18:34 +00:00
Cary Clark
99885411ae remove SK_IGNORE_TO_STRING
SK_IGNORE_TO_STRING is not defined anywhere.
The same effect can be had by using a modern
linker.

Removing it simplifies bookmaker and makes
our includes easier to understand.

R=robertphillips@google.com
TBR=reed@google.com

Bug: skia:6898
Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f
Reviewed-on: https://skia-review.googlesource.com/118963
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-05 23:52:23 +00:00
Ben Wagner
5ddb308625 Distinguish between glyphs with empty path and no path.
BUG=skia:4904

Change-Id: I065e3b4d8596b415ddaf094d7f9a4b65da64d4d4
Reviewed-on: https://skia-review.googlesource.com/117280
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-04-05 22:37:33 +00:00
Florin Malita
6127c4c660 Clip SlideDir slides to their declared dimensions
(to avoid spilling cell content)

TBR=
Change-Id: I7bbbbf004d35faab5f264d9914bcd24d2bb8eaeb
Reviewed-on: https://skia-review.googlesource.com/118984
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-05 19:47:48 +00:00
Florin Malita
0ffa322ecd [viewer] Consolidate external slide loading
Handle all external slides (.skp, .jpg, .json, .svg) consistently:

  * support both single-file/directory flags
  * add "directory" slides for all types

Change-Id: I4881c51f597ed4cb2a5b4c61706a168c754a5a8f
Reviewed-on: https://skia-review.googlesource.com/119020
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-05 19:05:28 +00:00
Florin Malita
c659c2c30d Viewer SVG support
Change-Id: I93ee61271ebe960063bec16ba472b3fd243ee149
Reviewed-on: https://skia-review.googlesource.com/118885
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-05 16:34:22 +00:00
Herb Derby
46117c83d2 Clean up buffering and serializatoin.
BUG=skia:7515

Change-Id: Id580e8f464c6263fa32a5d6347f505b00bba29d7
Reviewed-on: https://skia-review.googlesource.com/118460
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-04-04 00:53:01 +00:00
Cary Clark
a4f581a475 fix global method indentation
Check to see if a method is inside a struct or class
before increasing its indentation. Also, add missing
description.

Docs-Preview: https://skia.org/?cl=118381
Bug: skia:6898
Change-Id: I9402442a89dafc96d87bf69f157dcfa40cdf6e2b
Reviewed-on: https://skia-review.googlesource.com/118381
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-04-03 20:02:25 +00:00
Cary Clark
186d08f621 fix bugs exposed by documenting SkImageInfo
- More rigorous symbol identification creates additional
links, and finds spurious errors like unnecessary
parentheses.

- Fixed code to allow preprocessor directives in
#Code blocks (still more to do).

- Fixed examples waiting on fiddle updates.

- Make SkImageInfo officially documented (update in status.json).

- Fixed enum indentation.



Docs-Preview: https://skia.org/?cl=115656
Bug: skia:6898
Change-Id: Ifcf5cfd3f6c03b3b83155c898b2b035a2f3d443c
Reviewed-on: https://skia-review.googlesource.com/115656
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-04-03 16:09:56 +00:00
Ben Wagner
2de1eda3d2 SkScalerContext::getMetrics to not request metrics it will ignore.
Before this change SkScalerContext::getMetrics always calls
generateMetrics to force the subclass to create full metrics. However,
if the SkScalerContext is going to draw from outlines then there is no
reason to do so since it is immediately going to overwrite those metrics
by computing its own from the path. This also puts off other decisions
being made based on the glyph metrics until after the metrics are fully
computed.

The logic in SkScalerContext::getImage is updated to be similar to the
logic in the new SkScalerContext::getMetrics.

Change-Id: I1798c9244277fab85595fb39fc3a85ef7eb33620
Reviewed-on: https://skia-review.googlesource.com/117085
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-02 20:54:52 +00:00
Derek Sollenberger
d39622210f Add multilib support as the default build option for libskqp
Change-Id: I98e7315f402bf9ff8fd11e990497e17fa0c0dc7a
Reviewed-on: https://skia-review.googlesource.com/117636
Reviewed-by: Hal Canary <halcanary@google.com>
2018-04-02 17:46:52 +00:00
Yuqian Li
755778cda0 Update trans limit after zoom changes in viewer
Previously, the trans limit assumes that only touch gesture can
change the zoom level. That's not true on desktops so we need this
fix. Otherwise, we won't be able to translate when we zoomed in.

Bug: skia:
Change-Id: I5901600a0044639a47514ab76b7e1914f04137a2
Reviewed-on: https://skia-review.googlesource.com/116987
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-03-28 20:51:44 +00:00
Ben Wagner
97182cc8f6 Add color fonts.
BUG=skia:7624

Change-Id: I68a6bb4c6fa541ffad565d970438d93ff1bd8ed6
Reviewed-on: https://skia-review.googlesource.com/109521
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-on: https://skia-review.googlesource.com/116541
Reviewed-on: https://skia-review.googlesource.com/116984
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-03-28 20:14:44 +00:00
Ben Wagner
aa5da735fa Check that paint is not null in OveridePaintFilterCanvas.
SkCanvas::drawPicture may provide nullptr for a paint.

BUG=skia:7756

Change-Id: I46651f7e8f0d859a7e75206d93ed1f3b3c0a4bac
Reviewed-on: https://skia-review.googlesource.com/116902
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-03-28 18:02:24 +00:00
Robert Phillips
e47f0a0f16 Remove old method of drawing DDL SKPs from DM (in favor of ViaDDL method)
Change-Id: I6bb270d9df1c76b9d2e384abde603cdda91c9bb6
Reviewed-on: https://skia-review.googlesource.com/116550
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-28 17:21:24 +00:00
Herb Derby
39e45df22d Various cleanup to remote_demo
Integrate SkRemoteGlyphCacheRenderer into SkStrikeServer
Add a Timer.
Remove unused code.

BUG=skia:7515

Change-Id: Idffb477af71cbcc4035df190e29e8910b61aa6e5
Reviewed-on: https://skia-review.googlesource.com/116485
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-27 21:51:44 +00:00
Ben Wagner
3560b58de3 Revert "Add color fonts."
This reverts commit d3b933f3e0.

Reason for revert: we're not mirroring experimental/ everywhere.

Original change's description:
> Add color fonts.
> 
> BUG=skia:7624
> 
> Change-Id: I1d0974282adce2fd7b13a003309e63593b6e1a9c
> Reviewed-on: https://skia-review.googlesource.com/109521
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-on: https://skia-review.googlesource.com/116541

TBR=mtklein@google.com,bungeman@google.com,herb@google.com

Change-Id: Ic2d763244cbce663a23eb53321ac45201c466501
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7624
Reviewed-on: https://skia-review.googlesource.com/116680
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-03-27 18:16:04 +00:00
Ben Wagner
d3b933f3e0 Add color fonts.
BUG=skia:7624

Change-Id: I1d0974282adce2fd7b13a003309e63593b6e1a9c
Reviewed-on: https://skia-review.googlesource.com/109521
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-on: https://skia-review.googlesource.com/116541
2018-03-27 16:49:14 +00:00
Robert Phillips
33f02edb14 Switch DDL rendering to be a Via in DM (take 2)
This will let us also render the GMs via DDLs.

TBR=mtklein@google.com
Change-Id: If7c2460d964822a6decc33cf5e8e685e67923127
Reviewed-on: https://skia-review.googlesource.com/116463
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-27 12:37:44 +00:00
Herb Derby
97be88f58a Move cache difference code into remote cache files
BUG=skia:7515

Change-Id: I59e75d460b4ed4d0a737c833520b2335808a4ce4
Reviewed-on: https://skia-review.googlesource.com/115706
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-26 21:28:04 +00:00
Robert Phillips
f14e833392 Revert "Switch DDL rendering to be a Via in DM"
This reverts commit bd2e2a0caf.

Reason for revert: 

Build-Debian9-Clang-x86_64-Debug-MSAN

In file included from ../../../dm/DMSrcSink.cpp:8:
../../../dm/DMSrcSink.h:548:15: error: private field 'fNumDivisions' is not used [-Werror,-Wunused-private-field]
    const int fNumDivisions;

Original change's description:
> Switch DDL rendering to be a Via in DM
> 
> This will let us also render the GMs via DDLs.
> 
> Change-Id: I866a5af66d737473f4760dbc9d45053460c42e6e
> Reviewed-on: https://skia-review.googlesource.com/116021
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: Ice07c25ab29c57b2efb193c03e5504a2ae1a0743
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/116560
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-26 20:58:14 +00:00
Robert Phillips
bd2e2a0caf Switch DDL rendering to be a Via in DM
This will let us also render the GMs via DDLs.

Change-Id: I866a5af66d737473f4760dbc9d45053460c42e6e
Reviewed-on: https://skia-review.googlesource.com/116021
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-26 20:30:33 +00:00
Brian Salomon
032aaae5be Remove legacy GrContext factories function and supporting code/types.
Change-Id: I437a4a0a58bf70ea1b8b0659b099a2af2bfa64fe
Reviewed-on: https://skia-review.googlesource.com/116197
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-23 21:12:50 +00:00
Hal Canary
22e6e21e7c Reland "CreatePlatformGLTestContext_egl: Try GLES 3, then GLES 2."
This is a reland of 0593a840b1

New functionality (which doesn't work everywhere) is behind a flag:
GR_EGL_TRY_GLES3_THEN_GLES2.

Original change's description:
> CreatePlatformGLTestContext_egl:  Try GLES 3, then GLES 2.
>
> Also cleanup.
>
> Change-Id: I186a7d7f509bc7852241c083414495b6182b916c
> Reviewed-on: https://skia-review.googlesource.com/115922
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

Change-Id: I362079dee9c74f1a2c31d935bcb821201a413923
Reviewed-on: https://skia-review.googlesource.com/116143
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-23 19:21:20 +00:00
Hal Canary
d4dac9cfd1 Revert "CreatePlatformGLTestContext_egl: Try GLES 3, then GLES 2."
This reverts commit 0593a840b1.

Reason for revert: Fails with Nexus7-GPU-Tegra3-arm

Original change's description:
> CreatePlatformGLTestContext_egl:  Try GLES 3, then GLES 2.
> 
> Also cleanup.
> 
> Change-Id: I186a7d7f509bc7852241c083414495b6182b916c
> Reviewed-on: https://skia-review.googlesource.com/115922
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

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

Change-Id: I5f276a89d1b880212861986b5385e567ac884c62
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/116142
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-23 14:40:31 +00:00
Jim Van Verth
af78a94217 Revert "Add color fonts."
This reverts commit c912d6133c.

Reason for revert: Causing TSAN issues.

Original change's description:
> Add color fonts.
> 
> BUG=skia:7624
> 
> Change-Id: Id2b7449048591892ff802484d5e3745a7e1402bb
> Reviewed-on: https://skia-review.googlesource.com/109521
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=mtklein@google.com,bungeman@google.com,herb@google.com

Change-Id: I2ccd1f00e91bb92b7059323c95da0dd3de954164
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7624
Reviewed-on: https://skia-review.googlesource.com/116141
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-03-23 14:39:51 +00:00
Ben Wagner
c912d6133c Add color fonts.
BUG=skia:7624

Change-Id: Id2b7449048591892ff802484d5e3745a7e1402bb
Reviewed-on: https://skia-review.googlesource.com/109521
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-03-22 20:55:05 +00:00
Hal Canary
0f66681ff1 BUILD: build when !skia_use_expat
Change-Id: I17a695c64be0e2081ad4937b23038b7ce88ae293
Reviewed-on: https://skia-review.googlesource.com/115988
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-22 20:28:45 +00:00
Hal Canary
0593a840b1 CreatePlatformGLTestContext_egl: Try GLES 3, then GLES 2.
Also cleanup.

Change-Id: I186a7d7f509bc7852241c083414495b6182b916c
Reviewed-on: https://skia-review.googlesource.com/115922
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-22 19:20:25 +00:00
Brian Salomon
5fba7ad39a Support GL_RGB textures and render targets.
Bug= skia:7533

Change-Id: Iba30e90dbf2574368b773bb5cf2ebd5219559717
Reviewed-on: https://skia-review.googlesource.com/108188
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-22 14:49:44 +00:00
Derek Sollenberger
ea4aa7e7ec Update Android build file for SkQP to point to ndk compliant libjsoncpp
Bug: b/74442448
Change-Id: If5e0e349cdb13352d580e55b0af26c908cc80003
Reviewed-on: https://skia-review.googlesource.com/115605
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2018-03-21 17:54:38 +00:00
Joe Gregorio
7e86547842 [lottiecap] Fix timestamp calculation to exactly match skottie in DM.
Also use the much faster goToAndStop() call.

Bug: skia:
Change-Id: I22b8ac2b3d2fd70da4b396cb6b4ad50485a6f408
Reviewed-on: https://skia-review.googlesource.com/115324
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2018-03-20 21:02:57 +00:00
Cary Clark
06c20f356d more SkImageInfo docs
fix a couple of fiddles with changed output
rewrite some SkSurface image makers
move towards replacing SkImageInfo.h

R=caryclark@google.com

Docs-Preview: https://skia.org/?cl=115163
Bug: skia:6898
Change-Id: Id9895b051cd457336c30250a69cf95359d1d34d7
Reviewed-on: https://skia-review.googlesource.com/115163
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-03-20 20:20:20 +00:00
Herb Derby
aeb425dbf1 Regularize SkGlyphCache creation.
This allows no need for downcasting for specialized use
of SkScalerContext for the remote case. This allows
cache priming to be used in a single process.

BUG=skia:7515

Change-Id: I963a50e36af9deef5a3414fc8a4c94ccfc38deaf
Reviewed-on: https://skia-review.googlesource.com/115121
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-20 19:11:31 +00:00
Hal Canary
b0ca84f3a8 SkQP/Docs: fix missing step in README
NoTry: true
Change-Id: Id97b0677ea203fdf542e42957a38feb84db08b4c
Reviewed-on: https://skia-review.googlesource.com/115365
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-20 19:10:51 +00:00
Joe Gregorio
0060c3394c [lottiecap] Moved over from buildbot repo.
Command line application to build a 5x5 filmstrip
from a Lottie file in Chrome headless and then export
that filmstrip in a 1000x1000 PNG.

Bug: skia:
Change-Id: I38decac363f2d592fddc28b3f4ca9450c5851ac6
Reviewed-on: https://skia-review.googlesource.com/115100
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-20 13:25:23 +00:00
Kevin Lubick
a3ecaf5fcf [skpbench] Use android's perf settings for Pixel C
These are a bit more conservative, but will hopefully come with improved
stability like https://skia-review.googlesource.com/c/skia/+/111740 did.

If this works, we can push the envelope by using the slightly
more aggressive settings found at
https://android.googlesource.com/platform/platform_testing/+/master/scripts/perf-setup/dragon-setup.sh

Bug: skia:7238
Change-Id: Ia0e24c7fc9bcc2fd44dcd0a57dde481ad8c55f7d
Reviewed-on: https://skia-review.googlesource.com/114283
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-03-19 14:22:55 +00:00
Cary Clark
89b1456b55 detect deprecated methods
If a method in an include is marked deprecated, make sure that
the documentation is marked deprecated.

It's OK for the documentation to mark something deprecated that
is not marked as such in the includes since the documentation may
be ahead of the includes.

Fix a couple of mistakes found around deprecated methods.

Docs-Preview: https://skia.org/?cl=114184
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I2bb4c293d7bf28e5d12f9ae01b7be49ce48b9ee4
Reviewed-on: https://skia-review.googlesource.com/114184
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-03-19 13:30:16 +00:00
Robert Phillips
fe0253f8bb Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy -specific flags
This CL:
  moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags
  adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags

  The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags
(i.e., isExternal & isRectangle) can be stored.

Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511
Reviewed-on: https://skia-review.googlesource.com/114796
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-19 12:21:05 +00:00
Herb Derby
76d69b44bb Apply filterTextFlags so the fonts are the same.
In order to apply filterTextFlags correctly, teach
TrackLayerDevice how to process save and restore layers.

At this point, I don't see any other traffic than the
cache warming traffic.

This code has a performance between 82% and 105% of just
drawing the picture.

BUG=skia:7515

Change-Id: I44736be46884f18b6d120d4b5ca582f34dbdff0f
Reviewed-on: https://skia-review.googlesource.com/114641
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-16 20:28:36 +00:00
Leon Scroggins III
af18f22da6 Make get_images_from_skps always return success
Previously, it would fail (and thus turn the bot red) if an image failed
to decode (e.g. with SkCodec::Result of kInvalidInput). This tends to
happen because the captured page had not fully downloaded yet. Stop
treating this an error. It may still be useful to test using SkCodec
just to be sure that we didn't crash, so keep running the test.

Change-Id: I1a0530fb82fa32d95c5f01d5131626745cf6c4f2
Reviewed-on: https://skia-review.googlesource.com/114582
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-03-15 21:13:26 +00:00
Robert Phillips
7f4419696b Make CreateBackendFormatFromTexture shared code
TBR=bsalomon@google.com
Change-Id: I19e6e6c8dc32ba584738545d443de092e4987a5a
Reviewed-on: https://skia-review.googlesource.com/114374
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-15 16:51:36 +00:00
Robert Phillips
7e6dafdfed Prepare ddl skp rendering for prime time
Change-Id: I87742b8ef043588c4e835ab6ec49b217dd49f829
Reviewed-on: https://skia-review.googlesource.com/114289
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-15 11:48:16 +00:00
Herb Derby
67c47f2329 Add glyph cache warming - prototype
A system for prewarming the cache using a single "RPC"
This improve performance by ~5X.

This is a checkin of rough code so I can use small
changes clean it up.

BUG=skia:7515

Change-Id: Id0192b4f533c257b0a7eea0170b1e25c336d6432
Reviewed-on: https://skia-review.googlesource.com/105440
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-03-14 18:50:39 +00:00
Greg Daniel
8a3f55c659 Revert "Improve handling of GrPixelConfig in GrBackendTex/RT ctors"
This reverts commit 7d2b16ad13.

Reason for revert: Maybe breaking chrome?

Original change's description:
> Improve handling of GrPixelConfig in GrBackendTex/RT ctors
> 
> Make sure that no client facing code was relying on what we set as the
> default value for fConfig by making in kUnkown.
> 
> Bug: skia:
> Change-Id: Ie52ff08ba8deeacc16fe06eb0dd0c7292b2edf91
> Reviewed-on: https://skia-review.googlesource.com/114261
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I91e190d72407f9c4bee93a031a557f740bb49b66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/114423
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-03-14 17:32:41 +00:00
Mike Reed
1be1f8d097 hide SkBlurMaskFilter and SkBlurQuality
SK_SUPPORT_LEGACY_BLURMASKFILTER

Bug: skia:
Change-Id: Ic3e27e08e6e3cd2ffc1cd13b044e197bebc96236
Reviewed-on: https://skia-review.googlesource.com/113940
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-03-14 17:27:36 +00:00
Greg Daniel
7d2b16ad13 Improve handling of GrPixelConfig in GrBackendTex/RT ctors
Make sure that no client facing code was relying on what we set as the
default value for fConfig by making in kUnkown.

Bug: skia:
Change-Id: Ie52ff08ba8deeacc16fe06eb0dd0c7292b2edf91
Reviewed-on: https://skia-review.googlesource.com/114261
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-03-14 14:12:42 +00:00
Brian Salomon
52e943a469 Add testing-only backend render target support to GrVkGpu.
Update unit tests to use backend render targets on non-GL contexts

Add named DM configs for rendering to Vulkan backend render targets and textures.

Make src data ptr param to createTestingOnlyBackendTexture be const.

Change-Id: I17f5375ed9bb08422006698956469d3151c4954c
Reviewed-on: https://skia-review.googlesource.com/113276
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-13 15:02:57 +00:00
Brian Osman
99b63400eb Remove use of deprecated MakeFromIRect
Bug: skia:
Change-Id: I793456c7a479d160a82bc613cbaf656f85bf6819
Reviewed-on: https://skia-review.googlesource.com/114081
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-03-13 14:57:53 +00:00
Brian Osman
c25e2693ab Fix several bugs in SkDebugCanvas/SkDrawCommand
This adds drawImageNine and drawRegion support, actually
serializes regions (badly) for clipRegion, and fixes bugs
in quite a few other draw commands (wrong op type, missing
factory registration, JSON attribute mismatch, etc...)

There are still some other draw virtuals missing, but even
getting Lattice to round-trip through JSON is going to be
a bunch of new code, and I didn't want to combine too much
new code with the fixes for existing bugs.

Change-Id: I13749a2d21f4a5ca5f5948b60fc11185bc46645f
Reviewed-on: https://skia-review.googlesource.com/113707
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-03-13 01:35:26 +00:00
Cary Clark
566414ef70 fail on mdout error
bookmaker sent mdout errors to stdout, but did not return
failure, fooling skia-commit-bot into thinking that the
md files should be updated.

Continue to report all mdout errors in a file, but fail
once the errors are reported.

TBR=rmistry@google.com

Bug: skia:6898
Change-Id: Ic342dd9a6e4aeea29626b52efe7d2c4e53da155e
Reviewed-on: https://skia-review.googlesource.com/113701
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-03-12 12:47:18 +00:00
Brian Osman
46fe9c7f6c Remove SkDumpCanvas
Bug: skia:
Change-Id: I045e84f154d0294121a4c1966dcf47c0d7e52934
Reviewed-on: https://skia-review.googlesource.com/113464
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-03-10 03:29:54 +00:00
Brian Salomon
0c51eeada6 Add GrMockRenderTarget and mock backend render targets
Change-Id: I59673dd7d0015471b7a81aa0c237c67043892454
Reviewed-on: https://skia-review.googlesource.com/113427
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-09 22:32:14 +00:00
Cary Clark
bbfda2583f add starting template support
some support for interfaces containing
template <typename x> class x
includeParser now correctly balances
bracket indentions and builds correct hierarchy.

Cross-check does not detect that the bmh definition
is missing the class; then includeWriter asserts
when the bmh class can't be found.

TBR=caryclark@google.com
Bug: skia:6898
Change-Id: Ibb70667ed4a6f8e553eec3924b56dfde737b4383
Reviewed-on: https://skia-review.googlesource.com/113460
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-03-09 20:57:50 +00:00
Mike Reed
43f0ba0730 update tool to sniff images during deserialization
Bug: skia:
Change-Id: I0162225772a5fe9849d3d51b2d1dd5d67c606097
Reviewed-on: https://skia-review.googlesource.com/113212
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-03-09 19:12:50 +00:00
Brian Salomon
26102cb604 Make GrGpu::deleteTestingOnlyBackendTexture() take const GrBackendTexture&
Change-Id: Ibd00d0dc6d8c73628f26851e102defdbafab149b
Reviewed-on: https://skia-review.googlesource.com/113164
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-09 18:20:40 +00:00
Greg Daniel
a8d9211bc3 Add promise images for deferred instantiation of wrapped gpu textures
This will allow a client to make an SkImage that "wraps" a gpu texture,
however the client does need to supply the actual gpu texture at Image
creation time. Instead it is retrieve at flush time via a callback.

Bug: skia:
Change-Id: I6267a55ab7102101a7bd80a6f547b6a870d2df08
Reviewed-on: https://skia-review.googlesource.com/109021
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-03-09 18:02:00 +00:00
Brian Salomon
afdc6b1ba9 Vulkan backend render targets don't allow client to specify stencil bits
We already always create the stencil buffer even for wrapped RTs.

Make VulkanWindowContext use SkSurface::MakeFromBackendRenderTarget.

Change-Id: I5df429d347331801954ec17cb9d75e323a7af345
Reviewed-on: https://skia-review.googlesource.com/113206
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-09 17:26:50 +00:00
Brian Salomon
f865b05fe5 Add GM configs that test rendering to a GL backend texture and render target
This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now.

Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90
Reviewed-on: https://skia-review.googlesource.com/113305
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-09 16:32:10 +00:00
Robert Phillips
5a66efbbab Remove GrRestrictedAtlasManager
Philosophically this relies on: https://skia-review.googlesource.com/c/skia/+/111807 (Revise Text & Small Path Atlas so instantiation failure is handled at flush time)

Change-Id: I4fdcf1af8c5e9ffefdfb973104045f4f5d223a4e
Reviewed-on: https://skia-review.googlesource.com/112702
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-08 14:29:11 +00:00
Brian Salomon
02bd2950e0 Make ProxyUtils::MakeTextureProxyFromData use wrapped textures when origin is kBottomLeft
This is to prepare for only supporting kBottomLeft origin for wrapped texture/render targets.


Change-Id: Iecb2e463867f746186695893276ebb5dc47a9d90
Reviewed-on: https://skia-review.googlesource.com/112860
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-07 21:23:30 +00:00
Stephan Altmueller
88df8d2e5a Test SKQP on Firebase Testlab and Upload
- adds building the testlab driver (run_testlab) as a separate step
- adds gcloud isolate necessary to run testlab
- adds Testlab support and uploading a verified AKP to GCS (with
  meta data attached).

Bug: skia:
Change-Id: I1bf265f46c99360eb3a9eb684886f93de48085fe
Reviewed-on: https://skia-review.googlesource.com/111603
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
2018-03-07 20:44:50 +00:00
Robert Phillips
d2e9f767bb Revise Text & Small Path Atlas so instantiation failure is handled at flush time
This paves the way to having the AtlasTextOps not need the RestrictedAtlasManager at op creation time.

Change-Id: I1028faba730d50d3d3349a4c0809465d036ed611
Reviewed-on: https://skia-review.googlesource.com/111807
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-07 19:25:10 +00:00
Brian Salomon
58389b90cd Initial texture data is never flipped when uploaded.
The first bytes of the data always refer to the pixel accessed by texture coord (0, 0).

Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a
Reviewed-on: https://skia-review.googlesource.com/112261
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-07 18:22:40 +00:00
Kevin Lubick
08b44fa497 Experiment with different settings for Pixel SKP bench
Bug: skia:7670
NOTRY=true
Change-Id: Ic3460c133b44d7fb323e80c9f8ce212fc0e2517c
Reviewed-on: https://skia-review.googlesource.com/111740
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-03-07 13:25:20 +00:00
Hal Canary
c5cf762177 Viewer/Amdroid: universal build, resources in APK
Change-Id: I57dda6e3329dbee720333b6e92142fce28f8dbd3
Reviewed-on: https://skia-review.googlesource.com/111940
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2018-03-06 22:52:10 +00:00
Robert Phillips
0c4b7b1f2f Move internal calls from GrContext to GrContextPriv
A mechanical bulk move just to get these out of the public API.

TBR=bsalomon@google.com
Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3
Reviewed-on: https://skia-review.googlesource.com/112262
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-06 14:23:45 +00:00
Brian Salomon
2a4f983c94 Remove GrSurfaceOrigin from GrSurfaceDesc.
This field has no interpretation at the GrTexture/GrGpu as the orientation is
handled at the GrSurfaceProxy level.

This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves.

Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772
Reviewed-on: https://skia-review.googlesource.com/111806
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-05 18:50:25 +00:00
Cary Clark
1a8d762a18 work in imageinfo and phrase substitution
This adds the ability to define long phrases
in one place and refer to those phrases in
many places.

Bookmaker has new syntax to support phrase substitution.
When it encounters

#some_phrase_reference#

It substitutes the body of

#PhraseDef some_phrase_reference
text to substitute when encountering the phrase
##

The phrase label must start with a lowercase letter,
and be bracketed by single hash marks, without spaces
between the label and the hash marks.

Docs-Preview: https://skia.org/?cl=111224
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I12c57d916ccedbd86b421377d117399150ada72a
Reviewed-on: https://skia-review.googlesource.com/111224
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-03-05 18:48:15 +00:00
Bryce Thomas
95a7b76a44 dm: support printing specific page of mskp to SVG
Currently with dm, it's possible to convert an .mskp to a multi-page PDF as
follows:

    out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
    --config pdf --verbose

The SVG equivalent partially works, although only outputs the first page:

    out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
    --config svg --verbose

This CL adds support for passing extended options to SVG.  Specifically, the
'page' option , which now determines which page of the source mskp gets
converted to the SVG output.  The new syntax is as follows:

    out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
    --config svg[page=2] --verbose

The `[key=value]` syntax is the same extended options syntax currently used by
dm with --config gpu, e.g. `gpu[api=gl,color=8888]`.

BUG=skia:7601

Change-Id: I3523d79b1cdbbba9e80fd46501331877091bdead
Reviewed-on: https://skia-review.googlesource.com/105404
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-03-02 22:20:19 +00:00
Brian Osman
10fc6fddf2 Revert "Revert "Add 1010102 support to Ganesh""
This reverts commit ded47a5014.

Bug: skia:
Change-Id: I7d7552e6ccc8591cae91426407ab13b628b93b68
Reviewed-on: https://skia-review.googlesource.com/111760
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-03-02 18:19:50 +00:00
Hal Canary
8080a6e705 SkQP: Host APK list on cloud; no more commits
No-Try: true
Change-Id: I7f77c828cba2aa3763d495bec86d016eb65cb485
Reviewed-on: https://skia-review.googlesource.com/111741
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-02 16:54:50 +00:00
Brian Osman
ded47a5014 Revert "Add 1010102 support to Ganesh"
This reverts commit 44b61204d9.

Reason for revert: TSAN bot crashing

Original change's description:
> Add 1010102 support to Ganesh
> 
> Adds gl1010102, gles1010102, vk1010102, and mtl1010102
> configs to DM.
> 
> This uses the same saveLayer approach as CPU, switching
> to 8888 so that we have enough alpha precision.
> 
> Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb
> Reviewed-on: https://skia-review.googlesource.com/110500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I782e740763044c1ae78fb219161e37eec7617c74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/111580
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-03-01 20:10:15 +00:00
Robert Phillips
1056eb821f Move atlas manager creation to GrContext derived classes (take 2)
TBR=bsalomon@google.com
Change-Id: Ie10b7e770e24104d10c36ce7882126dd8551a8ba
Reviewed-on: https://skia-review.googlesource.com/110822
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-01 19:41:04 +00:00
Kevin Lubick
4f16db62e5 [skpbench] experiment with not disabling services
Bug: skia:7670
Change-Id: I24ee36e1ac6bc97da8bb6dfaa3b7899190e4dbed
Reviewed-on: https://skia-review.googlesource.com/111302
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-03-01 19:28:44 +00:00
Robert Phillips
c4039ea466 Fission GrAtlasGlyphCache in two (take 2)
Reland all the things

This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager.

The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager)
and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation
time and provides access to the proxies backing the atlases. The full GrAtlasManager is
only available at flush time and allows instantiation of the proxies and uploading to them.

In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the
GrAtlasManager in the main thread. This future atlas manager will have had all of its
GrDrawOpAtlases created (but not instantiated) so there should be no race conditions.

TBR=jvanverth@google.com
Change-Id: I05c6cd8d301bf2decca39765e5cae62993d9da04
Reviewed-on: https://skia-review.googlesource.com/111362
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-01 19:09:14 +00:00
Brian Osman
44b61204d9 Add 1010102 support to Ganesh
Adds gl1010102, gles1010102, vk1010102, and mtl1010102
configs to DM.

This uses the same saveLayer approach as CPU, switching
to 8888 so that we have enough alpha precision.

Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb
Reviewed-on: https://skia-review.googlesource.com/110500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-03-01 18:34:35 +00:00
Robert Phillips
5c56af1790 Revert "Fission GrAtlasGlyphCache in two"
This reverts commit acf17904d6.

Reason for revert: Chrome

Original change's description:
> Fission GrAtlasGlyphCache in two
> 
> This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager.
> 
> The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager)
> and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation
> time and provides access to the proxies backing the atlases. The full GrAtlasManager is
> only available at flush time and allows instantiation of the proxies and uploading to them.
> 
> In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the
> GrAtlasManager in the main thread. This future atlas manager will have had all of its
> GrDrawOpAtlases created (but not instantiated) so there should be no race conditions.
> 
> Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08
> Reviewed-on: https://skia-review.googlesource.com/108001
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I7c760ea1a9f041a310b96d552aa1497ee5902cd8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/111040
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-28 16:37:47 +00:00
Robert Phillips
0551818a01 Revert "Move atlas manager creation to GrContext derived classes"
This reverts commit e5b7ceeac8.

Reason for revert: Breaking Mus/Viz tests in Chrome roll

Original change's description:
> Move atlas manager creation to GrContext derived classes
> 
> This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two)
> 
> TBR=bsalomon@google.com
> Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8
> Reviewed-on: https://skia-review.googlesource.com/110621
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I3973463b7b837145d9732171a91d82f0f0cea148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/110821
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-28 14:19:16 +00:00
Robert Phillips
e5b7ceeac8 Move atlas manager creation to GrContext derived classes
This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two)

TBR=bsalomon@google.com
Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8
Reviewed-on: https://skia-review.googlesource.com/110621
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-28 00:20:06 +00:00
Robert Phillips
acf17904d6 Fission GrAtlasGlyphCache in two
This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager.

The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager)
and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation
time and provides access to the proxies backing the atlases. The full GrAtlasManager is
only available at flush time and allows instantiation of the proxies and uploading to them.

In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the
GrAtlasManager in the main thread. This future atlas manager will have had all of its
GrDrawOpAtlases created (but not instantiated) so there should be no race conditions.

Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08
Reviewed-on: https://skia-review.googlesource.com/108001
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-02-27 22:05:55 +00:00
Hal Canary
84fdd4fcba SkQP: optionally build make_universal_apk with debug on.
* Respects SKQP_DEBUG=true.
  * Also, be more selective about cleaning. (So I can test on master.)
  * Also, stop using `gradlew --daemon`, which was getting confused
    when switching back and forth build types.

No-Try:true
Change-Id: Id93f77ab7831a82cad9a3a64dbb8a93af4757d57
Reviewed-on: https://skia-review.googlesource.com/108222
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
2018-02-27 20:42:29 +00:00
Cary Clark
f895a420c9 work on skimageinfo
work on skimageinfo

Docs-Preview: https://skia.org/?cl=109081
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I4d1734647ef1fa879d08b04c64142c7f16abc858
Reviewed-on: https://skia-review.googlesource.com/109081
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-02-27 15:12:59 +00:00