Commit Graph

3357 Commits

Author SHA1 Message Date
Greg Daniel
92aef4b125 Support using vulkan 1.1.
Bug: skia:
Change-Id: Ic1fc109557f64c748c9ba5427b400795dbde7250
Reviewed-on: https://skia-review.googlesource.com/137882
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-08-02 18:37:02 +00:00
Greg Daniel
3644360c8d Have GrVkBackendContext take a VkPhysicalDeviceFeatures struct.
Bug: skia:
Change-Id: Ic7992c89c06789ee631c9f5b4f047c6486e792a5
Reviewed-on: https://skia-review.googlesource.com/137390
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-02 17:24:48 +00:00
Greg Daniel
a31f4e51d5 Make sure we check the version number of Vulkan Extensions.
Bug: skia:
Change-Id: Iff02911491cc61e39f94370c644b6666e5f9118f
Reviewed-on: https://skia-review.googlesource.com/137881
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-02 14:57:45 +00:00
Greg Daniel
98bffae9c1 Reland "Reland "Let client pass in full extension to GrVkBackendContext.""
This reverts commit dc13c21b1e.

Reason for revert: fuchsia should be fixed

Original change's description:
> Revert "Reland "Let client pass in full extension to GrVkBackendContext.""
> 
> This reverts commit a782dcb3c4.
> 
> Reason for revert: fuchsia changes reverted
> 
> Original change's description:
> > Reland "Let client pass in full extension to GrVkBackendContext."
> > 
> > This reverts commit cb92b26e5c.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Revert "Let client pass in full extension to GrVkBackendContext."
> > > 
> > > This reverts commit 45c9dab4c3.
> > > 
> > > Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
> > > 
> > > Original change's description:
> > > > Let client pass in full extension to GrVkBackendContext.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> > > > Reviewed-on: https://skia-review.googlesource.com/131880
> > > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > > 
> > > Change-Id: I1a765ff406c83cb234c3614b804fbed677d5a382
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/137901
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: I0af797c51dde705473e9afaccb1d4b4423e8c41e
> > Reviewed-on: https://skia-review.googlesource.com/138302
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> Change-Id: Idf760d5ac6b82df33a4408079a0223be833058ad
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138420
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: Ied1323b7197b600e895d85ac7e85d6f65985dabc
Reviewed-on: https://skia-review.googlesource.com/139002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-08-01 19:40:45 +00:00
Hal Canary
972eba3c5c sk_tool::Registry: make an iterator.
Change-Id: Icf4e31b50bbd91b7ea330a1300f736d6dfd0a41c
Reviewed-on: https://skia-review.googlesource.com/144500
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-08-01 16:59:19 +00:00
Greg Daniel
da16cce7d9 Use our own checked in Vulkan header to build skia source code.
Core Skia will always include our own SkiaVulkan.h which basically just
includes vulkan_core.h. All platform vulkan specific stuff must be
include by the client in their own vulkan.h file. Our public interface
is set up that we only use vulkan objects that will be present in all
versions of vulkan headers that the client could include.

Bug: skia:
Change-Id: I6673fd91498eabcc923d65d20f2b5e0a89b4ccf6
Reviewed-on: https://skia-review.googlesource.com/142985
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-01 16:52:20 +00:00
Florin Malita
5d3ff438fe Fix !defined(SK_XML) builds
Add guards for dependent code.

TBR=
Change-Id: I49c0c90a2defc6f39589721f95562e9e0f17db13
Reviewed-on: https://skia-review.googlesource.com/144610
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-08-01 14:28:56 +00:00
Greg Daniel
d3e65aa758 Move GrVkInterface out of public API.
Bug: skia:
Change-Id: I8b73982e4c9372af1c35bfc5e665c2c146d7d9f5
Reviewed-on: https://skia-review.googlesource.com/141121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-01 13:45:55 +00:00
Mike Reed
6cfa297382 remove conditional flags for sksg -- not needed for a module
Bug: skia:
Change-Id: I1b73379bd8a1ba2cd4293180052ba7ad59dfe96f
Reviewed-on: https://skia-review.googlesource.com/144642
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-07-31 22:27:20 +00:00
Hal Canary
f107a2fd01 SkUTF
Create new header and namespace, `SkUTF` where we are putting all of our
robust, well documented UTF-8, UTF-16, and UTF-32 functions:
`SkUTF::{Count,Next,To}UTF{8,16,32}()`.

