Commit Graph

4294 Commits

Author SHA1 Message Date
Mike Klein
81d35a72ae rm SkPreConfig.h and SkPostConfig.h
We treat them as part of SkTypes.h, so let's just merge them in?

Change-Id: Icd6db3913a679ceb9de09027d17eb9361754b016
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268769
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-02-06 19:16:43 +00:00
Brian Osman
aba642c6ac Remove SkScalarClampMax and SkScalarPin
Change-Id: Ic96a0ea2cd1bfd59ee3f236543e1d6dd102544ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269142
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-06 18:29:51 +00:00
Brian Osman
7f36405ea3 Remove SkMin32/SkMax32
Use std::max and std::min instead

Change-Id: I7fd2626ea9ea8ea09c709ff962523ca3de2f8a16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269136
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 17:31:51 +00:00
Brian Osman
116b33e8ab Remove SkMaxScalar and SkMinScalar
Use std::max and std::min instead

Change-Id: Icf3796609e5cb511687fb50bd31229ae4b6b9b39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268841
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 15:43:22 +00:00
Hal Canary
9d9312b308 decs/examples: Support more fiddle types: offscreen, srgb
Change-Id: I606eb7dfbce04147bfc6e287bb2c75051a44a076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264692
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-01-30 16:31:58 +00:00
Nathaniel Nifong
d0a0c59c80 Return summaries of all layers for display
Bug: skia:9752
Change-Id: I1012f4cda1c28d446269f0a3f212ccf80f17c194
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267439
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-29 20:55:49 +00:00
Stephen White
f03c116021 Roll dawn and adjust for new SwapChain API.
Split GrDawnImageInfo into GrDawnTextureInfo and GrDawnRenderTargetInfo.
The former holds only a wgpu::Texture, and the latter holds only a
wgpu::TextureView. This split is necessary because Dawn SwapChains now
vend TextureViews, not Textures.

The TextureView held by GrDawnRenderTargetInfo is always 1-mip, since
it's a requirement for rendering to a texture in Dawn.

Change-Id: Id6e99b5e4bf18f97e939170856a665e2038253ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254810
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-28 18:26:44 +00:00
Brian Salomon
d4bf54eac6 Revert "Switch runtime SkSL to always sample at explicit coords"
This reverts commit b1e9971eb7.

Reason for revert: crbug_905548 GM drawing incorrect
before: https://gold.skia.org/img/images/32964364a8ac12af5a68bf95c24fb90c.png
after : https://gold.skia.org/img/images/0918b58c93c770c20cf475c37a70b528.png

Original change's description:
> Switch runtime SkSL to always sample at explicit coords
> 
> Change-Id: I4647d0f4a098acf399e1add1d87ca0752d0fdf90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266381
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I0fb892148a424d5928878a49e3ccd5bfb9485b23
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-27 17:50:56 +00:00
Brian Osman
b1e9971eb7 Switch runtime SkSL to always sample at explicit coords
Change-Id: I4647d0f4a098acf399e1add1d87ca0752d0fdf90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266381
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-27 15:31:05 +00:00
Brian Salomon
8675bcbaf9 Add support for GL_NV_fence.
Will be used for YUV420 readback on ANGLE ES 2 contexts in Chrome.

Marks the functions as required as Chrome now adds inits these on
GrGLInterface.

Bug: 1040643
Change-Id: I5504d4c9209874991592c9f86aaf7987c316aa40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265602
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-01-24 01:53:33 +00:00
Greg Daniel
b58a3c7331 Remove fConfig from GrSurfaceDesc.
Bug: skia:6718
Change-Id: I586e10c828d5d0a0b3e46d8efd7400991b98d5c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-23 15:53:36 +00:00
Mike Klein
31bfa83f91 add --dylib to fm
Change-Id: I1b75e703123d90712b001921d5b1e132238076fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265823
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-22 18:05:04 +00:00
Brian Salomon
87c314210a Add functions for GL_NV_fence to GrGLInterface.
Also add macro for ALL_COMPLETED

We plan to use this with ANGLE ES2 contexts.

Change-Id: I6c967fa9b9aefc41c31cd806aece8533f846f940
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265756
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-22 16:02:45 +00:00
Greg Daniel
47c20e81bc Pass swizzle into createProxy instead of inferring from GrPixelConfig.
This whole change is basically work that will all get reverted shortly
when GrSurfaceProxy no longer stores swizzle. But for now this helps
get rid of a use of pixel config.

