Commit Graph

745 Commits

Author SHA1 Message Date
Stephen White
a800ec96f7 Dawn: implement sk_app window contexts for all backends.
Implement Window contexts for D3D12, Metal and Vulkan, as well as
a base class for all of them (DawnWindowContext).
Implement WSI, swap chains and external textures for all backends.
Add Dawn support to Viewer app.

Change-Id: I9368eae8d43594821aa1edd9fd559c8a9ba30066
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228060
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-08-02 19:51:02 +00:00
Hal Canary
1f94d3900b experimental/editor: clean up BUILD.gn
Place build rules in experimental/editor/BUILD.gn to keep the top-level
BUILD.gn file smaller.

Change-Id: Idf22aec6f86bc510f4528fe0296bc1bea69f3df2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230740
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-07-30 14:28:58 +00:00
Ben Wagner aka dogben
e19a4f2614 Revert "experimental/editor: depend on ICU, handle word-left and word-right"
This reverts commit de23697549.

Reason for revert: Causing segfault on Mac builders; BUILD.gn needs to be formatted.

Original change's description:
> experimental/editor: depend on ICU, handle word-left and word-right
> 
> In App: ctrl-left-arrow and ctrl-right-arrow.
> 
> Added a TODO about using better notion of a word.
> 
> Bug: skia:9020
> Change-Id: I6f2b930928b9d38bca47291fd39dde7f93ccac03
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230417
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com

Change-Id: I62dc160d8ae1ce58878b8e222a4d7860cc92ddfe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9020
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230577
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-07-29 20:55:36 +00:00
Hal Canary
de23697549 experimental/editor: depend on ICU, handle word-left and word-right
In App: ctrl-left-arrow and ctrl-right-arrow.

Added a TODO about using better notion of a word.

Bug: skia:9020
Change-Id: I6f2b930928b9d38bca47291fd39dde7f93ccac03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230417
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-29 20:19:31 +00:00
Brian Osman
f564f1515b Move cpu_modules inside skia_enable_tools
Skia clients shouldn't have to worry about this

Change-Id: I3a1cc191a7d4da88cf23a59cb3043cfb8b868f2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229382
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-07-24 13:16:35 +00:00
Mike Klein
84bcd0c3ae skvmtool upgrades
fix toy square program
  add a new toy plus_one program
  also run stock srcover programs
  time at N=15,255,4095

e.g.
            plus_one	 69 Mpx/s	435 Mpx/s	615 Mpx/s
              square	 73 Mpx/s	393 Mpx/s	527 Mpx/s
         srcover_f32	 19 Mpx/s	 38 Mpx/s	 39 Mpx/s
         srcover_i32	 36 Mpx/s	 89 Mpx/s	103 Mpx/s
   srcover_i32_naive	 34 Mpx/s	 85 Mpx/s	 91 Mpx/s
    srcover_i32_SWAR	 49 Mpx/s	169 Mpx/s	191 Mpx/s

Change-Id: Ie041603bf1b458472dd477c64a91c61162a362e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229396
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-07-23 17:46:35 +00:00
Stephen White
985741a554 First draft of Dawn backend: clears are working.
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.

Change-Id: I443f3370522639e82f2fa0eebe6b206c372f13a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228137
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-18 18:09:12 +00:00
Brian Osman
f5ac1992db Fix always recompiling with skia_compile_processors enabled
We moved the script output to 'generated' but never updated the expected
outputs location in GN, so ninja always thought the headers were missing.

Change-Id: Ib9519ce880d1bc4ad5056c17f19a9a7df75e77ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228346
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-07-18 16:45:17 +00:00
Greg Daniel
fad9fbc3c4 Revert "First draft of Dawn backend: clears are working."
This reverts commit 6cebea42a8.

Reason for revert: breaking google3 roll