SkUTF.h and SkUTF.cpp do not depend on the rest of Skia and are suitable
for re-use in other modules.

Some of the old UTF-{8,16} functions still live in SkUtils.h; their use
will be phased out in future CLs.

Also added more unit testing and cleaned up old tests.

Removed functions that were unused outside of tests or used only once.

Change-Id: Iaa59b8705abccf9c4ba082f855da368a0bad8380
Reviewed-on: https://skia-review.googlesource.com/143306
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-07-31 20:11:19 +00:00
Brian Osman
62501c12c8 Remove unused 'create_flutter_test_images' tool
Change-Id: I9be9e8d72168c90b681015be0b5f599a6243abd2
Reviewed-on: https://skia-review.googlesource.com/144341
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-30 16:19:44 +00:00
Brian Osman
b63f6005c1 Add 'u' to zoom stats display on high DPI devices
Still need to connect this to ImGui, but this is already useful

Bug: skia:
Change-Id: I925c7a9d6236cb2d865d45d6a68a5709bf2e3df7
Reviewed-on: https://skia-review.googlesource.com/143158
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-30 15:00:25 +00:00
Mike Klein
7af351a68c add imgcvt
This uses skcms to convert an image into a PNG with a new color profile.

Change-Id: Iaefdbbfba6f4b85637386569a65355df255b980d
Reviewed-on: https://skia-review.googlesource.com/143709
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2018-07-27 15:11:17 +00:00
Florin Malita
ab54e7394d Hide SkTextBlob::GlyphPositioning from public API
Make private, add corresponding SkTextBlobRunIterator enum.

Also move SkTextBlobRunIterator to SkTextBlobPriv.h.

Change-Id: If3e0beabb0e8484b1ac73c6fc0827e920ca1f93b
Reviewed-on: https://skia-review.googlesource.com/142501
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-07-27 14:10:17 +00:00
Chris Dalton
9acfc6cac2 Add kAAHairline to GpuPathRenderers
With the upcoming ccpr stroking, this will no longer be the only path
renderer that can handle hairlines.

Bug: skia:
Change-Id: I45b30ccd578bee1388a3a07a234af76a19768de6
Reviewed-on: https://skia-review.googlesource.com/142272
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-27 13:30:17 +00:00
Mike Klein
48b649060c remove SkThreadedBMPDevice and friends
It is unused, is becoming a maintainence burden and source of bugs,
and takes up a lot of time on the *SAN bots.

Change-Id: If383eb6e4838ca23140f9e16d518b1bfc655fa12
Reviewed-on: https://skia-review.googlesource.com/143307
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-07-25 18:17:26 +00:00
Hal Canary
4014ba6ec7 SkUtils: remove some versions of UTF routines.
Change-Id: Ib1f776ae472117c23d2145253adf25fceb412b32
Reviewed-on: https://skia-review.googlesource.com/143111
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-07-25 17:21:56 +00:00
Ruiqi Mao
46656e298b added options to enable caching and draw bounds in NIMA slide
Bug: skia:
Change-Id: I30fed2c0587f36aeccd5e366b823a8b044a371ea
Reviewed-on: https://skia-review.googlesource.com/142164
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-07-20 18:47:26 +00:00
Brian Osman
a76b7a9ded More color space improvements to DM
Added P3 configs (tagged surface and SkColorSpaceXformCanvas)

Added logic to tag the output PNGs when using a xform canvas,
so the images look correct in Chrome (and work correctly with
skdiff).

We don't use the gamma_correct tag for much in gold, but only
set it for outputs with a linear transfer function.

Change-Id: Iee713682e5010b0bd3212538a6dcb201ae4e8592
Reviewed-on: https://skia-review.googlesource.com/142170
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-19 21:04:56 +00:00
Eric Boren
8c172ba397 [infra] Add infra support for Lottie
Bug: skia:8136
Change-Id: I18c4ad549c52346ebfe23d172597d5da205e5c4d
Reviewed-on: https://skia-review.googlesource.com/142105
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2018-07-19 17:53:25 +00:00
Ben Wagner
7c0998a130 Revert "Add kAAHairline to GpuPathRenderers"
This reverts commit 880b9d302f.

