Commit Graph

4406 Commits

Author SHA1 Message Date
Robert Phillips
a865a3aedb Improve DDLTileHelper
TileData now gets a pointer to the final surface
   This allows the tile to, once rendered, compose itself into
   the final surface

DDLTileHelper now stores the TileData in a dumb array
   SkTArray is overkill and, since TileData*s are being doled
   out to threads, we never want reallocation

Added DDLTileHelper::kickOffThreadedWork
   The old code only performed DDL creation in parallel. This
   entry point also replays the DDLs and composes them into the
   final surface in parallel

Change-Id: I66e02ef7f8291b4d402e22bee0ad3546e930609e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270796
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-14 18:48:50 +00:00
Greg Daniel
3a36511f21 Remove origin from GrSurfaceProxy.
Bug: skia:9556
Change-Id: Ic95a3a6b11e1ff8a6f6b2f5c5aeb9037b72aae90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270840
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-14 16:52:58 +00:00
Robert Phillips
edf3f38b56 Add makeNotCurrent to TestContext
I find this useful for managing which context is active on threads.

Change-Id: I655955a2351f273751681f080190ca684d29db4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270642
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-13 18:40:52 +00:00
Mike Klein
f7eb0544a8 basic, untested BGR 1010102 and 101010x
Updated every switch that yelled at me, and added support to dm and fm,
and then founds some more switches that shouldn't have defaults...

The tricky spots outside those were mips and dither,
since they aren't simply exhaustive switches.

_Now_ no diffs between RGB/BGR 1010102 and 101010x.

No GPU support.

Bug: skia:9893
Change-Id: I73ab3fd22bdef0519296dfe4cb84031e23ca0be3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270114
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-11 21:44:57 +00:00
herb
660317f6a7 Move scaler context fallback to GDI
The GDI Typeface is the only one that can fail to make a
scaler context. Move all the logic to the GDI specific code.

Change-Id: I50a0a58529bb44625068244e6ae27e54bccd9f67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269913
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-11 19:50:27 +00:00
Brian Salomon
5dd64f37d1 Fix fiddle after change to remove GrSurfaceDesc.
Broken by:
https://skia-review.googlesource.com/c/skia/+/269374

Bug: skia:9891
Change-Id: I9ebe6d0303fc1f868c0c0498c3492047bbd63c7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269901
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-02-10 19:48:24 +00:00
Joe Gregorio
9a37fb6284 [fiddle] Add more logging for setup_backend_objects failures.
Bug: skia:9891
Change-Id: I4d721f8dca8c83b3707719bda613d0306ef49a92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269763
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2020-02-10 16:31:49 +00:00
Brian Osman
7353dc5490 Change SkSL main() from (float x, float y) to (float2 p)
Change-Id: Id046199edd63535ef07e1dfa65fbc7c0f8cefd00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269371
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 20:19:13 +00:00
Brian Salomon
a56a746b7e Remove GrSurfaceDesc
Replace with SkISize.
Also change some const SkISize& params to just SkISize.

Change-Id: I3c72d961662eefeda545fba17d63e877cd5ca813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269374
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-07 19:48:13 +00:00
Brian Osman
788b91678f Remove SkTMin and SkTMax
Use std::min and std::max everywhere.

SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.

Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 18:40:09 +00:00
Jim Van Verth
3a17a32305 Reset current context on Mac GLContext destruction.
Looks like the OS now holds on to the current GL context and doesn't
release it unless explicitly told to.

Bug: skia:9885
Change-Id: Ic7bc6860ec96d88e278682b7f2f67e1ac365d27b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269369
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
2020-02-07 18:20:28 +00:00
Brian Osman
87e3bef6f8 Reland "Switch runtime SkSL to always sample at explicit coords"
This reverts commit d4bf54eac6.

Change-Id: I65bfea4d880de29394e25d44d781fd18508fe337
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266942
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 14:39:29 +00:00
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
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
Robert Phillips
6bad705d9b Additional DDL fix
The DDL bots are hitting a new assert on the tabl_worldjournal.skp after:

https://skia-review.googlesource.com/c/skia/+/260276 (Fix DDL bots)