Original change's description:
> First draft of Dawn backend: clears are working.
> 
> First draft of (mostly stubbed-out) GrDawnGpu.
> Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
> First draft of DawnTestContext.
> First draft of psuedo-fences for Dawn, implemented with MapReadAsync.
> 
> Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,senorblanco@chromium.org

Change-Id: Ie494b5a403e8537c6539551533ae8b9156e90a61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228120
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-17 17:23:02 +00:00
Stephen White
6cebea42a8 First draft of Dawn backend: clears are working.
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.

Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-17 16:29:22 +00:00
Hal Canary
e574f1e409 [reland] SkMetaData: move from src/ to tools/
Original: https://skia-review.googlesource.com/c/skia/+/227436
Change-Id: Iec326027319f39b0402e1b5c03b327cb26249159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227778
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-17 13:14:38 +00:00
Mike Klein
08ba113703 test (and fix?) SkVM JIT on arm64 Android bots
This has failed in the past on GPU perf bots,
I think because I've been flushing the cache wrong?

Try switching over to __builtin___clear_cache(), what I used
a few years ago when I last tried to do something like this.

Cq-Include-Trybots: skia.primary:Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android
Change-Id: Ic5e366022eb15f4544fb7b90a75f8c51e36392ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227421
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-07-17 00:31:05 +00:00
Mike Klein
977e53267e test SkVM JIT on Mac bots
Not sure why this isn't already on.  x86-64 Mac and Linux use
the same ABI, and I've been testing this already on several Macs.

Change-Id: Ibc96ba027f6ae6d5fae20585949862474c2c59f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227420
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-07-16 22:01:37 +00:00
Greg Daniel
12e7585495 Revert "SkMetaData: move from src/ to tools/"
This reverts commit 9d844d8ce5.

Reason for revert: breaking google3

Original change's description:
> SkMetaData: move from src/ to tools/
> 
> Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
> 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>

TBR=halcanary@google.com,bungeman@google.com

Change-Id: Ifadad46f0663b743d3e57bb6317707f2a2fac07d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227636
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-16 00:28:44 +00:00
Hal Canary
9d844d8ce5 SkMetaData: move from src/ to tools/
Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
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-07-15 18:45:09 +00:00
Hal Canary
41248071ac tools: separate TimeUtils from AnimTimer
gm, slides, and samples no longer need to know about the implementation
details of AnimTimer.

This
    virtual bool onAnimate(const AnimTimer&);
becomes this:
    virtual bool onAnimate(double /*nanoseconds*/);
which is much easier to reason about.

AnimTimer itself is now part of viewer.

Change-Id: Ib70bf7a0798b1991f25204ae84f70463cdbeb358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226838
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-12 15:05:01 +00:00
Stephen White
0d70b716ca Add first Dawn dependencies.
Add Dawn repo to DEPS.
Add skia_use_dawn flag to BUILD.gn (default false).
Add Metal.framework for Mac when building for Dawn/Metal.
Add d3d12, dxgi, d3dcompiler libs when building for Dawn/D3D12.
Disable SPIRV validation when building for Dawn.
Add BUILD.gn for dawn and dawn/third_party libraries.

(Note that I had to split the declare_args() section of BUILD.gn
into two, so that I could refer to skia_use_dawn in skia_enable_spirv_validation.
If there's a better way to do this, I'm open to suggestions.)

Change-Id: I9bdaf990694f6b8bcce6b77c1a8b1620a7396e34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225137
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-10 21:21:17 +00:00
Brian Osman
489cf8888c Reland "Make the SkSL interpreter opt-in"
This reverts commit b6b966aa43.

Change-Id: I58c34fc8520384157c5adb0056f3568b8ef1d844
Bug: skia:9230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225939
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-07-09 15:45:24 +00:00
Brian Osman
b6b966aa43 Revert "Make the SkSL interpreter opt-in"
This reverts commit 5cfbee286d.

Reason for revert: Breaking DM in Google3