Reason for revert: Appears to be breaking serialization.
See https://ci.chromium.org/raw/build/logs.chromium.org/skia/20180718T201711.486335899Z_000000000077bbff/+/annotations

Original change's description:
> Add kAAHairline to GpuPathRenderers
> 
> With the upcoming ccpr stroking, this will no longer be the only path
> renderer that can handle hairlines.
> 
> Bug: skia:
> Change-Id: Idf2543f053c8603c80fcd647ca18ffd9860a85f3
> Reviewed-on: https://skia-review.googlesource.com/142246
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I1967c2cf6b1f1307270bf62bb04130cdf84317b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/142280
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-18 21:24:22 +00:00
Chris Dalton
880b9d302f Add kAAHairline to GpuPathRenderers
With the upcoming ccpr stroking, this will no longer be the only path
renderer that can handle hairlines.

Bug: skia:
Change-Id: Idf2543f053c8603c80fcd647ca18ffd9860a85f3
Reviewed-on: https://skia-review.googlesource.com/142246
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-07-18 19:57:52 +00:00
Cary Clark
d789550da4 add more fiddle hash checks
Convert some of bookmaker to use real json instead
of rolling its own. Also check to see if all
hashes are read.

TBR=jcgregario@google.com

Docs-Preview: https://skia.org/?cl=142166
Bug: skia:8151
Change-Id: Ib35ecd69648faec3522903e0b552d37b04b73f8b
Reviewed-on: https://skia-review.googlesource.com/142166
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-07-18 19:42:52 +00:00
Brian Osman
9889c24ec6 Add color space logic to skdiff
By default, decode images to a common color space (sRGB) before comparing.
This lets us compare images rendered to different gamuts (eg sRGB or P3),
where the raw pixel values are wildly different, even though the colors
being described are actually the same (or very similar).

Add a "--nocolorspace" option to get the existing behavior of comparing
the raw pixel values.

Also removed the source code for skimagediff, which hasn't been built in
a long time.

Change-Id: Ic55724b523348421bf21e9764d155730b94fc40a
Reviewed-on: https://skia-review.googlesource.com/141962
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-07-18 17:13:46 +00:00
Brian Salomon
36bdc09078 Add valgrind suppression for leak in libGLX_nvidia when caching program binaries
Change-Id: Id6d32811c59b5d37579a1c1bf0f42e85d951d45f
Reviewed-on: https://skia-review.googlesource.com/141821
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-18 16:43:51 +00:00
Ben Wagner
d5148e3314 Move SkNoncopyable to include/private.
Change-Id: I62f60ea52faeebddecacf03d9429ac3f7c516b8e
Reviewed-on: https://skia-review.googlesource.com/141823
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-07-17 21:39:51 +00:00
Robert Phillips
a8cdbd7431 Restore SkLightingShader and associated classes
This reverts https://skia-review.googlesource.com/c/skia/+/31140 (Remove SkLightingShader and associated classes) and updates the classes to ToT

Change-Id: I3b1df1704cca8907aa00f081a7e93339b65ad4fa
Reviewed-on: https://skia-review.googlesource.com/141545
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-17 17:24:50 +00:00
Cary Clark
f960398f33 polish picture and rrect docs
TBR=caryclark@google.com

Docs-Preview: https://skia.org/?cl=141263
Bug: skia:6818
Change-Id: I33a197892b3dd5788499dda9dd9e95ddab861388
Reviewed-on: https://skia-review.googlesource.com/141263
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-07-17 12:47:40 +00:00
Brian Salomon
7fc52996c6 Test GrContextOptions persistent cache on linux/quadrop400 bots.
Change-Id: I181ed6d294774a9c6886fde8252bfdde99adc572
Reviewed-on: https://skia-review.googlesource.com/140982
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-16 19:09:19 +00:00
Weiliang Chen
1e04b3659c Reland: Check for ANGLE's implementation of texture_rectangle
ANGLE has implemented extension to support for texture_rectangle. Check
for its existence as well as GL_ARB_texture_rectangle extension.

Intended to follow up on Chrome side to avoid copy into texture 2d for
PaintCanvasVideoRenderer.

