Commit Graph

48934 Commits

Author SHA1 Message Date
John Stiles
8c71f3e7d7 Improve error reporting in ProcessorCloneTest.
Previously, when REPORTER_ASSERT reported a failure, there was no
additional information describing the FP that could not be cloned in the
error log. Now, we print out a very simple tree of the FP and its
children.

Change-Id: I141cfb17ca431864a6f555d56f0335293f259c4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296452
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 19:53:54 +00:00
Elliot Evans
2879619a29 Added CanvasKit.MakeImageFromCanvasImageSource which is useful as an alternative to
CanvasKit.MakeImageFromEncoded, when used with Browser APIs for loading/decoding images.

 - `CanvasKit.MakeImageFromCanvasImageSource` takes either an HTMLImageElement,
   SVGImageElement, HTMLVideoElement, HTMLCanvasElement, ImageBitmap, or OffscreenCanvas and returns
   an SkImage. This function is an alternative to `CanvasKit.MakeImageFromEncoded` for creating
   SkImages when loading and decoding images. In the future, codesize of CanvasKit may be able to be
   reduced by removing image codecs in wasm, if browser APIs for decoding images are used along with
   `CanvasKit.MakeImageFromCanvasImageSource` instead of `CanvasKit.MakeImageFromEncoded`.
-  Three usage examples of `CanvasKit.MakeImageFromCanvasImageSource` in core.spec.ts. These 
   examples use browser APIs to decode images including 2d canvas, bitmaprenderer canvas, 
   HTMLImageElement and Blob.
-  Added support for asynchronous callbacks in perfs and tests.

Here are notes on the image decoding approaches we tested and perfed in the process of finding ways 
to use Browser APIs to decode images:

1. pipeline:
  ArrayBuffer → ImageData → ctx.putImageData →
  context.getImageData → Uint8Array → CanvasKit.MakeImage
 Problem: ImageData constructor expects decoded bytes already.

2. interface.js - CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded (async function)
pipeline:
  ArrayBuffer → Blob -> HTMLImageElement ->
  draw on Canvas2d -> context.getImageData → Uint8Array →
  CanvasKit.MakeImage
 Works
⏱ Performance: 3rd place (in my testing locally)

3. interface.js - CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded2 (async function)
  ArrayBuffer → Blob → ImageBitmap → draw on Canvas2d →
  context.getImageData → Uint8Array → CanvasKit.MakeImage
 Works
⏱ Performance: 2nd place (in my testing locally)

4. interface.js - CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded3 (async function)
  ArrayBuffer → Blob → ImageBitmap →
  draw on canvas 1 using bitmaprenderer context →
  draw canvas 1 on canvas 2 using drawImage → context2d.getImageData →
  Uint8Array → CanvasKit.MakeImage
 Works
⏱ Performance: 1st place (in my testing locally) - quite surprising, this in some ways seems to be a more roundabout way of CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded2, but it seems bitmaprenderer context is fairly fast.

Bug: skia:10360
Change-Id: I6fe94b8196dfd1ad0d8929f04bb1697da537ca18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295390
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-15 19:35:09 +00:00
Florin Malita
2d9e0357fa Fix infinite loop in SkParsePath::FromSVGString
A close-path verb (Z) does not allow/consume any numerical tokens.

Bug: oss-fuzz:23398
Change-Id: I46694957873b615875fb9ff7ed01b9d77a49babc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296476
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-15 19:31:45 +00:00
Brian Osman
5ee90ff982 Moved SampleMatrix computation out of SectionAndParameterHelper
This will let us share this code with the pipeline stage code generator,
which doesn't use the helper.

Change-Id: I8df3a71d448697d98b1fcbabda524e48e42db591
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295561
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-15 19:18:14 +00:00
John Stiles
e3a39f7053 Update ConstColor FP to support an input FP.
In the "ignore input" mode, the input FP contributes nothing and is
never sampled. In the "modulate input" cases, the input FP is sampled
as one would expect.

Change-Id: I96717d63d8e3d7ef6aa4eaaf88154c6e5ce47e55
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296299
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 18:45:04 +00:00
Greg Daniel
a4a132c2be Fix tracking of d3d cpu descriptor heaps.
The way you access individual descriptors in a heap for d3d is that you
get a handle to the start of the heap, get the stride between
descriptors, and then you can do start + index * stride. Previously we
were assuming that the ptr handles for different heaps would not overlap.
Thus when recycling an individual descriptor we were using its handle ptr
to decide which heap it belonged to.

However, the spec doesn't require that these handles act like actual
pointer to memory. On a least some machines it was noticed that the start
handle for different heaps just incremented by 1 for each new heap even
though each used 32 as their stride. Long story short it is not valid
to do any sort of comparison of handles between different heaps Thus we
have to explicitly track which handles come from which heaps so we know
of to correctly recycle them.

This fixes the main/most common crash we were seeing on d3d viewer.

Change-Id: I5107104b245dc13a3b6b21e9e04b88ed8f55c80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296448
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-15 17:37:04 +00:00
Herb Derby
a08bde606a GrTextContext::Options -> GrSDFTOptions
Rename GrTextContext::Options to GrSDFTOptions. Remove GrTextContext.

TBR=reed@google.com