Change-Id: I69e2c0f05ec48c31d9f6f48de23f1587088751a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260398
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-12-17 14:26:12 +00:00
Greg Daniel
d78a9b45b9 Fixes to skpbench to actually clean itself up nicely.
Bug: skia:9724
Change-Id: Ib6745042e7fbf529fda9d903b3eb1044f4eb4ee0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260399
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-16 21:09:10 +00:00
Chris Dalton
77912983a3 Include line numbers in Viewer's shader error windows
Change-Id: I83bea6e9c94431afba858b0e7b60456e8f9a2176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260356
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-16 19:08:11 +00:00
Hal Canary
efb4ed86cf SkMetalDeviceToGrContext: no longer needs any Skia headers
Also: mv experimental/skottie_ios tools/skottie_ios_app

Motivation:  make using SkMetalViewBridge that much easier for clients.

Change-Id: I985930ae0751d218e89c48c57b69d85ad7a1e703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259279
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-16 18:09:40 +00:00
Robert Phillips
e84bffc746 Fix DDL bots
This fixes the proximal issue w/ the new DDL images. The underlying issue appears to be that the GIF decoder isn't available on all platforms.

Change-Id: I117b6460e09b2c7815d84929a340579690c15945
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260276
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-12-16 17:13:00 +00:00
Mike Reed
cf0e3c63fd remove dead code around old SkPath enums
Change-Id: I8dc06da48e881d3a9c40b47c799afe27bdcce819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257689
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-14 01:58:10 +00:00
Nathaniel Nifong
a072b7b275 Remove an uncessary and unused parameter for partially generating the JSON command list
All caller were passing the maxium value, those that weren't still function if they are made to.

Change-Id: Id9b5d8dbbbdf10a02ea0f3b21d500059ec383e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259808
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-13 19:30:03 +00:00
Mike Klein
f46d5ca492 use std::make_unique
Change-Id: I7c672ff6b8eb95ec8c1123a5bfdb202e1644f494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-12-12 22:32:45 +00:00
Nathaniel Nifong
20b177a9bf Parse android layer annotations in debugger, play back layers
Bug: skia:9626
Change-Id: I3ae8fa83520690f9af534e9ab0b70834d7890fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256100
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-12 16:32:44 +00:00
Nathaniel Nifong
c84ad83df8 Fix audit trail visualization bugs
Change-Id: Ib488f11980da110a03ca832203db4bc35c456887
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259417
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-11 23:07:05 +00:00
Florin Malita
1bb3a6dae5 [skottie] Add SkottieSlide frame rate UI option
Also store fTimeBase as a double/ns, since uint/ms doesn't have enough
precision when setting progress manually.

Change-Id: Ic01a55cea5897dd8b43d2d54f4a98e08e7406af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259172
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-11 22:40:42 +00:00
Florin Malita
15ee970d79 [skottie] Add frame time histogram to SkottieSlide UI
Ignoring GPU flush for now...

Change-Id: Ie28718ee528ac3f708c0237472845b3cca47f97d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259160
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-10 19:57:58 +00:00
Florin Malita
c4f6e024ca [skottie] Initial SkottieSlide UI
- reveal on hover over lower region
 - live progress bar

Planning to add more features.

Change-Id: I776d5b525070c8894ae2ca3a9d9d7c407399b9e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259158
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-10 19:08:34 +00:00
Nathaniel Nifong
732c49739f Return image address in image info so it can be shown in dropdown.
Note that I don't dereference this pointer, I'm just showing it to the user as it is currently
the only common identifier between the command list and the resource tab.

A longer term fix would be to show the resourse tab's indices in the command list. this is tougher
because it involves replacing UrlDataManager without breaking skiaserve.

Change-Id: Iaa0d60831e96128f19b6358e82b2e89f80444927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258800
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-12-10 14:40:43 +00:00
Florin Malita
870374825b [skottie] Explicit seek(0) in tools
With recent deferred image loading changes, Skottie relies on clients
to always/explicitly seek() before drawing a frame.

Some of the existing tools are still attempt to draw before the first
seek() fires (the animation callback is not guaranteed to occur before
the first draw).  For these, add an explicit seek(0) after loading the
animation, to ensure valid state.