Bug: skia:7903

Origin change's info:
> Change-Id: I450aa7fcd08628831251a9e142fd50719723282d
> Reviewed-on: https://skia-review.googlesource.com/130962
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Weiliang Chen <weiliangc@chromium.org>

Change-Id: Ifec92bdc07ec2b2dae38ffe99ec275924cbd37d8
Reviewed-on: https://skia-review.googlesource.com/139272
Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-13 19:18:34 +00:00
Ben Wagner
83c6b96bcd Improve SkTestFontMgr.
This moves the portable typefaces into the portable font manager.

Change-Id: Id25e8f0b90f99c82d09cfb3ef136bda8c7728ee9
Reviewed-on: https://skia-review.googlesource.com/140351
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-13 15:01:04 +00:00
Cary Clark
390495eb8d fix bookmaker
make SkImage::makeColorSpace include match docs.

R=brianosman@google.com

Docs-Preview: https://skia.org/?cl=141086
Bug: skia:6818
Change-Id: Ica65effdd05c2d8d731d1d1773fb80798be0274b
Reviewed-on: https://skia-review.googlesource.com/141086
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-07-13 14:06:24 +00:00
Cary Clark
ab5c9af442 fix include generation
Over zealous requirement to have periods at end
of every sentence relaxed. Removed ancient comments
from SkRRect.h. Add support for understanding " = default".

TBR=caryclark@google.com

Docs-Preview: https://skia.org/?cl=141120
Bug: skia:6818
Change-Id: I184533539803238ed386863f9029cb68a27e1d6a
Reviewed-on: https://skia-review.googlesource.com/141120
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-07-12 23:47:49 +00:00
Ben Wagner
9ec70c6bd3 Remove SkSafeSetNull.
Update all users to sk_sp.

Change-Id: I6453b9456b9a8f9e2b756381797f1382ef9e6561
Reviewed-on: https://skia-review.googlesource.com/141052
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-07-12 20:59:20 +00:00
Brian Osman
b62f50cf76 Replace nearly all kRespect with kIgnore
- Encoders and decoders always assume kIgnore.
- They are less opinionated about F16 and color space,
  we just trust the color space that's passed in, and
  put that directly in the image (no sRGB encoding).
- SkBitmap and SkPixmap read/write pixels functions were
  defaulting to kResepct, those are now always kIgnore.
- Many other bits of plumbing are simplified, and I
  added a default of kIgnore to SkImage::makeColorSpace,
  so we can phase out that argument entirely.
- Still need to add defaults to other public APIs that
  take SkTransferFunctionBehavior.