Original change's description:
> Make the SkSL interpreter opt-in
> 
> Bug: skia:9230
> 
> Change-Id: I50b707a7dd372882a983a4570810dae05c2a3638
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225723
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I5ba231ab75dd44cc1d22d497f9d7e4b732e3aa14
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225938
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-07-08 20:47:03 +00:00
Craig Stout
b27aeb71b8 [fuchsia] Use //src/graphics/lib/vulkan for in-tree build
Change-Id: Ifd4f0f9e91377f543393cfb2e26f9d21ce807d2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225417
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Craig Stout <cstout@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Craig Stout <cstout@google.com>
2019-07-08 20:20:13 +00:00
Brian Osman
5cfbee286d Make the SkSL interpreter opt-in
Bug: skia:9230

Change-Id: I50b707a7dd372882a983a4570810dae05c2a3638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225723
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-07-08 19:44:22 +00:00
Mike Klein
7e65076ae3 move Builder/Program dump()
This is test-only code only used by SkVMTest.cpp,
so it can live there.  This cuts the dependency
of SkVM on SkStream and co.

Change-Id: I7695e527b2d16e4485f8c5f4cd39bb8300e9221d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225321
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-02 23:10:23 +00:00
Mike Klein
b5f95cd1f8 tool support for SkVM JIT on aarch64
- Add quick-building skvmtool
    - Remove SkString dependency
    - Add aarch64 support for perf dumps

Here's what I see on now for the tiny skvmtool program:

x86-64 (Xeon Gold 6154)
           │      skvm-jit-1707131987():
     24.93 │   0:   vmovups (%rsi),%ymm0
     50.13 │        vpmulld %ymm0,%ymm0,%ymm0
     24.93 │        vmovups %ymm0,(%rsi)
           │        add    $0x20,%rsi
           │        sub    $0x8,%rdi
           │      ↑ jne    0
           │        vzeroupper
           │      ← retq

aarch64 (Cortex A53)
           │      skvm-jit-485593645():
     11.55 │   0:   ldr    q0, [x1]
     47.65 │        mul    v0.4s, v0.4s, v0.4s
     31.77 │        str    q0, [x1]
           │        add    x1, x1, #0x10
      8.66 │        subs   x0, x0, #0x4
           │      ↑ b.ne   0
      0.36 │      ← ret

Change-Id: Ia83ebdc6d96c8bd367bce0e8f2792b5e5c79f750
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225186
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-02 20:11:19 +00:00
Mike Klein
ba41df7c60 disable SkVM JIT on Android
Crashing Nexus5x GPU Perf bots, who knows why...

Cq-Include-Trybots: skia.primary:Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android
Change-Id: I351bb15651015561cd54b13c6e3732fd79c53cf8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224287
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-27 23:18:03 +00:00
Mike Klein
0ef3f53c8e aarch64 JIT first pass
- this is enough to run some of the test programs
  - a couple instructions TODO: load8, store8, bytes,
    so I32_SWAR and I32 are not yet JIT'd, but F32
    and I32_Naive are

Change-Id: I1d97cff24aa7307726c722cce45896ed319877e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224194
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-27 20:15:29 +00:00
Nathaniel Nifong
0c4fbf1bbb Include sharing proc in skia static library when building for android.
So it can be used for SKP serialization.

Bug: 9203
Change-Id: I094d5222f220bb79c7f61fd5ebebf48e23e97b0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223705
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-06-25 20:37:53 +00:00
Mike Klein
6bbeb4ab72 remove xbyak
For now, disable the vpmovusdb AVX-512 instruction, using the compound
AVX2 fallback instead.  I need to learn how to encode EVEX prefixes
before we can use that, and it's not very important.

That's everything!  We're fully in control now, and should be able to
run this on any x86-64 Linux or Mac.  And we can relax some of the
defined(SKVM_JIT) guards so that, e.g., we can unit test Assembler even
on all platforms.

Stifle some warnings about ~bool by ~(int)bool.

