Commit Graph

211 Commits

Author SHA1 Message Date
Jorge Betancourt
f961bc256d [androidkit] expose image filters to androidkit library
Add DistantLitDiffuse lighting filter as template for future filters to be added


Change-Id: Ib641b26512b0501538dfd54b17ab127bdef98f88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414976
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-04 21:18:38 +00:00
Florin Malita
9500c8b1f9 [androidkit] See-through face for CubeActivity
Paint both sides (two passes), and skip a face for inside visibility.

Change-Id: I138d790578c4ce30c7d4df9400485a983c1f9e95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414900
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-04 15:40:23 +00:00
Jorge Betancourt
416477a8af [androidkit] expose saveLayer
Additionally, pass return value from native save and saveLayer to java

Change-Id: I1a4e04305ba8e57f6a639978b00f8e2ca1a59f90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415170
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-04 15:29:53 +00:00
Florin Malita
c27e0dc64f [androidkit] Add an extra Skottie sample to CubeActivity
Also update SkottieSample to always clear its dest rect (for animations
which are not opaque).

Change-Id: I36c6172d468567ee8e03d97dd707e03ca968aa26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414898
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-02 18:10:06 +00:00
Florin Malita
0844cfa839 [androidkit] Add touch scroll/drag support to CubeActivity
Change-Id: If1edf8e374650ac3f464c5c08b3cf6cbb11034f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414397
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-02 18:09:26 +00:00
Florin Malita
a0317b8c41 [androidkit] Add runtime shader sample
Convert existing RuntimeShaderActivity to use RuntimeSample, and add
a couple to the cube demo.

Change-Id: Ibc6056cd6c7939c13bd902ce848c49a211b9b334
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413737
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-01 15:26:53 +00:00
Florin Malita
ce6fe3fe80 [androidkit] Add Skottie sample
Convert existing SkottieActivity to use a Skottie Sample, and also add
one to the cube demo.

Change-Id: I86193889d293ddd653b0cac7200e830fa873ea69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413736
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-01 14:33:14 +00:00
Florin Malita
8c8abd8f9f [androidkit] Start implementing reusable samples
Introduce a Sample interface for abstracting out various demos/samples.

Implement a simple image shader sample for starters.

Update the cube demo to map samples to sides.

Change-Id: I9c9c70fa05634404ced7bd30739f6e884546b91d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413441
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-01 14:33:14 +00:00
Florin Malita
4abf558c9f [androidkit] Relative-sized cube sample
Update the cube sample to be centered and sized relative to the target
surface.

Also simplify projection handling:

  - pre-compute a full view matrix in onSurfaceInitialized()
  - set the origin to the surface center
  - compute perspective and camera transforms in local coordinates
    (instead of unit view cube)

Also fix (invert) fling Y direction.

Change-Id: I48a3d0b4547812fb3c9b49a9842fb18c0ed0d863
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413436
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-01 14:33:14 +00:00
Jorge Betancourt
614e398ed3 expose Matrix transpositions and setUniform to RuntimeEffectBuilder
Change-Id: I78b57c3ad5e735335d1e2cc34e6c51a2ced6fc03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412796
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-26 20:31:39 +00:00
Florin Malita
ee7e22acd2 [androidkit] Add fling support to cube demo
Change-Id: Id3c2eb72e70a3c9c2181c8aff7770aafa7a520d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412236
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-25 18:31:26 +00:00
Jorge Betancourt
4453c9add2 [androidkit] add navigation spinner to demo
-add navigation ui element to demo layout
-simplify demo layout, inflates faster

Change-Id: I232bbc553cd0143893fc20e3c218fa5a6c4006ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411311
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-25 15:25:11 +00:00
Jorge Betancourt
754e00e959 [androidkit] change main activity to be like practical app
Change-Id: Ic12e95eb09ebb40928ba64a26e480a0078bd13c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410976
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-24 15:47:16 +00:00
Florin Malita
50cc5d4147 [androidkit] Image shader support
Tangential updates:

 - new encoded input stream Image factory
 - Paint setters now return the object to support a fluent workflow
 - cube demo updated to store face paints instead of colors