- This makes gold think that we've dramatically changed
  the contents of all F16 images, but that's because
  it doesn't understand the (now linear) color space
  that's embedded. Once we triage them all once, they
  will work fine (and they'll look perfect in the browser).

Bug: skia:
Change-Id: I62fa090f96cae1b67d181ce14bd91f34ff2ed747
Reviewed-on: https://skia-review.googlesource.com/140570
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-12 20:54:14 +00:00
Ben Wagner
e346b1eea4 Add SkTypeface::getVariationDesignParameters
This adds a way for users to query the axis parameters for a typeface.

Change-Id: Idc2ac0d84bc7ae2ca484ae410cba5b01883418e5
Reviewed-on: https://skia-review.googlesource.com/137706
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-07-12 17:30:20 +00:00
Greg Daniel
c8cd45aaf4 Generate GrVkInterface when we make the GrVkGpu.
Also add a GetProc function to the GrVkBackendContext which will be used
to create the GrVkInterface.

This change (and updating clients to use it), will allow us to move GrVkInterface
out of public which is needed to fix vulkan header issues.

Bug: skia:
Change-Id: Id8067943ae27cec8cad29fd31b05f0b8387412d4
Reviewed-on: https://skia-review.googlesource.com/140783
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-12 14:35:08 +00:00
Brian Salomon
f666cbc10b remove debug gl interface, grcontextfactory context type, and config.
Change-Id: I476d1066a227d70e39c1dd49220972fb4a075393
Reviewed-on: https://skia-review.googlesource.com/140788
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-12 12:33:08 +00:00
Cary Clark
80247e594d Publish docs for rrect, picture, blendmode
Complete basic docs for SkRRect, SkPicture, SkBlendMode.
Add a new rule that checks the main description tense.
Check for spelling errors.

R=caryclark@google.com

Docs-Preview: https://skia.org/?cl=138542
Bug: skia:6898
Change-Id: Iba547873775a89f1d652be9b0219b84ffa8d0628
Reviewed-on: https://skia-review.googlesource.com/138542
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-07-11 21:21:28 +00:00
Ben Wagner
97c6a0ee41 Remove interal use of SkRefCnt_SafeAssign.
It turns out that SkDeviceProfile is no longer used and can just be
deleted. The ResourceCacheTest and DebugGLTestContext are changed to use
smart pointers where possible. This also clarifies the squirrelly part of
the test. DebugGLTestContext is going away soon anyway.

Change-Id: I95ef24afa58aa4d356429b93d4dec0d72e3fd827
Reviewed-on: https://skia-review.googlesource.com/140577
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-11 20:31:18 +00:00
Brian Salomon
00a5eb8c12 Add gltestpersistentcache config that tests GrContextOption's cache.
Uses a new GPU sink that runs each test twice, once to populate the
cache and then again with a new GrContext but a warmed cache. It
verifies that the two generated images are the same.

Change-Id: Iaba195a69751f14ea946afe7174228a813b83a63
Reviewed-on: https://skia-review.googlesource.com/140567
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-07-11 20:06:33 +00:00
Greg Daniel
37329b3332 Reland "Reland "Move Vulkan DebugCallback code into tools.""
This reverts commit 3148f802af.

Reason for revert: hopefully fuchsia is fixed

Original change's description:
> Revert "Reland "Move Vulkan DebugCallback code into tools.""
> 
> This reverts commit be0ab883e7.
> 
> Reason for revert: fuchsia change reverted
> 
> Original change's description:
> > Reland "Move Vulkan DebugCallback code into tools."
> > 
> > This reverts commit 05d3fe3f10.
> > 
> > Reason for revert: relanding after fuchsia fixes are in
> > 
> > Original change's description:
> > > Revert "Move Vulkan DebugCallback code into tools."
> > > 
> > > This reverts commit d4b2adeaa9.
> > > 
> > > Reason for revert: Need to revert earlier changes cause of fucshia
> > > 
> > > Original change's description:
> > > > Move Vulkan DebugCallback code into tools.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: Ib356200e86e54f9ff0ba16396874e6fd10cf0465
> > > > Reviewed-on: https://skia-review.googlesource.com/137424
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > > 
> > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > 
> > > Bug: skia:
> > > Change-Id: I38d4e71dc29c6503f92712be54e22c58956498c5
> > > Reviewed-on: https://skia-review.googlesource.com/137902
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: Idb88f21018b9c0e23b62f0a5b12f0fab60373921
> > Reviewed-on: https://skia-review.googlesource.com/138300
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> Change-Id: I40d5ba1067248066403f843c0739b885a2bfc834
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138421
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: I5d24bb2df3bd9ecf6bb3870886114ef98478dc7a
Reviewed-on: https://skia-review.googlesource.com/139001
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-07-11 18:20:28 +00:00
Greg Daniel
f730c1820f Reland "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
This reverts commit 007267bdb5.

Reason for revert: Hopefully fuchsia is fixed this time

Original change's description:
> Revert "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
> 
> This reverts commit 0db3a8846a.
> 
> Reason for revert: fuchsia change reverted
> 
> Original change's description:
> > Reland "Make GrVkBackendContext no longer derive from SkRefCnt."
> > 
> > This reverts commit 059a9ab4bc.
> > 
> > Reason for revert: Fix landed in Fuchsia
> > 
> > Original change's description:
> > > Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
> > > 
> > > This reverts commit 93ae233773.
> > > 
> > > Reason for revert: <INSERT REASONING HERE>
> > > 
> > > Original change's description:
> > > > Make GrVkBackendContext no longer derive from SkRefCnt.
> > > > 
> > > > Also moves the helper Create functions to VkTestUtils since no clients
> > > > are using them anymore.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > > > Reviewed-on: https://skia-review.googlesource.com/135323
> > > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > > 
> > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > 
> > > Bug: skia:
> > > Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> > > Reviewed-on: https://skia-review.googlesource.com/137903
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
> > Reviewed-on: https://skia-review.googlesource.com/138181
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> Change-Id: I3f7bc4a5e4e09512fe165303685c123ec3527e58
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138422
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: I5705f1ae306707fe28559797e1bb8c2d57e12204
Reviewed-on: https://skia-review.googlesource.com/139000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-07-11 13:54:57 +00:00
Brian Osman
1994f20d79 Merge "All" and "Default" path renderer options in viewer
This removes a confusing pair of radio buttons that were always in sync

Change-Id: I9bb2d4b944c1bba67f29f71e51c070c20b10d0ef
Reviewed-on: https://skia-review.googlesource.com/140242
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-10 20:03:45 +00:00
Cary Clark
1d314433ff fix line intersect divide by zero
Test filinmangust14 exposes two problems:
- finding top of contour can expose divide by zero
- joining partial contour results can add diagonal

The latter makes the test return the wrong result,
and has not been seen in other tests. The fix
is to join disconnected contours by only following
the contours provided as input. Working on that.

The former bug is more straight-forward; just
don't try to compute axis-aligned intersection
if the denominator is zero.

All existing tests prior to the new one work
with this change.

R=caryclark@google.com
Bug: skia:8125
Change-Id: Ic878d090066708d9baca8475f27d4d5aba2294cc
Reviewed-on: https://skia-review.googlesource.com/140121
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-07-10 15:25:35 +00:00
Ruiqi Mao
9a6e42ff18 added caching of SkVertices
SkVertices can now be "volatile", meaning they should not be cached.
SkVertices is volatile by default if the argument is not given.

Pulled from reverted CL: https://skia-review.googlesource.com/c/skia/+/138596

Docs-Preview: https://skia.org/?cl=139545
Bug: skia:
Change-Id: I92cf832efe1c0aaa8f432eedde2678582dd2454e
Reviewed-on: https://skia-review.googlesource.com/139545
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-07-09 20:31:28 +00:00
Brian Osman
294fe29581 Remove some linear-blending sRGB logic from sk_app
Leftover logic from when viewer tried to use an sRGB FBO0
when rendering to a surface with a color space attached.

Most of this had already been removed, found a few more bits.

Change-Id: I998a541f75ecc184d218d02e24ab57657e096f22
Reviewed-on: https://skia-review.googlesource.com/139764
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-07-09 15:22:17 +00:00
Ruiqi Mao
c05aa7d163 Revert "added skeletal animation support to GPU backend"
This reverts commit b6307340e8.

Reason for revert: patch/atlas failing in gold

Original change's description:
> added skeletal animation support to GPU backend
> 
> added caching of SkVertices
> 
> Docs-Preview: https://skia.org/?cl=138596
> Bug: skia:
> Change-Id: Ia750f55f5f6d0de250d9e9c5619f4d1ac856f9f5
> Reviewed-on: https://skia-review.googlesource.com/138596
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Ruiqi Mao <ruiqimao@google.com>

TBR=robertphillips@google.com,brianosman@google.com,reed@google.com,ruiqimao@google.com

Change-Id: Idfaf016a7ff4cdd8af2543d510706f489d04417a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/139281
Reviewed-by: Ruiqi Mao <ruiqimao@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-07-03 21:18:18 +00:00
Greg Daniel
108bb23277 Reland "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
This reverts commit 34aa059c15.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
> 
> This reverts commit ff2181e62e.
> 
> Reason for revert: suspect it's behind Chrome roll failure
> 
> Original change's description:
> > Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.
> > 
> > Bug: skia:
> > Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd
> > Reviewed-on: https://skia-review.googlesource.com/138987
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/139220
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:
Change-Id: Ib1fd10c126862824f3e31c420c697ac749c637f5
Reviewed-on: https://skia-review.googlesource.com/139221
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-03 20:46:27 +00:00
Ethan Nicholas
34aa059c15 Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
This reverts commit ff2181e62e.

Reason for revert: suspect it's behind Chrome roll failure

Original change's description:
> Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.
> 
> Bug: skia:
> Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd
> Reviewed-on: https://skia-review.googlesource.com/138987
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/139220
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-03 16:38:45 +00:00