Commit Graph

4279 Commits

Author SHA1 Message Date
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
Chris Dalton
5a2f962313 Add back door support for GLSL tessellation shaders
Implements tessellation support at the Ganesh level, and adds back
door methods for supplying raw GLSL strings directly to the OpenGL
driver. Adds a new gm to verify tessellation is works in GL.

Change-Id: Idfc285b955cbe5e8e6bf0475be8b518b0cc6ed2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261196
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-27 22:34:10 +00:00
Chris Dalton
5258623d82 Move --internalSamples to common flags
Change-Id: I3120ca817f5fe3dc5969b6b875473f38c2fb8ea2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261667
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-27 22:00:10 +00:00
Brian Osman
93de162dc2 Add SkRuntimeEffect::makeShader
This makes the effect *be* the factory, so we can get rid of
SkRuntimeShaderFactory (and later, SkColorFilterFactory).

Change-Id: I2cd95f1380a0ec1e65fe5a18b1226c042598a8bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261439
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-27 21:50:20 +00:00
Greg Daniel
bfa19c4e76 Add factories to GrSurfaceContext and clean up creation flow.
This CL updates all callers that ending up in GrDrawingManager::makeSurfaceContext
to use the new factory or directly call ctors.

A follow on change will get the rest of the calls which go to
GrDrawingManager::makeRenderTargetContext

Change-Id: I662da654a1ec8b8972c50fe9ce45a9185d4c3dc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260901
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-20 15:05:56 +00:00
Nathaniel Nifong
94de6b40d9 Debugger changes to make layer inspection interactive
Change-Id: Ief4d8c2a90e8f459a64a3c07e97e16d2ef287bfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260403
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-20 14:32:28 +00:00
Brian Osman
088913a63b Start adding unit tests of SkRuntimeEffect
- Change SkRuntimeEffect::Make so *it* can fail, and returns
  [Effect, ErrorText].
- Initial tests just test for expected failure conditions.
  Next steps are to add tests for effects that should work,
  and to validate results on CPU and GPU.

Change-Id: Ibac8c3046104577434034263e9e4a4b177e89129
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261095
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-20 14:15:06 +00:00
Brian Osman
173e153552 Runtime SkSL: API sketch for child shaders/effects
Only works on GPU backend for now, and still only supports
single-argument sample (at original coords).

Change-Id: I4c36ebd0c370ca65126786802c5ea268c3f32edd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260899
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-19 14:40:17 +00:00
Mike Reed
2c38315710 hide/remove obsolete/tricky SkMatrix methods
Change-Id: Iee399b929e8ca1a7326a326a643539d05e333d81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260818
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-12-18 22:29:52 +00:00
Brian Osman
d927bd246d Runtime SkSL: Reflect inputs in SkRuntimeEffect
Adds a new structure to describe the inputs, including type,
shape, name, etc. This removes any references to the type
variables in the compiler's context, and centralizes the
logic for parsing those type variables.

Also normalizes the rules for what types are supported.
(This was inconsistent among the various functions before).

Now:
  - bool and int must be 'in'
  - float may be 'in' or 'uniform'
  - float[2-4] and matrices must be 'uniform'

Includes a new Slide that allows for interactive editing
of a runtime shader.

Change-Id: Ic2af68a80c8bb645ba96417c430da24de0a9c2d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260497
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-18 17:37:55 +00:00
Brian Salomon
4dea72a987 Reland x3 "Remove most of GrConfig.h"
This change makes this safe for Chrome:
https://skia-review.googlesource.com/c/skia/+/260779

This reverts commit 3f1a98b779.

Change-Id: Ic6886ceabbf626040fc527ea10fe06cbe74a3854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-18 17:14:45 +00:00
Ravi Mistry
6f217e0f8d Make OUTPUT_DIRECTORY in ProdDoxyfile configurable
Bug: skia:9514
Change-Id: I628c2a59302e22c8d4c0973def0a3a11f7f882b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260817
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-12-18 16:46:25 +00:00
Chris Dalton
1215cda5a2 Add a kWireframe flag to GrPipeline
Adds the flag to GrPipeline, as well as a 'w' keystroke in viewer for
toggling the alternate global wireframe mode.

Change-Id: I385c31320a5fa2cec79b527a91fa876b19cdff89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260747
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-18 15:55:54 +00:00
Greg Daniel
3f1a98b779 Reland "Revert "Remove most of GrConfig.h""
This reverts commit 5b9c7ba313.

Reason for revert: Looks to still be breaking chrome

Original change's description:
> Revert "Revert "Remove most of GrConfig.h""
> 
> This reverts commit b0047b57b7.
> 
> Change-Id: I0c6df9e9d5c3984987398d2b7f675005828ab3de
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260697
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: Ia9860b39c562368f8a2f84283c52f55593333075
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260642
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-17 23:16:58 +00:00
Brian Salomon
5b9c7ba313 Revert "Revert "Remove most of GrConfig.h""
This reverts commit b0047b57b7.

Change-Id: I0c6df9e9d5c3984987398d2b7f675005828ab3de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260697
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-17 21:23:48 +00:00
Hal Canary
719a8119ae skottie_ios_app: fix tap logic
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: Iddfe7f3c32c00cbd84064835c2dd3a31126c2ece
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260498
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-17 16:09:42 +00:00