Commit Graph

1549 Commits

Author SHA1 Message Date
Brian Salomon
c512eae566 Add GM for crbug.com/938592
Bug: chromium:938592
Change-Id: I317c13c6f81c54989267325061bcb1c57428f478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200043
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-11 20:49:42 +00:00
Brian Salomon
8b40ac35b2 Reintroduce deinstantiate lazy proxy types and use for promise images.
This reverts a fraction of b2c5dae65d to
restore the deinstantiate lazy proxy type, supporting implementation,
and tests.

Use them for promise images to avoid thread safety issues for promise
image resources. Makes promise image instantiation callbacks do a thread
safe unref of their fulfilled GrTexture in GrResourceCache. The
GrResourceCache mechanism for receiving unref messages is extended to
allow multiple pending unrefs. All this is new.


Bug: skia:8800
Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-03-11 20:48:22 +00:00
Michael Ludwig
e6266a2d16 Handle arbitrary and degenerate quadrilaterals in GrQuadPerEdgeAA
Updates the handling of perspective quads to calculate the correct,
degenerate-safe projected quad and then derive from that the proper
perspective quad.

In 2D, updated to determine if the optimized outset/inset procedure
is valid, and if not goes through a more robust procedure that is
based on line equation intersections. In particular, the degenerate
inset/outset approach is used when the quad has a zero-length edge,
if insetting/outsetting normally would create a self-intersecting shape,
or if near parallel edge angles would create numerical instabilities.

Performance testing by forcing all rectangle draws through the degenerate
code path suggests that it is about 10% slower than the optimal approach,
at least on my workstation...

Bug: skia:
Change-Id: I2973da8d97949eacebb09a1b27c334d62c1c948e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/194008
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-03-11 20:04:03 +00:00
Stan Iliev
12b8916866 Export libvulkan headers for android libraries depending on skia
Test: Ran gn_to_bp.py and built Android
Bug: b/123953909
Change-Id: Icfb7f5d6ff55f4837d1d227cb2956530d492c745
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199920
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2019-03-11 19:31:35 +00:00
Robert Phillips
d40dc3f81b Revert "Always explicitly allocate except in Android Framework"
This reverts commit e157745dfc.

Reason for revert: Too exciting

Original change's description:
> Always explicitly allocate except in Android Framework
> 
> This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
> 
> 
> Change-Id: Idc02985e52f074894a251c7335ef00b009c72ccd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199725
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Icb097844de6db92e8151c81616a758837ecd9dfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199929
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-11 18:41:22 +00:00
Robert Phillips
e157745dfc Always explicitly allocate except in Android Framework
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.


Change-Id: Idc02985e52f074894a251c7335ef00b009c72ccd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199725
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-03-11 17:22:31 +00:00
Chris Dalton
d7291ba7a1 Restore support for multisample locations
Bug: skia:
Change-Id: I971455867e54d431cc1094fca041f773f78748ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196218
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-07 22:00:48 +00:00
Florin Malita
93092ff457 Make SkCubicMap public
Bug: skia:8803
Change-Id: I3aa0814d538d95dc3a5a1034993b823d2151ab85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/193961
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-03-06 19:58:28 +00:00
Hal Canary
2a3093c154 SkPDF: Add experimental Harfbuzz font subsetter
Currently hidden behind gn flag:  skia_pdf_subset_harfbuzz

Replaces Sfntly subsetter.

TODO:
  1) Test on all clients.
  2) Enable on each client.
  3) Set skia_pdf_subset_harfbuzz default to true,
  4) Delete sfntly dependency.

Bug: chromium:931719
Change-Id: I5c763ce3e6b21d6bc65284d4105b9974e0907cdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/171223
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-03-06 16:30:56 +00:00
Greg Daniel
39847ccfd0 Add unit test to check if we can create a VkDevice using global priority extension.
Bug: b/126595186
Change-Id: I0a23ca2a7cc47bd02bb535566aa37627899249ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197201
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-03-05 18:57:13 +00:00
Leon Scroggins III
631dbc82f0 Fix Android host-side Windows build
Bug: b/123085931
Bug: b/117921091

Based on ag/6614841

Don't use the default Windows FontMgr/FontHost. Android will
handle fonts.

Remove _HAS_EXCEPTIONS=0, which was added by gn/BUILD.gn