Would like to enable when is_mac too but can't seem to get past
(bogus?) thread annotation on the bots.  My local Mac is fine. :/

Change-Id: If00bdd97ebd9684ed109933e2fa70c5e6f6ea339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222631
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-22 00:16:38 +00:00
Nathaniel Nifong
0426c38daa Reland "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This is a reland of 7635013ad1

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

Bug: 9176
Change-Id: Ifef1ff45ac0013ba3015f88c7ecd75527b28b604
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222505
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-06-21 15:49:21 +00:00
Brian Salomon
384981be3d Revert "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This reverts commit 7635013ad1.

Reason for revert: breaking bots 

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=djsollen@google.com,mtklein@google.com,kjlubick@google.com,reed@google.com,nifong@google.com

Change-Id: Ie5e5dac46ba1beeb8de0a29c1a7be1264616fe92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222502
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-20 18:52:01 +00:00
Nathaniel Nifong
7635013ad1 Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-06-20 17:33:04 +00:00
Brian Osman
fb32ddf622 Revert "Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU""
This reverts commit 37a59ef1af.

Change-Id: If38da265ebbb196e72c7d035ba51028438787e2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221541
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 14:47:12 +00:00
Robert Phillips
37a59ef1af Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU"
This reverts commit 90507286cc.

Reason for revert: Seems to be breaking some builds

Original change's description:
> Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU
> 
> Change-Id: I7236a30040ab532086e68d6e9de2898dd7acaa32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221098
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com,brianosman@google.com,ethannicholas@google.com,reed@google.com

Change-Id: Ie230315a72ebcfae32bc9ce7bafec1f87106cff2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221536
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-18 11:35:18 +00:00
Mike Klein
17a9655db2 enable SkVM JIT testing on x86-64 Linux bots
Change-Id: Id87d8e7f4d9ae458f2eb79c82682702f659dec43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221271
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-18 00:29:45 +00:00
Brian Osman
90507286cc Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU
Change-Id: I7236a30040ab532086e68d6e9de2898dd7acaa32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221098
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-17 21:16:18 +00:00
Mike Reed
d62d406aa2 Revert "Revert "try resolver pattern""
This reverts commit 2bafb64ed3.

Change-Id: I46f29284546a8978fd0005a0937e28410e5ac0da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220518
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-06-12 14:46:56 +00:00
Mike Klein
613ad38b10 add basic JIT using xbyak
Long term we'll need to spin up our own codegen rather than using xbyak,
since it uses exceptions and does not support ARM.

I really don't like how I've hacked in the caching of the JITted
program, but that'll change anyway when switching away from xbyak.

Performance looks good, better than (lowp) SkRasterPipeline
but not quite as good as hand-tuned code:

  Opts:     0.2 ns/px
  RP:       0.7
  F32:      0.8
  I32:      0.6
  I32_SWAR: 0.5

ninja -C out dm nanobench && out/dm -m SkVM && gobjdump -D -b binary -mi386:x86-64 /tmp/code.bin --insn-width=10

Change-Id: I34ce46e1d3fe5aa75f42709049a92ac79bf48bbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219341
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-11 18:40:39 +00:00
Julia Lavrova
a3552c5e6d Reland "SkParagraph"
This is a reland of 10ad0b9b01

Original change's description:
> SkParagraph
>
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I46cf43eae693edf68e45345acd0eb39e04e02bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219863
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-11 17:20:36 +00:00
Herb Derby
2bafb64ed3 Revert "try resolver pattern"
This reverts commit a716809d5a.

Reason for revert: breaks google3

Original change's description:
> try resolver pattern
> 
> Change-Id: I32c5dbf4cacce9112df42a6f29800859625dc4a9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218965
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,reed@google.com

Change-Id: Ib6facd0fda07762ed394b7b2c84771d7a93edae0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219488
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-06-11 16:01:14 +00:00
Mike Reed
a716809d5a try resolver pattern
Change-Id: I32c5dbf4cacce9112df42a6f29800859625dc4a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218965
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-06-11 12:35:38 +00:00
Herb Derby
07cd38dc13 Revert "SkParagraph"
This reverts commit 10ad0b9b01.