Change-Id: I6142a229b18165112ef1fe76acae38bc4b27480d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410789
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-21 17:30:43 +00:00
Florin Malita
6e5d64b160 [androidkit] Add SamplingOptions
Mirroring SkSamplingOptions.

Change-Id: I6c4d21fb3f123e7931271fcc830d82f6b0215c40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410786
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-20 20:29:55 +00:00
Florin Malita
934c02142e [androidkit] Introduce Image support
Two sources from now:

  - encoded data factory
  - Surface.makeImageSnapshot()

Change-Id: Icbf2f855e489839dc82db425916c8644418a2fb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410324
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-20 20:28:55 +00:00
Florin Malita
f83a232fed [akdroidkit] Release the surface when exiting SurfaceRenderer's loop
To ensure we're deallocating GL/VK resources on the same thread.

Change-Id: I6df7e89f11439474c46715789db10b247734ef3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410322
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-19 16:03:54 +00:00
Florin Malita
a1304f513e [androidkit] Add SurfaceRenderer utility
Most samples use the same render thread boilerplate -- consolidate as
a utility base class.

Also add Canvas.getWidth/getHeight.

Change-Id: I27c9f51b4fd9d228a39593fbd4650a66d10240c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409896
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-18 19:37:44 +00:00
Florin Malita
5e8d88ef29 [androidkit] Add support for Skottie animations
Change-Id: Ibba2c0c8ad5b10d90f0bb30a3a859dacb94a03ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409400
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-05-18 14:49:43 +00:00
Jorge Betancourt
a5654567f6 [androidkit] use cube face normals to prioritize cube face draws
Change-Id: I595a11c8cd5d9ba6ff64aee5ff91b9051ea8415e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409337
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-18 14:23:44 +00:00
Jorge Betancourt
ec978bbc4d expose canvas.localToDevice to androidKit
Change-Id: Ia6af3a06b9be078fd0b281a89fad0641082fd0ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409336
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-17 18:41:20 +00:00
Jorge Betancourt
025b914468 [androidkit] add getter for matrices
Change-Id: I0fd42b2506d794622852bd55aa4e8c2545216312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407916
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 19:29:53 +00:00
Jorge Betancourt
e3f8030494 [androidkit] implement ThreadedSurface backed by WindowSurface
This moves ownership of the SkSurface to ThreadedSurface::fWindowSurface.

When we pass a Message to the SurfaceThread, we will include  a pointer to ThreadedSurface.fWindowSurface so we can call:
getCanvas() to draw the SkPicture
WindowSurface's constructor so it can hold the WindowContext made during the init

To reference WindowSurface in SurfaceThread, we need to make a header for Surface.cpp (added in this cl)

Change-Id: I8c67223eee301a1b6e0d05934e1f8597cf70bc64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404918
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 17:15:49 +00:00
Jorge Betancourt
2446196688 3d cube initial demo
Change-Id: Idc3d05eeac13715d2cb57d5930e9642181fc670d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406436
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-12 15:41:52 +00:00
Jorge Betancourt
e3934b937e [androidkit] expose lookAt, perspective, and inverse Matrix construction
Change-Id: I94de24b2e47365cd65025166d83dd8b6c8fda90a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405857
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-10 23:25:54 +00:00
Jorge Betancourt
c44ede6c78 [androidkit] expose minimal stroke settings to Java
Change-Id: I012aa2760ff2b39f0c21d6e235cf6731d13bfe3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405856
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-10 16:33:32 +00:00
Jorge Betancourt
062793401d [androidkit] optimize JNI calls in AndroidKit.Matrix transformations
Note: Shouldn't add or change the Skia API, only accepts an optional z value to preScale()