Change-Id: I93a72a550b2dbb9adc498638853f6e95c5d4e94f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197041
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-03-05 18:57:07 +00:00
Ethan Nicholas
a70693b234 Add support for runtime color filters written in SkSL.
Bug: skia:
Change-Id: I9b930e81cff1c656908125dcf900279f73570204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/195581
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-05 16:03:25 +00:00
Florin Malita
6041d315c7 Reland "SkMixerColorFilter GPU impl"
This reverts commit c2949ec67b.

Reason for revert: not related to crossfade

Original change's description:
> Revert "SkMixerColorFilter GPU impl"
> 
> This reverts commit e80f7eb9d6.
> 
> Reason for revert: break crossfade in chrome roll?
> 
> Original change's description:
> > SkMixerColorFilter GPU impl
> > 
> > Bug: skia:
> > Change-Id: Ia1e25e0c99737d9720c17f92f0d76a1cb7897ea8
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/193163
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,ethannicholas@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: Ib9464fcabc649b95ba131146690d6208af728436
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197760
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Ie96e80e153aeab16c4ea35d5f1350372060228aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197763
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-03-05 15:03:34 +00:00
Mike Reed
c2949ec67b Revert "SkMixerColorFilter GPU impl"
This reverts commit e80f7eb9d6.

Reason for revert: break crossfade in chrome roll?

Original change's description:
> SkMixerColorFilter GPU impl
> 
> Bug: skia:
> Change-Id: Ia1e25e0c99737d9720c17f92f0d76a1cb7897ea8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/193163
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Ib9464fcabc649b95ba131146690d6208af728436
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-03-05 14:45:08 +00:00
Brian Salomon
b2c5dae65d Simplify promise image lazy instantiation callbacks.
Now that we never re-fulfill a promise image we no longer need to deinstantiate
promise image proxies. They now can use kSingleUse callback semantics.

This was the only usage of the kDeinstantiate lazy callback type so it is
removed. The DeinstantiateProxyTracker is also no longer required and is
removed.

The GrTexture idle callback mechanism now uses GrReleaseProcHelper, which has
been extended to support chaining multiple callbacks together and an abandon()
method that aborts calling the callback in the destructor. It has been renamed
GrRefCntedCallback to reflect its more general usage.

Bug: skia:8800
Change-Id: I857c9eec57fdf706631a266ec8bea682d6657a7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196500
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-03-05 13:18:22 +00:00
Florin Malita
e80f7eb9d6 SkMixerColorFilter GPU impl
Bug: skia:
Change-Id: Ia1e25e0c99737d9720c17f92f0d76a1cb7897ea8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/193163
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-05 11:35:47 +00:00
Herb Derby
0f27b5ee2b Introduce SkStrikeCacheInterface
Introduce SkStrikeCacheInterface in order to move from a
template a based interface on SkGlyphRunListPainter to
a class based interface.