Change-Id: Ic89966cfe630cc6ee757977a6d63ae1da9e39ef0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296176
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-15 17:14:04 +00:00
John Stiles
92219b464a Fix pointer ownership issue with SkSL static switches.
When collapsing static switches, we were not handling the symbol table
in SkSL::Block correctly, which led to assertion failures in some cases.

This CL is based on the fixes in http://review.skia.org/296178
but removes the need to track pointers-to-unique-pointers.
We do this by splitting the work into two parts:
1 - determine range of statements to move
2 - actually move statements

Because the statements are all consecutive, keeping track of this range
is not actually that difficult and we don't need to do any checks twice.

Change-Id: I71ad745ef1e4b4f5f6b753762e65fa49b2399adc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296440
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-15 17:09:54 +00:00
Brian Salomon
602b402485 Disable MorphologyFilterRadiusWithMirrorCTM_Gpu on AndroidOne
Bug: skia:10383

Change-Id: I09f5029a11ed27e11e4de9fbb9ce58052b3d7fc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296436
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-15 16:21:34 +00:00
John Stiles
9ec6b05a43 Add cloneAndRegisterAllChildProcessors.
This method should make it simpler for hand-written fragment processors
that have child FPs to implement clone() properly.

Change-Id: I1927d98857533406e732c8c6a8b228cb8cdb59b6
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296439
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-15 16:06:55 +00:00
Dominic Mazzoni
127c607818 Add separate PDF tag attribute interfaces for names and strings
In PDF files, "names" and "strings" are not the same thing, but I was
conflating them. Separate out the interfaces for adding attributes to
PDF struct tree elements so there's a way to add either a name or a string,
and similarly for arrays of names or arrays of strings.

Fix the table test to correctly use a name for the "Scope" attribute
and an array of strings for the "Headers" attribute.

Bug: chromium:607777
Change-Id: Ib30bded2bbcf96e31ba6925fb062615558dea0db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296338
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-15 15:46:29 +00:00
John Stiles
3779f448ca Add helper method to clone and register a child FP.
This will remove common boilerplate from our gen-code, and gives us a
place to put common child-cloning boilerplate.

Change-Id: I6101655af89d4c5844ec908b81ce4f6e5d59f834
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296177
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 15:43:05 +00:00
Derek Sollenberger
b48895dca2 Revert "Allow building with Wuffs v0.3, not just v0.2"
This reverts commit c34344989a.

Reason for revert: breaking the windows msvc compile bot as well as the flutter canary

Original change's description:
> Allow building with Wuffs v0.3, not just v0.2
> 
> This is step 1 of a multi-step, multi-repository transition:
> 
> 1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
>    defaults to v0.3 but other repositories' defaults remain at v0.2.
> 2. Update users' Skia version (automatic if they update regularly).
> 3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
> 4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
> 5. Remove the option for Skia to work wih Wuffs v0.2.
> 
> Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,nigeltao@google.com

Change-Id: I2c8a44962eb9b136b199dba5f52a860d756a0aa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296441
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-15 15:41:26 +00:00
Nigel Tao
c34344989a Allow building with Wuffs v0.3, not just v0.2
This is step 1 of a multi-step, multi-repository transition:

1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
   defaults to v0.3 but other repositories' defaults remain at v0.2.
2. Update users' Skia version (automatic if they update regularly).
3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
5. Remove the option for Skia to work wih Wuffs v0.2.

Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-06-15 14:34:34 +00:00
Mike Reed
82d619699d remove (unused) clipmask from savelayer
Change-Id: I44f64a8c98c019a8f4878b0b6f6d82489aa8252c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296179
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-06-15 14:26:44 +00:00
skia-autoroll
08ac84a66a Roll Chromium from 0f6d038f871a to d877aabea65f (508 revisions)
0f6d038f87..d877aabea6

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 djsollen@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: djsollen@google.com
Change-Id: Ie6536d78032bdb011cd9ea087e6768be58b23216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296324
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-15 04:54:34 +00:00
skia-autoroll
ff7ea5c024 Roll dawn from 5fafb49c7b4d to 6b3a974b42a3 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/5fafb49c7b4d..6b3a974b42a3

2020-06-13 jiawei.shao@intel.com OpenGL: Enable nonzero_clear_resources_on_creation_for_testing on buffer
2020-06-13 jiawei.shao@intel.com D3D12: Enable nonzero_clear_resources_on_creation_for_testing on buffer
2020-06-12 brandon1.jones@intel.com Make D3D12 Fuzzer Only Build On Windows
2020-06-12 yunchao.he@intel.com Vulkan: use one barrier if we can for non-pass operations
2020-06-12 cwallez@chromium.org Don't store unnessary SubresourceRange members in TextureBase
2020-06-12 cwallez@chromium.org Vulkan: Properly handle Device extension dependencies
2020-06-12 brandon1.jones@intel.com Track ShaderVisibleDescriptorHeap Upon Allocation
2020-06-12 natlee@microsoft.com Fix ResourceMemoryAllocation null dereference

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: Ida4f292988c98f54942ebb3e6a8abbf5b3b188f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296323
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-15 04:34:24 +00:00
skia-recreate-skps
ca72a47e23 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Iee883f9ca87e231c40f3a33e06cfb2a93911b4b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296317
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-14 06:31:37 +00:00
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