Commit Graph

48916 Commits

Author SHA1 Message Date
Greg Daniel
01f278c834 Better handle backendFormat to CompressionType.
We also fix getReadSwizzle with this change.

Change-Id: I1989d8347dc97d7a4c75aa9094a0146419c6d8fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295819
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-12 21:47:14 +00:00
Herb Derby
45fe2e8a99 move methods to options class
Change-Id: I5e4abcec1b9f99997cd68b433490e13eaa76f3f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296123
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-12 21:03:34 +00:00
Florin Malita
2d41186521 [skjson] Reinstate initFastShortString
Tricked it back into reading 8-byte strings, with just and extra SHL.

nanobench -q -m json_skjson --samples 1000

before:

! -> high variance, ? -> moderate variance
    micros   	bench
   1472.91 ?	json_skjson	nonrendering

after:

! -> high variance, ? -> moderate variance
    micros   	bench
   1397.67  	json_skjson	nonrendering

Change-Id: Ie9a6d9e55c8283a5bb0ee3d8c37d0618326970cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296124
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-12 21:03:25 +00:00
Greg Daniel
9efe386978 Add SkSurface flush call that takes a GrBackendSurfaceMutableState.
This new api will eventually replace the version that takes an

SkSurface::BackendAccess.
Change-Id: I48cd013725e14027f386b0b111223459944ac44a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295567
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-12 20:40:54 +00:00
John Stiles
616da104ab Allow printf-style formatting to be used in SK_ABORT.
(This is a simple reland of
    https://skia-review.googlesource.com/c/skia/+/293272
and is functionally unchanged, but needed to be reconstructed
manually because JavaInputStreamAdaptor.cpp was deleted.)

SK_ABORT was already using SkDebugf to print the error message to the
console, so all the moving parts were there. This CL just adds a
mechanism for the calling code to pass in arguments.

Added a use case to demonstrate usage--when an allocation fails, the
requested size is now shown in the error message.

Change-Id: If8600a9febad15b7c8b7a04479a1d92442521f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294705
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-12 20:26:34 +00:00
Brian Salomon
ac16760df4 Make GrMorphologyEffect use GrTextureEffect
Bug: skia:10139

Change-Id: I11de91c243ac1eeb0ad1ea580670add6229dbe41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296041
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-12 19:00:36 +00:00
John Stiles
637838d20a Fix compiler warnings on Mac build.
Clang doesn't like it when operator| is applied to two different enum
types.

Additionally, fixed some nearby line wrapping.

Change-Id: I77190c9bc91b53ebc38d184d73a6a244b8f34ce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295795
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-12 18:21:19 +00:00
Adlai Holler
407c9825da Fix copyright
Bug: skia:10372
Change-Id: Icee1d9f1f049961f02f41dec65238e0188ae5809
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296043
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-12 17:33:19 +00:00
Herb Derby
3d6bf04366 make options robust
Options used to rely on an external call to SanitizeOptions to
ensure they were correct. Now that defaults are set directly,
make sure that the values coming in make sense.