TBR=
Change-Id: Ie453559af2d96560602b5e6508c25169dffb484d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258805
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-09 16:35:02 +00:00
Ben Wagner
5da8e55bf4 Protect against invalid text.
SkFont::countText returns -1 to let the user know that the text was not
valid in the encoding specified. Users need to check for this and act
appropriately. Otherwise in debug and assert will probably fire and in
release unexpected things may happen.

Change-Id: I6ce91aa3d978fe5265b659f759b4023b81da261f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258639
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-12-06 23:34:36 +00:00
Robert Phillips
3968fcbc3a Pull creation of GrPipeline explicitly into the Ops' onExecute methods
This is a first step towards pulling the creation of the GrProgramInfos explicitly into the Ops' onExecute methods. We need this behavior so programInfo creation can be moved forward to onPrePrepare.

For now, pipeline creation is a static member on GrSimpleMeshDrawOpHelper so GrPipeline creation can be bottle-neckedOps for Ops that don't use the helper. In some future world CreatePipeline could become non-static to reduce some of the duplicate code.

Bug: skia:9455
Change-Id: I2d35dd223db824e84616f5df0f1dca34c1b6e412
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258003
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-12-06 16:33:15 +00:00
Eric Boren
46e2d8d4a1 [infra] Use "mod download" and "install", not "get" in chrome_release_branch
Change-Id: I96bc057df6b538138827fac7129126381038656a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258240
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-12-06 11:16:41 +00:00
Brian Osman
ffbfd1bc78 Particles: Remove play-position thing, simplify mouse tracking
Change-Id: I36ce78ee1de8096d9aa164444e8af31b3831a3ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258217
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-05 20:07:13 +00:00
Brian Salomon
b0047b57b7 Revert "Remove most of GrConfig.h"
This reverts commit 80e334dad8.

Reason for revert: Chrome is including our private headers which means this breaks the Chrome roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1953757

Original change's description:
> Remove most of GrConfig.h
> 
> Change-Id: I0f693bed0778151f93d07cd42c6b597566695ab1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257999
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie206db9865a7f9a7e334eb248de8cff38dd31d15
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258356
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 19:52:48 +00:00
Brian Salomon
80e334dad8 Remove most of GrConfig.h
Change-Id: I0f693bed0778151f93d07cd42c6b597566695ab1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 18:37:33 +00:00
Greg Daniel
f0e04f0c31 Always destroy resources instead of simply "abandoning" them in Vulkan backend.
This also now requires that when using a vulkan GrContext, the backing VkDevice,
Queue, and Instance must be alive when the GrContext is first destroyed or
abandoned. Additionally any GrBackendTextures created from the GrContext must
be deleted before destroying or abandoning the GrContext.

Bug: skia:9603
Change-Id: Ibf194d2ffdcddd61e34214d7d59a2d9a33c880e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257921
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-05 14:45:45 +00:00
Brian Salomon
4e1066f248 Remove SkSize& SkSize::operator=(const SkISize&)
Having it means you cannot write:

SkSize size;
float x, y;
size = {x , y};

clang allows it but GCC does not, claiming it is ambiguous between the
implicitly generated
SkSize& SkSize::operator=(const SkSize&)
  and
SkSize& SkSize::operator=(const SkISize&)

clang gives the same error if the former is explicitly declared default.

Change-Id: I3b64436ef6aa669b3d87e7f37057c5dcb4add987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-04 17:36:06 +00:00
Hal Canary
a06f9d0787 SkQP: model-creation improvements
- cut_release/find_commit: use cookies, handle errors.

  - tools/skqp/make_skqp_model.cpp: better error handling

Change-Id: I702e9a13d3a2123c30e3a870fcb942759cfc47c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257682
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-04 17:08:36 +00:00
Stephen White
a521c962b1 Update dawn.h -> webgpu.h, dawn_cpp.h -> webgpu_cpp.h.
Also fix some compile breakages from recent Skia changes.
No changes to Skia API.