Change-Id: Ic73c723ebc2b75acca1fce5395953434ef1582e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404376
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-07 16:17:09 +00:00
Florin Malita
71863fa787 [androidkit] Canvas save/concat/restore
Change-Id: Ide67a67e542b4e0962475e0638b95d3edb416c68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405279
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-06 17:39:57 +00:00
Jorge Betancourt
14efdd3d50 [androidkit] add transformation operations to Matrix
Change-Id: I5a81087eb56f10786c136df7cf68bb0e34742abf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402676
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-30 14:07:18 +00:00
Jorge Betancourt
5cddd7f5e1 [androidkit] implement foundation for 4x4 matrices in AndroidKit backed by SkM44
Change-Id: If623efaadda6064598c6fd69daa4527a4e71cced
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402101
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-29 19:23:18 +00:00
Jorge Betancourt
972abe9baa [androidkit] support GL surfaces in AndroidKit
Currently backed by sk_app, we need to move the Android window context files out of sk_app into its own module.

Vulkan is only supported by Android devices running SDK 24+, added guards to Create_VK and annotations for developers.

Change-Id: Ica64a1feef4a3daf50758df05df488da0346ed72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401796
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-27 19:06:31 +00:00
Jorge Betancourt
6d970c6033 [androidkit] add custom view for easy navigation between demos
Change-Id: I1614e105eb274738dc1f9eab6674e28afbbe6698
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401079
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-04-27 14:02:29 +00:00
Florin Malita
2cc6538c60 [androidkit] VK Surface
Implement support for native VK surfaces via sk_app::WindowContext
wrappers.

Change-Id: Ic4f03b7013095e2e4cfcf94d034d774a96e4af88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400816
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-27 02:55:59 +00:00
Jorge Betancourt
f102b88a43 [androidkit] initial foundation for Android Surface thread management
Change-Id: I6da61fc8f8778f100c721c2812b3c32444c6dffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398137
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-04-26 19:21:08 +00:00
Florin Malita
a3ce568b27 [androidkit] Add Surface.flushAndSubmit()
This is a no-op for the current/raster backend, but will be implemented
for GPU.

Change-Id: Id2ff4fe3b254b0d1730c2cb931737c372edbcf7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400096
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2021-04-23 14:39:23 +00:00
Florin Malita
05bb5a8b30 [androidkit] Introduce RuntimeShader
- opaque Shader class to act as a Java SkShader wrapper
 - shader slot on Paint
 - RuntimeShaderBuilder utility to enable the same use pattern as native
   Skia:

  RuntimeShaderBuilder builder(sksl_string);
  builder.setUniform("foo", 1);
  builder.setUniform("bar", 2);
  paint.setShader(builder.makeShader());

or, more fluent:

  paint.setShader(
      RuntimeShaderBuilder(sksl_string)
          .setUniform("foo", 1)
          .setUniform("bar", 2)
          .makeShader());


Change-Id: I7cd241a2f64bc54dcae2175ed35040edf6506ed3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399736
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-04-23 14:38:36 +00:00
Florin Malita
7924446c45 [androidkit] Add Canvas.drawColor()
Three flavors:

  - Color
  - rgba float tuple
  - int (legacy SkColor)

Change-Id: I3038e27e433a5d92d4c6c3e3bb80374b63f87b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398181
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2021-04-21 13:08:32 +00:00
Florin Malita
3397f71098 [androidkit] Simple animation demo
Oscillating rect demo using a dedicated render thread.

At the moment this is using an intermediate Bitmap for rendering, but
should be converted to native GL Surface when it becomes available.

TBR=
Change-Id: I9b4f66598b6d2b56e865e7f1d10139a2bcf1f3e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398536
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-21 13:07:27 +00:00
Florin Malita
de89bf0cd7 [androidkit] Start sketching out Paint
Add Color and Paint classes:

  - Color is pure Java (equivalent of SkColor4f)
  - Paint is backed by a native SkPaint

Change-Id: I79dbfae48f9e51254a51bc1c3966930f32cea5c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396020
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-16 01:56:04 +00:00
Florin Malita
2a650cc795 [androidkit] Split Canvas backing store into Surface
Add a Surface abstraction to manage the canvas backing store (equivalent
to SkSurface).