Change-Id: If6cfc027722b6a7717a920b482ec5be8f7526367
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296040
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-12 17:05:22 +00:00
Derek Sollenberger
2af055b14d Skottie example app to copy InputStreams in Java.
This CL avoids the JNI complexity of reading the Java InputStream in
C++. Instead, the stream is read into memory (or mmap'd) in Java and
the resulting ByteBuffer is passed to the native code to be wrapped
in a SkData object.

Change-Id: Iba4e41999da03481188434ddfbbff2d7bd741edd
Bug: skia:10310
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295820
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-12 16:41:19 +00:00
Adlai Holler
1bdbe55135 Cache last-accessed entry in lastRenderTask table.
This table is really hot during drawing and we saw a regression when
it was introduced. This change provides wins locally but I don't have
the regressed hardware handy.

Additionally, we change from SkGoodHash to the MixCheap function used by
some other small tables in the library.

Bug: skia:10372
Change-Id: Ic2dfbf41649515245e82cbcc9765cb29270eb5cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295878
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-12 16:11:19 +00:00
Brian Osman
faaf3c596c Move all SkReadBuffer member initialization to header
Change-Id: I25e4626f55ce42aa505ae1760c3461a77e4a6ac0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296042
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-12 16:06:19 +00:00
Florin Malita
4bcc5f080a [skjson] Use lower bits for tagging
Can't touch high pointer bits on some archs.

Bug: skia:10376
Change-Id: I7488c90f84165820ce285895e9ca6805adfcac82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295883
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-12 15:58:01 +00:00
Herb Derby
3005c4815f Make explicit SDF default values.
Change-Id: I08023209a263cc50be9a9cac70e7184fd2fb2379
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296037
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-12 15:46:59 +00:00
Kevin Lubick
261333283e [canvaskit] Fix bug with TextStyle color
This updates an existing test and adds a new one to make
sure we don't regress.

Change-Id: If94eb3fb205852750d6fb9483e20c07d88b4da10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295560
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-06-12 15:40:13 +00:00
Brian Salomon
076c888726 Make ColorTableEffect use child processor
Bug: skia:10139

Change-Id: I118308eab5f1b7bdd5be265f668185c912153102
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-12 15:15:49 +00:00
Brian Osman
8181edf21f Initialize SkReadBuffer pointers
Change-Id: I93c986c29a6bf4adbc03c0715b89f809b4ad4ddc
Bug: chromium:1093902
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296039
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-12 15:09:59 +00:00
John Stiles
796e7022ee Reland "Fetch clang-format automatically when compiling .fp files."
This is a reland of a25422faa4

Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: Ib397716771f742f192ebd6ed7ec0a9915b2400c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-12 13:21:41 +00:00
Zepeng Hu
edaf3020bf add svg fuzzer
Change-Id: I5c4c978c35462e41379939e92fb354dbb40606f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295218
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Zepeng Hu <zepenghu@google.com>
2020-06-12 13:02:03 +00:00
Mike Reed
31c0bcf5ea remove (unused) duplicate field of fUniqueID
Change-Id: I0e9fe683950ec4905a8bdaa2e965f7bc0287b91a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295918
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-06-12 12:35:21 +00:00
skia-autoroll
b4120795b8 Roll Chromium from 3f86fb2f52c2 to 0f6d038f871a (417 revisions)
3f86fb2f52..0f6d038f87

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: bungeman@google.com
Change-Id: Iead06f1dccf354705c30bc89b74df7d481481c40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295912
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-12 04:50:07 +00:00
skia-autoroll
97eba9a8ca Roll ANGLE from db3ef87243d0 to ff2ebce4b230 (16 revisions)
db3ef87243..ff2ebce4b2

2020-06-12 syoussefi@chromium.org Vulkan: allow texture copies from one mip to another
2020-06-12 syoussefi@chromium.org Vulkan: Apply SPIR-V optimization to internal shaders
2020-06-12 syoussefi@chromium.org Move lod-sampling shaders to shader utils
2020-06-11 syoussefi@chromium.org Vulkan: Better handling of texture level redefinition
2020-06-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from c01f826bc67f to 458140aed907 (2 revisions)
2020-06-11 jmadill@chromium.org Run TracePerfTests in WGL configs.
2020-06-11 timvp@google.com Update State to check mExecutable
2020-06-11 etienneb@chromium.org Implement a WorkerPool delegate to execute background task (1/3)
2020-06-11 jmadill@chromium.org Minor cleanup to PostSubBuffer sample.
2020-06-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 68b2e15ee016 to b919bc889e1d (3 revisions)
2020-06-11 cclao@google.com Vulkan: Initialize stencil ops with DontCare for color attachments
2020-06-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 8b92af3fd83f to 5fab7f82a548 (5 revisions)
2020-06-11 timvp@google.com Add android:exported to AndroidManifest.xml
2020-06-11 syoussefi@chromium.org Vulkan: Reduce ConvertVertex.comp variations
2020-06-11 tobine@google.com Vulkan:Adding key perf trace markers
2020-06-11 shabbyx@gmail.com Vulkan: add autogen dependency to shader variations files

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:1084580,chromium:1091259
Tbr: bungeman@google.com
Test: Test: CQTest: Test: end2end tests listed above
Change-Id: I5fa3b1ff5a64dd1877b47fecc0a8a708cad92f00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295915
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-12 04:50:06 +00:00
skia-autoroll
fb4381aabe Roll SwiftShader from 45510ad8a778 to a6940c8e6eb0 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/45510ad8a778..a6940c8e6eb0

2020-06-11 sugoi@google.com Regres: Roll deqp forward to latest 1.2.1

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: bungeman@google.com
Change-Id: I2ffd42c8cdd54ae00df3245fcab8a1e4e3cdb0aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295913
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-12 04:45:02 +00:00
skia-autoroll
4d324f774c Roll dawn from b6eff5acf06f to 5fafb49c7b4d (11 revisions)
https://dawn.googlesource.com/dawn.git/+log/b6eff5acf06f..5fafb49c7b4d

2020-06-12 yunchao.he@intel.com Refactor subresource related variables to a struct
2020-06-11 bryan.bernhart@intel.com Prevent size overflow for sub-allocation.
2020-06-11 cwallez@chromium.org Vulkan: handle Device extensions more programmatically
2020-06-11 yunchao.he@intel.com Vulkan: use one barrier to transit states for all subresources
2020-06-11 brandon1.jones@intel.com Add fuzzer for the d3d12 backend
2020-06-11 rharrison@chromium.org Roll third_party/tint/ af5df70c7..3f3483be1 (2 commits)
2020-06-11 cwallez@chromium.org Fix compilation error of MemoryServiceDmaBuf on ChromeOS
2020-06-11 cwallez@chromium.org Vulkan: handle Instance extensions more programmatically
2020-06-11 xing.xu@intel.com Add storage texture case reading from read-only then writing into write-only
2020-06-11 cwallez@chromium.org Add CopyB2B tests including for 0-sized copies
2020-06-11 cwallez@chromium.org Add tests and fix (create) mapping zero-sized buffers

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: Ifea04fe145a07d4a4ab93410282fa3986e679edf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295914
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-12 04:45:00 +00:00
Michael Ludwig
e06a8972f0 GrClips know their device dimensions
If GrClips know their dimensions then getConservativeBounds() does not
need any arguments and isRRect() can remove its rtBounds argument.

I also updated GrFixedClip to report the render target bounds as a
degenerate rrect in its isRRect implementation if it was wide open. Its
apply() function was also simplified to take advantage of the prior
GrScissorState work where the rectangle was always valid to access and
contained within the render target bounds.

Change-Id: I627b97976cb176b1c80627462027034b06ad2cb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290957
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-11 22:41:24 +00:00
John Stiles
30212b7941 Fix implicit fallthroughs throughout Skia.
This CL is not fully comprehensive; for instance, it does not contain
fixes for backends that don't compile on Mac. But it does resolve the
vast majority of cases that trigger -Wimplicit-fallthrough.

A few minor bugs were found and fixed, but none that were likely to
affect normal operation.

Change-Id: I43487602b0d56200ce8b42702e04f66390d82f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295916
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-11 22:29:53 +00:00
Ethan Nicholas
77968f0d32 Revert "fixed sample(..., matrix) with runtime effects"
This reverts commit fb5ede576d.

Reason for revert: major performance regression due to constant shader recompilation

Original change's description:
> fixed sample(..., matrix) with runtime effects
> 
> Change-Id: Id5b7f1b5e992c587be000e112706bedfe00c90fd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294697
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

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

Change-Id: Ica8322e0eab8f00bfc1d4f6d33778eb6493b278f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295835
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-06-11 22:25:53 +00:00
Mike Reed
9290d01c6f Add filter-quality to imageshader factory
The old factories (makeShader) will behave as before: they will inherit
the filter-quality from the paint.

The new factory takes an explicit filter setting, and will use that
regardless of the paint.

Big follow-ups:
- update callers to not rely on setting in SkPaint
- revise/enhance settings in imageshader
    - settings for scaling up and down
    - control over trilerp, etc.
    - other: 4x4 kernels? trilerp bias?
- move mipmaps to always be explicit requests a SkImage factory time


Bug: skia:10344
Change-Id: If87b06d4fd6eafd8b9cdecda7c00d69897066ef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295086
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-11 22:15:33 +00:00
Chris Dalton
f26e596822 Duplicate ccpr/GrCCStrokeGeometry to tessellate/GrStrokeGeometry
CCPR stroking is not enabled by default and will eventually be
removed. This CL is a step toward migrating it to an MSAA version.

Change-Id: I565bea1c91c51bcd1ea3766aee6e4702adf3b09e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295608
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-06-11 21:59:23 +00:00
Mike Reed
e8685bc957 remove unneeded SK_LEGACY_BLITTER_CHOICE flag
Change-Id: If49be9fb6eac9b2af40898313e000855604be9f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295829
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-06-11 21:55:13 +00:00
Robert Phillips
de2bca28cb Add new GM to exercise Vulkan YCbCr images
This will also expose the Vulkan precompilation path to immutable samplers.

Change-Id: Ida31bd70455299fbcc8f4d728aa15179f7685311
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295799
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-11 20:58:16 +00:00
John Stiles
21bbfc6c2d Revert "Fetch clang-format automatically when compiling .fp files."
This reverts commit a25422faa4.

Reason for revert: breaks Windows build

Original change's description:
> Fetch clang-format automatically when compiling .fp files.
> 
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
> 
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: If6412e74a16aa515c223d5d4f326780c8a69766f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295832
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-11 20:36:05 +00:00
Jim Van Verth
2b98f160a6 Add Direct3D tests to the bots.
Bug: skia:9935
Change-Id: I52c7819e8a2899f6fe3e1a1f6551e84ac8c8d60a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295784
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-06-11 20:31:03 +00:00
John Stiles
a2d46a1f7d Optimize GrRRectBlurEffect by computing frag pos branchlessly.
This version computes X and Y in parallel and without branching.

Change-Id: I08dd7339f75c6cdd5b4130bf363cac1f527bf6ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295572
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-11 20:13:23 +00:00
Robert Phillips
85aa42820e Move VkYcbcrSamplerHelper's context functionality into VkTestHelper
This should make the YCbCr sampler helper usable in a GM (with a normal Vk context).

Change-Id: I75451f6ca934f7b59c48349c77234856d0946a12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295766
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-11 19:39:21 +00:00
Mike Klein
e5463e62b9 require c++14 public headers
It occurred to me that we try to guarantee this but don't test it.
Luckily this public_headers_warnings_check target is a perfect spot.

Change-Id: Ie06732706ee80da798a9c3bda215d5a65f02b5bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295856
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2020-06-11 19:39:20 +00:00
Ben Wagner
32d5cfa1f3 Publicly depend on fontmgrs.
When a fontmgr is included in the Skia build any headers it provides
(like through public) are also public Skia headers.

Change-Id: Ibf18819a956e626a925f83a4f8ebab90978ff9a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295818
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-11 18:59:20 +00:00
Herb Derby
082232b142 simplify option flow
The GrTextContext::options would flow from the GrRecordingContext to
the GrDrawingManager to the GrTextContext, and finally to the
GrRenderTargetContext.

Just find them on the GrRecording context off the GrRenderTargetContext.

Change-Id: I902481d20072c2470905261ab81c2b6456f25343
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295559
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-11 18:05:36 +00:00
John Stiles
88183900a5 Honor return value of registerChildProcessor when creating child FPs.
The current implementation ignores return value from
`registerChildProcessor` and, surprisingly, assumes that a cloned FP
index will match the original FP index. This version honors the return
value.

(In practice, I have not seen any cases where the current implementation
has caused actual breakage.)

Updating common code-gen had large ripple effects in the SkSL unit
tests. While repairing the tests, I also took the opportunity to use
raw-strings to pass the source SkSL text, and annotated the `expectedH`
and `expectedCPP` blocks to make the tests easier to understand at a
glance.

Change-Id: I71be69d9e4620963b3ef49ad8e0dba3b40af7f4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295452
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-11 17:46:54 +00:00
Greg Daniel
2559778f0f Fix calling finishedProcs that are null in backend surface APIs.
Change-Id: I05ef384bc3dc591e44934cbc0c53786e2c6c18da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295789
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-11 17:46:04 +00:00
Florin Malita
1da2556a09 [skrive] Initial binary reader plumbing
TBR=
Change-Id: Ib94516bfba881fd3fdd7b09631f14366f6ac98da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295573
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-06-11 17:24:25 +00:00
Ethan Nicholas
739e1caf35 Fixed SkSL optimization issue
When collapsing static switches down to a single statement, we detect
break statements and don't copy them. But the logic was broken; we
weren't copying the entire statement in which the break occurred, which
could be a block, causing some of the code to simply be omitted.

Change-Id: Ic5b59c11d12326c93d49080193a0a5297732bfb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295776
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-11 17:24:24 +00:00
Ben Wagner
ee2ffc3b43 Delete .a file before writing static library.
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.

This is similar to what Chromium currently does in gcc_toolchain.gni.
However, we cannot always just use 'rm' because of the build for Android
on Windows, so this introduces 'rm.py' which is just like 'cp.py' but
without the copy part.

Bug: skia:10363
Change-Id: Icc0c3d18dab1e48ccfec47386662c7b4d2dc8811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295569
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-11 17:19:23 +00:00
John Stiles
a25422faa4 Fetch clang-format automatically when compiling .fp files.
On a freshly fetched repo, setting `skia_compile_processors = true` will
fail to compile because clang-format is missing from the bin directory.
This CL automatically runs fetch-clang-format for you when clang-format
is absent.

Change-Id: Ieeb359176072e92ca235316c820310333732f608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-11 17:19:22 +00:00
Michael Ludwig
1c07aa7d8d Implement computeFastBounds in SkLocalMatrixImageFilter
This also adds a GM based on Jim's fiddle: https://fiddle.skia.org/c/781234e35c208ee03f79b90613117b91
I confirmed that it never flickers when animating in viewer.

Patchset 1 shows the GM being blank (with the computeFastBounds fix
disabled). Patchset 3 shows that with the fix enabled, the GM is not
blank.

Bug: skia:9282
Change-Id: I206f7150c395b0a35ecf0455e4905f72ae057e6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295558
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-11 16:45:33 +00:00
Herb Derby
4598fa1b1a move test op creation to GrTextAtlasOp
Change-Id: If6de2f7812ead2d3722d528805901e0f7e67a6b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295358
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-11 16:26:43 +00:00
Stephen White
36248741c2 Dawn: implement Dawn support for BackendAllocationTest in Gray8 mode.
Bug: skia:10362
Change-Id: I56d1f618dcdf96133f1932b7ac8d4602ddb93a59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295575
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-11 14:26:44 +00:00
Nathaniel Nifong
d05fd0c7d2 Accept Flat Uint32Array, Float32Array, or 2d Float32Array as the color argument to MakeLinearGradient
TODO:
  1. Accept a Color builder or a TypeArray from CanvasKit.Malloc
  2. Apply the same treatment to all other gradient functions, MakeSkVertices, and drawAtlas
Change-Id: I94fa67a3c00d7b1ecdc004af4ffd3193404c1a30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294707
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-11 13:51:53 +00:00
Robert Phillips
0d6ce7cc13 Split VulkanTestHelper out into its own files
The aim here is to unify VkTestHelper with the VkYcbcrSamplerHelper's context creation code. AFAICT they have a ~90% overlap.

Change-Id: Iba8d1482b8c1d7164682f90e19d2183d8cfe45d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295583
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-11 13:49:33 +00:00
Nathaniel Nifong
cd0df4f7cd Add a basic readme to help the uninitiated build and run skpbench
Change-Id: Ib276f960f385c88392bca90924a9a42752e585ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295603
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-06-11 13:27:03 +00:00