Bug: skia:6718
Change-Id: If911360a8a9d2c52a58b5795386484634885b3f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265579
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-21 20:58:32 +00:00
Nathaniel Nifong
ce5ad452f6 Don't apply android device clip restriction, only show the viz of it.
Bug: skia:9758
Change-Id: I4bd45075791a0c33096901cd94555b2898c7b6fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265142
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-21 14:03:39 +00:00
Chris Dalton
84c8787702 Add a --scale flag to skpbench
Change-Id: Idd7698b59e09bdcc688ae3601d9ec343c37592d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264881
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-16 22:29:31 +00:00
Mike Klein
b147aceed7 DCI-P3 -> Display P3 in Skia
This keeps an alias so code keeps building.

Bug: skia:9792
Change-Id: If8575468d929d2ca28bc2f9e82de27291fb19aa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264691
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-16 21:24:16 +00:00
Hal Canary
8800042f69 docs/examples: REG_FIDDLE_ANIMATED
I also added the `get_examples.py` script which pulls down new fiddles.

Change-Id: I953e461685a4d118ac4e425453e47d665a485aa2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264570
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-01-15 19:02:25 +00:00
Mike Klein
2a57e79921 add --skvm to nanobench and fm
This might be easier than building with SK_USE_SKVM_BLITTER defined.

Change-Id: I72c1f361195bacf5a14e6633dd49e9a5ad721cff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264383
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-14 21:53:28 +00:00
Hal Canary
d8cf3f0258 [minor] tools/skottie_ios_app/Skia*Context: remember to cast
This will make a client builder happy.

Change-Id: Ia7b79768dc7ba9806d854740d1f7c4b2c02fa845
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264417
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-01-14 20:05:17 +00:00
Hal Canary
6c8422c671 add more docs/examples from named fiddles.
ignore offscreen, srgb, and animated fiddles for now.

Change-Id: I923131b684865698e6cda138b004930e11f504d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263713
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-01-14 19:22:26 +00:00
Hal Canary
118df7cf62 skottie_ios_app: Add OpenGL.
- Consolidate Skottie logic into SkottieViewController class that no longer
    knows about which backend we use.

  - Abstract out SkiaViewController interdace which SkottieViewController
    implements.

  - Create three classes SkiaGLView, SkiaUIView, and SkiaMtkView, which all
    accept SkiaViewController objects but override GLKView, UIView, and
    MTKView.

  - SkAnimationDraw and SkTimeKeeper now SkiaViewController
    implementation details, no longer shared in headers.

Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Change-Id: I96ff2911d63da7d5327c81f91996b2a1b12c4419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261178
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2020-01-14 16:16:32 +00:00
Greg Daniel
3912a4b1da Update GrSurface/RenderTargetContexts to take and store GrSurfaceProxyViews.
Bug: skia:9556
Change-Id: Ie1aed1b16c237e9c9d1b582ac4ff02fdaaad238f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263205
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-14 15:31:07 +00:00
Nathaniel Nifong
12b2c27038 fix msan issue by init all new members
Change-Id: If90044b99e4d8e4be3366579518faa5abc96bd31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263706
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-14 14:52:37 +00:00
Greg Daniel
f6d60d32a7 On ARM disable blend when src-over has src with alpha of 1.
Change-Id: Ibb8ed86b8753718dfd12a24ad9497f79093eea40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263200
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-13 15:27:53 +00:00
Chris Dalton
0a1923e507 Disable QCOM_tiled_rendering while we wait for test devices
There are devices that advertise this extension but don't actually
provide the GL entrypoints. This is causing live crashes.

Bug: flutter:47164
Bug: flutter:47804
Change-Id: Idded47e8dbd4462463ad91a62b06b0df3245f0c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263809
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-11 06:04:56 +00:00
Mike Reed
a3a704afa3 Override didTranslate, and add virtual for didScale
This completes pushing through the new virtual didConcat44() to our
subclasses, and introduces didScale() for future optimizations. We
don't call didScale yet, until external subclasses are also updated.

This was derived from https://skia-review.googlesource.com/c/skia/+/263349