This allows relieving Canvas of buffer management duties - we can now
focus solely on rendering APIs at this level.

At the moment, only a Bitmap-backed surface is implemented -- but other
native surface types will be added.

Also relocate native code to 'src'.

Change-Id: I46738472536cf24524428dbd36969f2b99d251e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395536
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-13 13:56:04 +00:00
Florin Malita
062743a859 [androidkit] Bind canvas to native Bitmap
Wrap native Bitmap pixels using JNIGraphis APIs.

Add finalizer to clean up.

Change-Id: I22ba54e65a9cdf498e97afefe8bcc6cd88db0c95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394816
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-11 18:08:30 +00:00
Jorge Betancourt
265e3e1c0a [androidkit] initial commit for androidkit
This commit introduces the foundation for android kit.
Included is the ability to make calls to native code through the JNI as well as a wrapper for SkCanvas to be used in the Android view hierarchy.


Change-Id: Id2416776e676210d4600898bada3356a9116eb55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393356
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-08 20:21:04 +00:00
Jorge Betancourt
00f1276a7e [SkottieView] call onAnimationEnd listeners after finished repeating
Change-Id: Ia01469b4cec68c781353ff2d5c80d120b19223fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377861
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-03-02 15:35:03 +00:00
Jorge Betancourt
f1107f7891 [SkottieView] surface methods for adding and removing listeners in SkottieView
Change-Id: Iaa97a5661269c9f725cf44f977fed12c3c994b31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375070
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2021-02-25 21:21:02 +00:00
Jorge Betancourt
c09761f576 [SkottieView] handle calls to setSource after first animation initialization
Change-Id: I8fdb9142e1dd67f9418f8a5fc13518a2c2c11566
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355662
Reviewed-by: Tyler Freeman <fuego@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-01-21 23:41:28 +00:00
Jorge Betancourt
411ee15c2d clean playback methods and constructors in SkottieView
playback methods would call on mAnimation before checking if it was null
builder constructor created unneeded confusion, as setSource() currently acts a build method

Change-Id: I90a36e39cab1ed76a12c49fb53b4518bba9bf4ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340521
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-12-10 16:29:38 +00:00
Jorge Betancourt
4867834b85 move SkottieAnimation out of SkottieRunner to top level
This refactor adds a LOG_TAG and SkottieRunner member variable to SkottieAnimation so that it still has access to the EGL member variables.
The private keyword was removed from the SkottieRunner's EGL variables.

Methods in SkottieRunner that were made from private to protected:
getNativeProxy()
runOnGLThread()
Methods in SkottieAnimation that were made from private to protected:
SurfaceView constructor
setSurfaceTexture()

Change-Id: I9ddb167238fbc0e05f4d1cdcee67f6b288019e95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335667
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2020-11-24 19:37:46 +00:00
Stan Iliev
e9783f22db Skottie perf metric improvements
Add 2 lottie files given by wearos.
Measure startup time.
Measure total time for 7 seconds starting from second frame.

Test: Ran tests on wearos and android.
Change-Id: I87ddcd116df0cd39df42636cca518a91c3be0329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300044
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2020-11-13 19:03:15 +00:00
Jorge Betancourt
6330939946 implement SkotieAnimation as an Animator to better work in an Android environment
override getTotalDuration from Animator in SkottieAnimation


add listener support for SkottieView (onStart, onEnd)


Combine functionaity of interface SkottieAnimation and SkottieAnimationImpl to extend Animator

Change-Id: I20091719b08e3e077a5fac399978eda4108ae533
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332722
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-11-11 17:34:15 +00:00
Jorge Betancourt
de48febf8b force drawFrame when new surface is created
Caused by an optimization being made in the native drawFrame function.

Fixes bug introduced in change Ibcd4f0ed468563b22e29d23c7d72b474534d21f3

Change-Id: I3d23e9dec61bb6c193bbaf75202e31ee90259708
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331016
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-31 00:26:31 +00:00