Change-Id: Ib15e437420c00f4e11242ac1a4d8a87ee2af9ee1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197101
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-03-04 21:59:30 +00:00
Florin Malita
a9a3dccf55 solink with --start-group/--end-group
(based on https://skia-review.googlesource.com/c/skia/+/145529/)

Bug: skia:
Change-Id: Id8fb7dd706748f9ad602cc35a4e0d9b87ca97e00
Reviewed-on: https://skia-review.googlesource.com/c/196381
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-28 16:44:00 +00:00
Leon Scroggins III
ee0e5d0cd9 Enable Skia for Windows
Bug: b/117921091
Bug: b/123085931
Test: mmma external/skia

Based on ag/6098473. Generate an SkUserConfig for Windows, and update
Android.bp with Windows in mind. Disable xps on Windows, as the
Android Windows build system does not provide FontSub.h

Change-Id: I755d225004ccbe273099889fea8dda01d23d03fc
Reviewed-on: https://skia-review.googlesource.com/c/195881
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Jerome Gaillard <jgaillard@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2019-02-28 16:11:33 +00:00
Mike Klein
b7b2da871e set -fcolor-diagnostics when is_clang
I've been setting this in extra_cflags for a couple years...
maybe it's time everyone gets color in their warnings.

Change-Id: I1fed38a521fe9331b60fbb0688d39b5188a86aca
Reviewed-on: https://skia-review.googlesource.com/c/196360
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-28 15:19:30 +00:00
Hal Canary
ed53505b43 gn/core.gni: add headers
motivation: add more headers to gen/skia.h

Change-Id: I23064ca37afa66123ad00059c1382b906b44cd9e
Reviewed-on: https://skia-review.googlesource.com/c/195362
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-02-26 16:39:05 +00:00
Ben Wagner
7465943b1e Remove fuzz samples.
We now have a real fuzzer, and these samples only run on local dev
machine anyway, so their current utility is quite low since they don't
demonstrate any specific behavior.

Bug: skia:8259
Change-Id: If44a0eaa161b1d7688dd3de6431414a84b7bd6c6
Reviewed-on: https://skia-review.googlesource.com/c/194862
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-25 16:55:26 +00:00
Kevin Lubick
867da4b96e Allow system harfbuzz.
This should allow shaper to run on the no-deps bot.

Change-Id: I2515875d4e9b428681c20877630b904c3229ecc5
Reviewed-on: https://skia-review.googlesource.com/c/194420
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-23 12:14:30 +00:00
Mike Reed
e36d408b26 add gm to test backdrop blurs and clipping/hintrects
Bug: skia:8783
Change-Id: I27907673d4a5e1f8c5c0b26c704da367e0437a79
Reviewed-on: https://skia-review.googlesource.com/c/194190
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-02-22 22:28:50 +00:00
Ethan Nicholas
ee1c8a733e Revert "Revert "SkSL now supports null child processors""
This reverts commit bce7d86270.

Bug: skia:
Change-Id: I3ccaf47b3d4b9dcb9e049671117183a374526032
Reviewed-on: https://skia-review.googlesource.com/c/194185
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-02-22 17:50:30 +00:00
Kevin Lubick
1ba9c4df77 [canvaskit] JS API in place for shaped text
Depends on https://skia-review.googlesource.com/c/skia/+/186870

It's optional at build time, which is good given that
it adds about 2MB of uncompressed size (from 4.3 MB to 6.4 MB)

Bug: skia:
Change-Id: I5f54ad628b735c3bc880e917394fb27d16849ebe
Reviewed-on: https://skia-review.googlesource.com/c/187924
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-22 15:39:55 +00:00
Mike Reed
1b8aa7226e add test for mac aa on fonts
Bug: skia:
Change-Id: I93b18ee84345e27eb5cf3a94feccb35391ac0e71
Reviewed-on: https://skia-review.googlesource.com/c/193661
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-02-21 15:04:01 +00:00
Michael Ludwig
009b92e3aa Add general quad factories to GrFillRectOp and GrTextureOp
Bug: skia:
Change-Id: I1f9e9013d20496554891b72749ed9b0844747566
Reviewed-on: https://skia-review.googlesource.com/c/191570
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-02-19 15:11:02 +00:00
Florin Malita
346ce63daa Add a SkMixerColorFilter GM
Change-Id: I26382a669601f2bebb1f95e56eab2ad3718db4b9
Reviewed-on: https://skia-review.googlesource.com/c/193165
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-17 14:31:30 +00:00
Florin Malita
f2965060c3 add mixer colorfilter
BUG=skia:

Change-Id: Icbee96056b17c5396a9d3783055ddd0b7d4fd3ff
Reviewed-on: https://skia-review.googlesource.com/c/9514
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-15 19:22:33 +00:00
Hal Canary
b6f5378333 SkShaper: enable for unit and render tests
New tests that use skshaper should hide behind SK_USING_SKSHAPER define.

Change-Id: Ifcd726d931e3eb1ff209085a63e8129c9cd5596d
Reviewed-on: https://skia-review.googlesource.com/c/192026
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-13 16:19:48 +00:00
Mike Reed
ec80d901b9 starter sample for playing with SG.
will flesh out more over time.

Bug: skia:
Change-Id: If5eaf0a7c404b9209b93871eb3ac3d74da8c65dd
Reviewed-on: https://skia-review.googlesource.com/c/191003
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-02-12 17:03:40 +00:00
Mike Klein
0e83da8646 turn on -Wextra-semi-stmt on Windows
Just a few strays.

Change-Id: Ib209bc8dd228850b837b850dce14967a2112593e
Reviewed-on: https://skia-review.googlesource.com/c/191161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-11 16:50:09 +00:00
Brian Salomon
1f05d459e2 Add GrContext::resetGLTextureBindings().
This function binds texture ID 0 to any texture unit/target combo that
Skia has modified.

Bug: chromium:926017
Change-Id: I3ac8f8050c863232886102886e60d3b91a5380c9
Reviewed-on: https://skia-review.googlesource.com/c/190663
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-02-08 21:26:51 +00:00
Mike Klein
764f25a3c5 remove a couple more jsoncpp deps
Presumably if we don't need these in Skia,
we don't need them in Android?

Change-Id: Iff18066c1c2a52c999beabbd9239d4bc96d0ba6d
Reviewed-on: https://skia-review.googlesource.com/c/190438
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-02-08 15:17:26 +00:00
Eric Boren
56bf8ce97b Roll third_party/externals/angle2 a54104803d72..52d861bd49cc (8 commits)
a54104803d..52d861bd49


git log a54104803d72..52d861bd49cc --date=short --no-merges --format='%ad %ae %s'
2019-02-02 syoussefi@chromium.org Disable -Wextra-semi-stmt
2019-02-02 ianelliott@google.com Implement EGL_ANDROID_recordable for Vulkan back-end.
2019-02-01 jonahr@google.com Fix unnecessary copy of for loop variables in ANGLE
2019-02-01 syoussefi@chromium.org Use env variable to select default backend
2019-02-01 jmadill@chromium.org Enable -Wextra-semi and -Wextra-semi-stmt.
2019-02-01 syoussefi@chromium.org Initial support for compiler AST validation
2019-02-01 jmadill@chromium.org Roll glslang.
2019-02-01 ckulakowski@opera.com Fix for linking of non-component angle_unittests


Created with:
  gclient setdep -r third_party/externals/angle2@52d861bd49cc

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=borenet@google.com

Change-Id: I008df064f6301658404c371cf47a5656d8c11621
Reviewed-on: https://skia-review.googlesource.com/c/188852
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-02-08 12:34:36 +00:00
Robert Phillips
e8345793c6 Make room for shifting GrContext to GrDirectContext
Change-Id: I6291b0c513c641c3bb49260031b501da42b11ede
Reviewed-on: https://skia-review.googlesource.com/c/190002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-07 19:24:07 +00:00
Brian Salomon
dbf7072a59 Use different classes for client side arrays and GPU buffer objects.
GrBuffer is a base class for GrGpuBuffer and GrCpuBuffer. GrGpuBuffer is a
GrGpuResource and the others are not. This allows GrCpuBuffers to exist
outside of the GrGpuResourceCache.

Also removes flags from GrResourceProvider buffer factory function. The
only flag still in use was kRequireGpuMemory. Now CPU buffers are made
without using GrResourceProvider.

Change-Id: I82670d1316e28fd6331ca36b26c8c4ead33846f9
Reviewed-on: https://skia-review.googlesource.com/c/188823
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-02-07 18:04:15 +00:00
Greg Daniel
173464da34 Add support for importing AHardwareBuffers into SkSurfaces.
Bug: skia:
Change-Id: I0a3b3d607e1b74787480b03520a07839c87486dc
Reviewed-on: https://skia-review.googlesource.com/c/189980
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-02-07 15:03:50 +00:00
Mike Reed
88f5671f71 move SkMetaData into src
Bug: skia:
Change-Id: I3ef8c3ec0d6f33bd9a167b99313d6d313a748494
Reviewed-on: https://skia-review.googlesource.com/c/189284
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-02-07 00:26:49 +00:00
Hal Canary
c1a2ea33a3 bin/gn format gn/skia.gni
Change-Id: Id79cf08223d46d2f2558693208d7cb8a82d6d0a5
Reviewed-on: https://skia-review.googlesource.com/c/190001
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-06 22:24:19 +00:00
Hal Canary
6102192b96 SkLoadICU: simplify
Change-Id: I98cd1f36ca96a92b72974ae228465199638e4bea
Reviewed-on: https://skia-review.googlesource.com/c/189864
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-06 21:20:49 +00:00
Robert Phillips
dbaf317cd4 Move GrContextPriv methods to their own .cpp file
Centralize these for my sanity. Most will also be parceled out to other contexts.

Change-Id: If0e7e98bcf66c4d8a3391f9b04e643ccc91af4ad
Reviewed-on: https://skia-review.googlesource.com/c/189488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-06 21:15:58 +00:00
Mike Reed
cc88f3a72d per-contour variant of SkPathMeasure
Bug: skia:8721
Change-Id: I1e79a49dee25ccc9138baf6fb2df3dc80d1ff66b
Reviewed-on: https://skia-review.googlesource.com/c/187922
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-02-06 18:21:22 +00:00
Mike Klein
455c74797b sketch SkVx
Change-Id: I1cb8113af243ed6327179d295835295834a752aa
Reviewed-on: https://skia-review.googlesource.com/c/189581
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-02-06 16:06:32 +00:00
Florin Malita
0c2add016d Revert "third_party/icu: use upstream"
This reverts commit e6cfe77185.

Reason for revert: Android & Win7 perf/test failures.


Original change's description:
> third_party/icu:  use upstream
> 
>     Change DEPS to point at upstream, not chromium's fork.
>     `skia_use_icu` defaults to true everywhere but iOS
>     Clean up SkLoadICU:  use U_ICUDATA_ENTRY_POINT, no DLL.
>     Add data dep to icu/icu.gni
>     Scripts: icu/{make_data_assembly.py,make_data_obj_win.py}
>     Scripts: icu/{update_icu.sh,build_icu_data_file.py} for rebuilding
>     document process in icu/README.md
> 
> Bug: skia:8702
> Change-Id: I99789749ba84ae737f6c62475d0d676cd36715bb
> Reviewed-on: https://skia-review.googlesource.com/c/186870
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com,fmalita@chromium.org,fmalita@google.com

Change-Id: Id379bc2be7d53eca67b2c557ac20bd44073a6258
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8702
Reviewed-on: https://skia-review.googlesource.com/c/189647
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-06 02:28:30 +00:00
Hal Canary
e6cfe77185 third_party/icu: use upstream
Change DEPS to point at upstream, not chromium's fork.
    `skia_use_icu` defaults to true everywhere but iOS
    Clean up SkLoadICU:  use U_ICUDATA_ENTRY_POINT, no DLL.
    Add data dep to icu/icu.gni
    Scripts: icu/{make_data_assembly.py,make_data_obj_win.py}
    Scripts: icu/{update_icu.sh,build_icu_data_file.py} for rebuilding
    document process in icu/README.md

Bug: skia:8702
Change-Id: I99789749ba84ae737f6c62475d0d676cd36715bb
Reviewed-on: https://skia-review.googlesource.com/c/186870
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-02-05 22:22:48 +00:00
Hal Canary
32498f0846 GN/ICU cleanup
For targets that depend on ICU, only define if `skia_use_icu` is set.

Move declare_args/skia_use_icu into skia.gni.  Other variables that need
to work like that can move there later.

icu/BUILD.gn defines SK_USING_THIRD_PARTY_ICU if needed.
SkShaper_harfbuzz.cpp SkPDFSubsetFont.cpp respects
SK_USING_THIRD_PARTY_ICU when calling SkLoadICU().

sfntly/BUILD.gn, harfbuzz/BUILD.gn, icu/icu.gni uses $_src variable to
reduce verbosity.   icu/icu.gni adds more headersto sources.

Change-Id: I9e000b9b19902d9f5c0c64e989bf42466aa8a299
Reviewed-on: https://skia-review.googlesource.com/c/189304
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-02-05 17:27:55 +00:00
Brian Osman
50ea3c06b8 Add support for MSVC run-time checks (and control flow guard)
This enables four different options in the compiler, described
below. I also added enough masks to satisfy RTCc when running
all GMs in both 8888 and gl configs.

---

/RTCc - Detects when a value is assigned to a smaller data
type and results in data loss. This happens even when casting.
Masking is required to suppress this.

/RTCs - Various stack-related checks, including uninitialized
data (by initializing locals to a non-zero value), array bounds
checking, and stack pointer corruption that can occur with a
calling convention mismatch.

/RTCu - Reports when a variable is used without having been
initialized. Mostly redundant with compile-time checks.

/guard:cf - This is more of a security option, that computes
all possible targets for indirect calls at compile time, and
verifies that those are the only targets reached at compile
time. Also generates similar logic around switch statements
that turn into jump tables.

Bug: skia:
Change-Id: I7b527af8fd67dec0b6556f38bcd0efc3fd505856
Reviewed-on: https://skia-review.googlesource.com/c/188625
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-02-04 20:55:24 +00:00
Herb Derby
2e845910be Benchmark for charToGlyph
Change-Id: Id8c7a37c62b596b9f73e331d9a3e36ccd3a51513
Reviewed-on: https://skia-review.googlesource.com/c/188461
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-02-04 18:03:52 +00:00