Change-Id: Ifd0b1d89fb4ea3cf1f6a7170f2f74614276364ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257877
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-12-04 15:24:16 +00:00
Eric Boren
7e9dc42228 [infra] Auto-submit the CL to update supported branch configs
Change-Id: Ib4baeec7dc7247b81c7e4a1ef7f85ef378e4be19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257621
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-12-04 12:44:46 +00:00
Kevin Lubick
6bbeaa7c64 [skottieWASM] make sure we are using CPU or GPU correctly
Change-Id: Ib9013fa9bedbbbf8a7787ef2a75d707dd6360cf8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257635
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2019-12-03 18:29:53 +00:00
Brian Osman
9dac0d8216 Particles: Better integration for ResourceProvider
This untangles some of the dirty state tracking and dynamic rebuilding
support (that's only needed for the GUI editor), so the core code is
more streamlined. It also paves the way for feeding the RP to bindings.

Change-Id: I208ec59622154fdb2845c3ae8f7efb070d1abfc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257476
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-03 14:12:50 +00:00
Brian Osman
d12f2786e2 Use ResourceProvider in particles
Currently just for image drawable, but going to use this for
references to other kinds of data in bindings, too.

Change-Id: Ic6673530013337bbaadd2d3f1c040626ec24ffb8
Bug: skia:9513
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256776
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-27 16:45:23 +00:00
Brian Salomon
c241b58965 Make fragment processor iterators work with range for loops.
When iterating over the coord transforms or texture samplers of a
FP also have access to the owning FP.

Pass a coord transform range to GPs rather than a pointer to an
iterator.

Change-Id: If7c829a67dce6600d7f49e12d6f49f685dcace3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256216
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-11-27 14:32:43 +00:00
Robert Phillips
933484f6bb Stop using GrPixelConfig in Metal & Dawn's GrProgramDesc creation
In order to be able to create GrProgramDescs pre-flush we would like as little reliance on the GrRenderTarget as possible (also GrPixelConfig is going away).

Bug: skia:9455
Change-Id: Ie35c87758bb1ed97c99c6e9e130eaeb3355f4139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256457
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-26 17:51:34 +00:00
Mike Reed
7d34dc7747 Revert "Revert "switch to new filltype for SkPath""
This reverts commit 3e7af41224.

Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-11-26 17:43:14 +00:00
Brian Osman
849f4d6571 Copy SkottieUtils' classes into skresources
For now, we'll have two copies. Once clients are using the skresources
versions exclusively, we can remove the originals from skottie.

Change-Id: I3152f526b0505b8374bdd9b4513a80bddc702ccc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256416
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-26 14:25:44 +00:00
Mike Reed
3e7af41224 Revert "switch to new filltype for SkPath"
This reverts commit 3a50981a83.

Reason for revert: chrome win build found compile-problem in xpsdevice

Original change's description:
> switch to new filltype for SkPath
> 
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-26 03:34:30 +00:00
Mike Reed
3a50981a83 switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-25 22:31:46 +00:00
Florin Malita
dd5ba942eb [skottie] Use seekFrame in skottie2movie
Produces more precise frame synchronization.

Change-Id: Ie9cd85cfbcab9eca827126feae48bb6836795983
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256217
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-11-25 13:35:45 +00:00
Brian Salomon
e21af50dc6 Test texture domain effect with local matrix.
Add a common way to make rect op for testing that uses a GP with a local
matrix.

Change-Id: I958d1230bd5067b2e4b60fcd374e2f7718681e43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255782
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-11-22 22:37:33 +00:00
Robert Phillips
34cea00bdf Add utility for creating test-only GrProgramInfos
This is complete overkill for what these GMs require but it will help centralize things.

Change-Id: If30cbd9a9cfc8fcc1fe96fc9ca1b4cb17cdeb4bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255824
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-22 19:01:14 +00:00
Mike Klein
fee0079e77 rough unit test support for FM
I've punted for now on GPU test support.

Change-Id: I2ebe54a6fc61e1ce92120a6a221d5bb936b047e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255874
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-22 15:49:33 +00:00
Hal Canary
389c8e9d2d [minor] mark scripts as executable
if a filename ends with `.py` and  the file begins with '#!.*python.*',
make it executable.

Change-Id: I41de516ff37343d3b0979bde9fd61813aec7365c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254439
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-11-21 17:06:27 +00:00
Hal Canary
2dad99092c Replace third_party/gif: Preflight changes
Something is breaking client code in unexpected ways.  Let's try this
piecemeal.

  - skia_libgifcodec_path gn var. Default is
    third_party/externals/libgifcodec.  Anfroid framework uses
    third_party/libgifcodec.

  - skia_use_libgifcodec gn var; defaults to !skia_use_wuffs.  Allow
    disabling both codecs.

  - GN template("optional"): add public_include_dirs, similar to
    public_defines.

  - SK_USE_LIBGIFCODEC, ifdef for skia_use_libgifcodec.

  - SkCodec.cpp: use SK_USE_LIBGIFCODEC

Original CL:  https://review.skia.org/254582

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Bug: skia:9654
Change-Id: I70561f5f945656065e4b318d5fff505961fb0b6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255578
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-21 15:19:41 +00:00
Hal Canary
f7cb902904 Revert "Replace third_party/gif with new DEPS entry."
This reverts commit 6d29bfbfcd.

Reason for revert: try to fix g3 roll.

Original change's description:
> Replace third_party/gif with new DEPS entry.
>
>   - skia_libgifcodec_path gn var. Default is
>     third_party/externals/libgifcodec.  Anfroid framework uses
>     third_party/libgifcodec.
>
>   - skia_use_libgifcodec gn var; defaults to !skia_use_wuffs.  Allow
>     disabling both codecs.
>
>   - BUILD.gn `gif` optional source_set: use new skia_libgifcodec_path
>     code, not third_party/gif code.
>
>   - GN template("optional"): add public_include_dirs, similar to
>     public_defines.
>
>   - SK_USE_LIBGIFCODEC, ifdef for skia_use_libgifcodec.
>
>   - SkCodec.cpp: use third_party version of SkGifCodec.h.
>
>   - src/codec/SkGifCodec.*, third_party/gif/*: remove files.
>
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
> Bug: skia:9654
> Change-Id: Ie22d2bb7e52322fd3eedb97015f3aec2ce5e3402
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254582
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=djsollen@google.com,halcanary@google.com,rmistry@google.com,scroggo@google.com

Change-Id: I427e1a073c0574e1502b6196873ac3001a22250b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9654
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255534
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-11-20 20:54:44 +00:00
Hal Canary
6d29bfbfcd Replace third_party/gif with new DEPS entry.
- skia_libgifcodec_path gn var. Default is
    third_party/externals/libgifcodec.  Anfroid framework uses
    third_party/libgifcodec.

  - skia_use_libgifcodec gn var; defaults to !skia_use_wuffs.  Allow
    disabling both codecs.

  - BUILD.gn `gif` optional source_set: use new skia_libgifcodec_path
    code, not third_party/gif code.

  - GN template("optional"): add public_include_dirs, similar to
    public_defines.

  - SK_USE_LIBGIFCODEC, ifdef for skia_use_libgifcodec.

  - SkCodec.cpp: use third_party version of SkGifCodec.h.

  - src/codec/SkGifCodec.*, third_party/gif/*: remove files.

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Bug: skia:9654
Change-Id: Ie22d2bb7e52322fd3eedb97015f3aec2ce5e3402
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254582
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-20 19:07:00 +00:00
Hal Canary
3e2ecd205f SkQP: remove unused script
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Change-Id: Ic61d4aad5b903d3fe48183606a22234a45bf9a9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255517
Reviewed-by: Hal Canary <halcanary@google.com>
2019-11-20 14:54:44 +00:00
John Rosasco
24cbdab97e SKQP Build for Fuchsia SDK
Change-Id: I2619784eca0f7a4dd66f2db0104cb746d9266b4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244369
Commit-Queue: John Rosasco <rosasco@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-18 12:34:28 +00:00
Jim Van Verth
7b55818248 Add flag to Viewer to trigger continuous redraw.
Change-Id: I71059001567b39afc486a2f099efdffde42b0d1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254681
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-11-15 13:46:50 +00:00
John Rosasco
a9b348f66c Reland fully delineate GL usage w/ skia_use_gl.
Change-Id: I90f40467be145537cc08461fd3805606432f0cfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254240
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Rosasco <rosasco@google.com>
Auto-Submit: John Rosasco <rosasco@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-11-12 21:43:44 +00:00
Colin Cross
654eb2ad04 [SkQP/Android] Replace -Weverything with -Wextra
-Weverything is not recommended, use -Wextra.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Bug: b/143713277
Test: mma
Change-Id: Ibaca86bd52348d544a8109b25ae013001444935d
Reviewd-on: https://android-review.googlesource.com/1163299
Cherry-pick: 29cd4eca88df5fafde51ee9a50e3deb96263fc64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253956
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-12 16:49:29 +00:00
Mike Klein
4135cf0b57 use round() instead of trunc() to f32->unorm
This does open us up to a little bit of possible inconsistency of
rounding when right on a x.5 (sometimes we'll +0.5 and trunc, sometimes
round to nearest, sometimes round according to the default mode which is
usually round to nearest) but I think that inconsistency may be worth
the free register not needing a splat(0.5f) buys us.

A few invisible diffs.

Change-Id: I9af092c937ccf7c5891c2ab3cb298d217e4a9e9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253725
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-08 21:28:07 +00:00
Mike Klein
6e4aad91c3 rename to_i32 -> trunc, and add round
This plumbs through round but doesn't use it.  I want that change to be
its own CL.  It's nice to have assembler support and the name changes
even if I revert using round.

Change-Id: I6d67ec5c63546069eb7cc1c91599b599bafcda66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253724
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 21:00:51 +00:00
Robert Phillips
fcaae486d7 Use GrProgramInfo's primitiveType field
This improves the encapsulation of all the data required to make a program/pipeline w/in the GrProgramInfo class.

Bug: skia:9455
Change-Id: Ib41519c8ded9f27a7bbe787097a431b38ab101bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253376
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-07 16:15:04 +00:00
Robert Phillips
0efc01d540 Revert "Fully delineate GL usage w/ skia_use_gl"
This reverts commit 078cf3e3b2.

Reason for revert: Appears to be blocking the Chrome roll due to Fuchsia build failures

Original change's description:
> Fully delineate GL usage w/ skia_use_gl
> 
> Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=mtklein@google.com,bsalomon@google.com,halcanary@google.com,rosasco@google.com

Change-Id: I17ba79bfe6e7f81c126eddbd50ca5384cfa4179c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253098
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-06 17:19:48 +00:00
Nathaniel Nifong
272060a18a find min and max, separared by comma. not minmax.
Change-Id: I04fbd9e1019a42fd7ee6d6ff8c8ec859d85c5aed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252932
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-11-06 16:35:23 +00:00
John Rosasco
078cf3e3b2 Fully delineate GL usage w/ skia_use_gl
Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-06 15:15:03 +00:00
Nathaniel Nifong
a2b2214047 Record min and max frame times from skpbench in perf
This should only add about 20kb per day to the data accumulated in perf.

Change-Id: Ia1ff49aa2987e3cfe435e35b5826cf1383746813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252485
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-11-06 15:01:13 +00:00
Greg Daniel
e643da6ab8 Add new macro for checking device lost when making Vulkan calls.
This CL itself doesn't really change how anything is running today. However,
it is the first step into gracefully supporting a vulkan device lost return
error and being able to correctly clean everything up.

Bug: skia:9603
Change-Id: I9693c514a32ca437df61a7aee63651e2e40ee1c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252819
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-11-05 18:56:35 +00:00
Ben Wagner
057985ad67 Fail Skpbench on unsupported hardware
Stop running Skpbench on unsupported hardware.

Change-Id: Iafde07d493dcccdd41dffea09255da68cf44afdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252044
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-11-05 18:21:19 +00:00
Brian Salomon
e9b546970e Add valgrind suppressions for GrClearImage
Similar to existing supprresions for bogus errors in GrConvertPixels.

Change-Id: I50f3b47ca3a88c71af532fa69aa2566ad0f03753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-11-05 15:46:13 +00:00
Jim Van Verth
923dad7a47 Fix memory leak in iOS viewer.
Forgot to add code to drain the Autorelease pool, so objects created
with autorelease just built up over time.

Bug: skia:8243
Change-Id: I373c6820df8ee102b110386377378858c235b2fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252601
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-11-04 20:35:21 +00:00
Hal Canary
5e5f9dc32b tools/git-sync-deps: enforce commit hash in DEPS, not tags or branches
Change variable name to reflect that.

Also, pass '--no-checkout' to git-clone to suppress "warning: remote
HEAD refers to nonexistent ref, unable to checkout" error message.

Also, change '@' to '>' in verbose output if anything changes in the
repositories.

Change-Id: I27d0b026d121c163e378f34ab2bbe81233ddba1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252177
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-01 17:22:40 +00:00
Mike Klein
ed2cec4b68 add --quick to fm
This is handy for cutting irrelevant tool costs from a CPU profile.

Change-Id: Ib1d5a64a01866333e4e83351571dcb7c282ee9dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252152
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-11-01 16:24:44 +00:00
Stephen White
3cc8d4fb7f Dawn: s/dawn::/wgpu::/g.
The new webgpu_cpp.h hotness for native apps brings with it a new
namespace: wgpu. This is a straight substitution.

Note: no Skia API changes.
Change-Id: I12b26417e76838cd8fa2b39b8161cbaa2cd8fa78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251660
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-30 14:29:46 +00:00
Florin Malita
f22dda9601 [skottie] Fix skottie2movie after async API change
TBR=
Change-Id: I4793d3540f3b5f5fa06ce7a3d1ce2a281660fb72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251255
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-28 23:28:25 +00:00
Hal Canary
a979b28cbb SkQP: mark several gms as unsuitable for skqp
This will make the Android 11 release go much smoother.

See: https://review.skia.org/228339 skia:7691 b/138466039 b/136618832

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I3fa48fa18ee20135e3c58e5c13a3cfffc0f88937
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248797
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-10-25 18:21:23 +00:00
Hal Canary
e107faa062 SkRemoteGlyphCache Add tracing to diff canvas
Use `extra_cflags=["-DSK_CAPTURE_DRAW_TEXT_BLOB"]` to enable.

Change-Id: I1d6db478ee91696cdce090647b889c17a83a2718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250259
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-10-24 17:09:31 +00:00
Brian Salomon
4eda7108a2 Simplify sk_gpu_test::MakeTextureProxyFromData.
Make it take GrImageInfo.

Change-Id: I9ec16e9b935fbe3e829b4669f715c17873a1793a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249813
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-21 20:04:37 +00:00
Florin Malita
cfbc4d496d [skottie] Add DataURI image support in utils/tools
BodyMovin can export inline (dataURI) images.

Change-Id: I821a2e225359f8ac37d4d2c9479d4ff5d78f924e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249516
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-21 18:02:39 +00:00
Hal Canary
051f7d66e1 Docs: include/docs with doxygen
Change-Id: Ic9e0040d12e92ba1fe91813ed1daaf83e28316d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249536
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-10-18 20:38:37 +00:00
Jim Van Verth
cbf59e0e39 Use LazyProxy to set up Metal swapchain.
The purpose of this is to delay acquiring the next drawable in the
swapchain to avoid stalling and gain better parallel execution between
the CPU and GPU.

Change-Id: I40ef7672394fd00616de43685530d2feaf7cab2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249005
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-18 14:04:41 +00:00
Stephen White
7b86d4e8a2 Dawn: allow CopySrc usage of swapchain texture.
This allows readbacks, which fixes backdrop_hintrect_clipping test.

Change-Id: I6b9002d7387b0bc79301848a2e7c70deb7b95f70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249418
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-10-18 13:56:31 +00:00
Hal Canary
c99a4df86e WebGL2: Add BlitFramebuffer, ShaderDerivativeSupport
fix from paraboul@

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit

Bug: skia:9052
Change-Id: If0c408f33f4bb6cd47513a2c1f3a1e3ac3da3320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249228
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-17 20:05:39 +00:00
Kevin Lubick
87fe9b0395 Tell rewrite_includes to ignore node_modules
Change-Id: Ibd82b52d15f9de7fbbd4a5a91d7be8310f6568d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249135
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-10-17 19:44:49 +00:00
Stephen White
883c7e9f59 Dawn: silence some warnings on win-clang.
Change-Id: Ifcab9738b5e1d17ed71e26fa30bb34951e421567
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249126
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-10-17 15:10:34 +00:00