bug: skia: 9768
Change-Id: Ia26b48e76e323037082e8f2ee83673c26b99ebed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-11 02:11:26 +00:00
Nathaniel Nifong
ba80f359af Revert "Reland "Add vis of android device clip restriction, fix regular clip vis on gpu""
This reverts commit 17175f9ed9.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Add vis of android device clip restriction, fix regular clip vis on gpu"
> 
> This reverts commit 66f7ca63b1.
> 
> Reason for revert: Attempt initializing all new members
> 
> Original change's description:
> > Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
> > 
> > This reverts commit aac8e44d5c.
> > 
> > Reason for revert: Attempted fix didn't work, still producing red on tree.
> > 
> > Original change's description:
> > > Add vis of android device clip restriction, fix regular clip vis on gpu
> > > 
> > > Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> > > Commit-Queue: Nathaniel Nifong <nifong@google.com>
> > > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > 
> > TBR=kjlubick@google.com,nifong@google.com
> > 
> > Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com
> 
> Change-Id: I5acc8a1f0b06e0490125077596d2c6366856d49c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263703
> Reviewed-by: Nathaniel Nifong <nifong@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com

Change-Id: If19f5ceb60c83846baf417f898f57f9dfa2eb59d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263707
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-10 19:11:21 +00:00
Nathaniel Nifong
17175f9ed9 Reland "Add vis of android device clip restriction, fix regular clip vis on gpu"
This reverts commit 66f7ca63b1.

Reason for revert: Attempt initializing all new members

Original change's description:
> Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
> 
> This reverts commit aac8e44d5c.
> 
> Reason for revert: Attempted fix didn't work, still producing red on tree.
> 
> Original change's description:
> > Add vis of android device clip restriction, fix regular clip vis on gpu
> > 
> > Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> > Commit-Queue: Nathaniel Nifong <nifong@google.com>
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> 
> TBR=kjlubick@google.com,nifong@google.com
> 
> Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com

Change-Id: I5acc8a1f0b06e0490125077596d2c6366856d49c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263703
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-10 19:04:11 +00:00
Jim Van Verth
66f7ca63b1 Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
This reverts commit aac8e44d5c.

Reason for revert: Attempted fix didn't work, still producing red on tree.

Original change's description:
> Add vis of android device clip restriction, fix regular clip vis on gpu
> 
> Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,nifong@google.com

Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:57:41 +00:00
Jim Van Verth
1637f117aa Revert "Fix san error by initializing new bool in debugcanvas"
This reverts commit 9c0a9ff3bd.

Reason for revert: Still producing red

Original change's description:
> Fix san error by initializing new bool in debugcanvas
> 
> Change-Id: Ia1bffc019c964b93ddf86f13390ea3e7bff1ce41
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263571
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,nifong@google.com

Change-Id: I121e3e851ea015b7ddcd98ae16b801fd96f011f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263696
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:55:51 +00:00
Nathaniel Nifong
9c0a9ff3bd Fix san error by initializing new bool in debugcanvas
Change-Id: Ia1bffc019c964b93ddf86f13390ea3e7bff1ce41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263571
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:07:21 +00:00
Hal Canary
70a4fd2dfa tools/git-sync-deps works with either python
Bug: skia:9079
Change-Id: Id172efad6bbfaeb1d1f6bc00bcda622588f0a924
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263355
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2020-01-10 16:30:11 +00:00
Nathaniel Nifong
aac8e44d5c Add vis of android device clip restriction, fix regular clip vis on gpu
Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-10 15:30:41 +00:00
Mike Reed
a092028439 Revert "new virtuals for canvas ctm"
This reverts commit 2076b04d15.

Reason for revert: speculative: breaking google3 flutter scuba?

Original change's description:
> new virtuals for canvas ctm
> 
> 1. Feature: Clients need to override didConcat44() (new data)
> 2. Perf: Clients need to override didTranslate (and now didScale) so our
>          default impls can be empty.
> 
> Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
> clients (anyone who subclasses SkCanvas)
> 
> Before (with flag)
>     120.87  	canvas_matrix_4x4	8888
>     108.10 ?	canvas_matrix_3x3	8888
>     108.13 ?	canvas_matrix_2x3	8888
>     141.54  	canvas_matrix_scale	8888
>     128.04  	canvas_matrix_trans	8888
> 
> After (without the flag)
>     ...
>      90.79  	canvas_matrix_scale	8888
>      94.51  	canvas_matrix_trans	8888
> 
> bug: skia:9768
> 
> Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

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

Change-Id: I9c2e39ea0aa2b19d40eb6454c233258ab7f35829
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263564
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-10 14:26:41 +00:00
Mike Reed
2076b04d15 new virtuals for canvas ctm
1. Feature: Clients need to override didConcat44() (new data)
2. Perf: Clients need to override didTranslate (and now didScale) so our
         default impls can be empty.

Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
clients (anyone who subclasses SkCanvas)