Reason for revert: Breaks google3 build

Original change's description:
> SkParagraph
> 
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

TBR=borenet@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com,kjlubick@google.com,reed@google.com,drott@chromium.org,jlavrova@google.com

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

Change-Id: I3f4ef2f34b7489d008c2fe92527d39fba0e16ff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219858
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-06-10 13:16:53 +00:00
Julia Lavrova
10ad0b9b01 SkParagraph
Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-07 17:23:23 +00:00
Mike Klein
7b7077cc36 centralize test/bench SkVM builders
Eliminate the duplicate functionality,
and better testing for the bench builders.

Change-Id: If20e52107738903f854aec431416e573d7a7d640
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218041
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-04 16:55:59 +00:00
Jim Van Verth
8a9a371182 Reland "Added AutoreleasePool for managing pool memory in testing apps."
This is a reland of a36e089065

This is only active when Metal is enabled.

Original change's description:
> Added AutoreleasePool for managing pool memory in testing apps.
>
> This is only active on MacOS and iOS -- on other platforms it
> will do nothing as they have no need for autorelease pools.
>
> Bug: skia:8243
> Change-Id: Ib74968dab6e3455a72e726429832101d0d410076
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217126
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: skia:8243
Change-Id: I743a3dcc93b46387a6a330e855c2e8810b482544
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217379
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-05-31 15:40:01 +00:00
Kevin Lubick
c4fec06e5a Revert "Added AutoreleasePool for managing pool memory in testing apps."
This reverts commit a36e089065.

Reason for revert: Primary suspect in breaking G3

Original change's description:
> Added AutoreleasePool for managing pool memory in testing apps.
> 
> This is only active on MacOS and iOS -- on other platforms it
> will do nothing as they have no need for autorelease pools.
> 
> Bug: skia:8243
> Change-Id: Ib74968dab6e3455a72e726429832101d0d410076
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217126
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,brianosman@google.com

Change-Id: I64f6e0baba21a9d35682ab53bdf418180be8579b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217377
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-05-31 12:31:14 +00:00
Jim Van Verth
a36e089065 Added AutoreleasePool for managing pool memory in testing apps.
This is only active on MacOS and iOS -- on other platforms it
will do nothing as they have no need for autorelease pools.

Bug: skia:8243
Change-Id: Ib74968dab6e3455a72e726429832101d0d410076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217126
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-30 19:13:34 +00:00
Mike Reed
5093e23de6 support assets for skottie2movie
Change-Id: Icb66c9cf4eb2db72997b566fe863dab21d2824ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216871
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-05-30 14:37:29 +00:00
Mike Reed
f97e8e961b simplify api to make encoder, use swscale for faster rgb->yuv
Change-Id: I19ea48667aa843e1166231fe8d2622af91cce972
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216611
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-05-29 17:59:18 +00:00
Mike Reed
c0ee21feb8 skia helper for encoding video
Change-Id: I36aef5872fc8f5938854ab18b754f3800b9879ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215165
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-05-28 20:39:21 +00:00
Mike Klein
f77dbd04b9 remove -ffp-contract
We don't set it in Chrome, so this'll make our local bots a little more
consistent with what we see in Chrome.  Very, very minor stuff.

Bug: skia:9103
Change-Id: Iecedd367780b6a721bc49dfa2d0a7837eb3bd28d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215144
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-22 16:29:09 +00:00
Mike Reed
7bf160e6d5 Revert "Revert "Experimental SkVideoDecoder, to wrap calls to ffmpeg""
fix google3 build (don't build the new gm)

This reverts commit 9cc53fa4bd.

Change-Id: I3de8aa4959f62a380f1d4aaf2b788d250775e194
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-05-17 21:25:48 +00:00