Before (with flag)
    120.87  	canvas_matrix_4x4	8888
    108.10 ?	canvas_matrix_3x3	8888
    108.13 ?	canvas_matrix_2x3	8888
    141.54  	canvas_matrix_scale	8888
    128.04  	canvas_matrix_trans	8888

After (without the flag)
    ...
     90.79  	canvas_matrix_scale	8888
     94.51  	canvas_matrix_trans	8888

bug: skia:9768

Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-01-10 13:30:11 +00:00
Brian Osman
f72deddb89 Expose the Input variable and Child name collections in SkRuntimeEffect
Add framework for unit tests that draw (CPU and GPU) with a runtime
shader, as well as couple example tests.

Change-Id: I43b3b39e86634ec55521a2689a4c55c21939dce5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262809
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-08 19:23:13 +00:00
Jim Van Verth
e27670172b Add method to delay drawable acquisition from MTKView
Change-Id: Iad9fadd113d0c97e8ece51df19c7824252d7eb9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263197
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-08 18:28:13 +00:00
Chris Dalton
b832ce61ee Add a path renderer that uses GPU tessellation
Implements a simple first pass for a path renderer that uses the
classic Red Book "stencil then cover" method, and linearizes curves
with GPU tessellation shaders.

The new path renderer is disabled by default, and can only be enabled
in the viewer UI or by passing the "--pr gtess" flag.

Change-Id: Ic9354952e93c8b108577961760b4f0daa82d35aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261715
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-07 20:00:22 +00:00
Nathaniel Nifong
b5d7f7eac0 Fix typo where width/height were swapped in new debug layer manager
Bug: skia:9748
Change-Id: Ibb716e843b4e7068b3bf9b382086ce823755cb82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262381
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-07 18:47:57 +00:00
Brian Salomon
44207f34ea Remove SkIRect::EmptyIRect
Replace with SkIRect::MakeEmpty.

Docs-Preview: https://skia.org/?cl=262382
Change-Id: I001cc76f4af223490be3734bb461ab4fca36d710
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262382
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-06 20:57:56 +00:00
Robert Phillips
41acc0ecb8 Add GrCompressedDimensions helper function
Bug: skia:9745
Change-Id: I75b5ba5767d354346694886adbfc55aaac8b0107
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262231
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-01-06 19:03:23 +00:00
Chris Dalton
e7ee06926f Move "set_path_pt" from SampleAAGeometry into ToolUtils
Copies the function wholesale so it can be reused by other tooling
code.

Change-Id: I8b8f8ceb7dabb12e9e67b8339735f618dc2ccf2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262348
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-06 19:00:13 +00:00
Chris Dalton
c887733740 Add a commandline flag to force offscreen rendering in viewer
Change-Id: I0d6dd3625a8571c09af7557b1727812bba2a9ee4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262355
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-06 17:28:23 +00:00
Nathaniel Nifong
a14d809391 Support using an externally manage list of images in UrlDataManager for wasm debugger.
Bug: skia:9746
Change-Id: I07b5fe1f8f4250e29153b71ce2be106461f09928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261998
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-03 21:25:12 +00:00
Brian Osman
ee426f223f Move SkRuntimeEffect.h to include/effects
Change-Id: I0b11d4210c6e663cfb4854fc33e1396fd79fe9a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-02 17:37:46 +00:00
Ben Wagner
c2b6d7f50b Enable Vulkan Debug layers
Bug: skia:8709
Change-Id: Ie7033d4545df10011af1c1f207bce9ceaff829c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/187921
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-01-02 17:15:46 +00:00
Chris Dalton
37ae4b06e2 Rename GpuPathRenderers::kAll to kDefault
There was never a need to distinguish between "all" and "default".
We can just use kDefalut everywhere. And as we add new path renderers,
we can exclude them from kDefault until they are ready to ship.

Change-Id: I378aa1e195d40daef6a2c54f9c8e829208780ebe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261714
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-31 01:01:17 +00:00
Chris Dalton
e1196c5d01 Add a mechanism to insert framebuffer barriers for NVIDIA tessellation
Bug: skia:9739
Change-Id: I4f13110c30af796edded1d0e18860bcb4a6ef925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261673
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-31 00:18:36 +00:00
Brian Osman
107c66669d Make it safe to include SkRuntimeEffect.h from client code
Bundling the pipeline stage arguments also simplifies the code in
several spots.

Change-Id: I85e81b436a39378f753cc9404b6eeb27fe055525
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-30 21:06:56 +00:00