Commit Graph

231 Commits

Author SHA1 Message Date
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
Jorge Betancourt
f31e3d7320 add non-looping option to SkottieViews through xml attributes
stop running animation at the end if not looping


hook looping and background color into SkottieAnimation implementation


add looping attribute to SkottieView

Change-Id: I0c66026429018d61f49ccced1fd5add63619263a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329816
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Tyler Freeman <fuego@google.com>
2020-10-30 19:24:30 +00:00
Jorge Betancourt
0e24265930 add new DemoActivity to showcase SkottieView xml loading and surface view backing
add resID source as SkottiveView xml attribute

Change-Id: I749dfd320ca0b75cb5fac2a4047442c1b198f07e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327676
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-20 15:33:11 +00:00
Jorge Betancourt
f1b53836b7 handle updateAnimationSurface in SkottieView through GL thread
Change-Id: I546a095e340821b11310cec521e476c7ace28e3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326536
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-15 21:45:57 +00:00
Jorge Betancourt
d5fec1788c Fix SkottieView demo app by handling branching issues
On some devices, SkottieView would crash on startup.
CL introducing bug: https://skia-review.googlesource.com/c/skia/+/310136

This was introduced in CL:
https://skia-review.googlesource.com/c/skia/+/310136

Change-Id: Ib9010707673e055964d5f0a471338097b3bf9910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323596
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-09 18:56:03 +00:00
Adlai Holler
731f67cf16 Migrate skottie to GrDirectContext
Almost forgot this one!

Change-Id: I325d25dcfffc872a4931c19ca53a0387c3771496
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318200
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-21 17:13:41 +00:00
Jorge Betancourt
141ec1a151 add SurfaceView support for skottie on android
Change-Id: I62fe20cdaf735d09552349efb9a21b1ea72bd973
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310136
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-08-21 13:24:30 +00:00
Derek Sollenberger
866d2894eb Add android:exported values to all SkQP activities.
This fixes an issue on newer versions of Android where activities
with intent filters need to specify whether or not they are exported
in order to successfully complete installation on a test device.

Bug: b/163792247
Test: successful install on device with AOSP build
Change-Id: Iddeb27af55245e926dbf43c03ab48b257461188d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309980
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-08-17 13:33:09 +00:00
Jorge Betancourt
82ac2ddc00 implement and test basic playback features for SkottieView
Change-Id: I46a673b2070d523cd9952179c56461fa61c4c5b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302036
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-08-12 14:50:28 +00:00
Jorge Betancourt
a70445f408 reland: configure attributes for SkottieView to be initialized from XML layout
Original CL: https://skia-review.googlesource.com/c/skia/+/301716

Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301716
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Change-Id: I30b782fb6c3edfb6552ed733bd1948bda5f6b0b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308717
2020-08-11 17:31:56 +00:00
Jorge Betancourt
7e74746f7f add terminating file on complete of CorrectnessActivity
Change-Id: I7aa465d482530a112e502974e22b00062be6c9ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308716
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-08-10 15:51:23 +00:00
Jorge Betancourt
749149278c get rid of unused include
Change-Id: I4a93050696b5c474c3accf27f570664939b49552
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308196
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-08-05 18:48:47 +00:00
Robert Phillips
d5a7f1f1c4 Revert "configure attributes for SkottieView to be initialized from XML layout"
This reverts commit c7950237e0.

Reason for revert: blocking the G3 roll

Original change's description:
> configure attributes for SkottieView to be initialized from XML layout
> 
> Change-Id: I9eb1702ed11f23873ffe7fbc60d9f9d885d3073c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301716
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>

TBR=djsollen@google.com,stani@google.com,jmbetancourt@google.com

Change-Id: I3be0fd42230d114c8051b01bf39a8726c40fd4ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307225
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-31 17:48:44 +00:00
Jorge Betancourt
c7950237e0 configure attributes for SkottieView to be initialized from XML layout
Change-Id: I9eb1702ed11f23873ffe7fbc60d9f9d885d3073c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301716
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-07-31 16:43:53 +00:00
Jorge Betancourt
66d19211aa remove skar_java from skia android projects
Change-Id: I5ffe135c40edf267185b21056b5abef415037f2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-07-27 16:17:50 +00:00
Jorge Betancourt
fd9f154f82 Reland "implement working CorrectnessActivity to generate lottie keyframe PNGs"
This is a reland of 7f5e99465d

Original change's description:
> implement working CorrectnessActivity to generate lottie keyframe PNGs
> 
> 
> make correctness activity loop through all available lotties
> 
> 
> implement tests for lottie correctness through Android Activity
> 
> Change-Id: I8b5d1dfc0641e3227f23a4d4560faa756b245ede
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305216
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>

Change-Id: I59f4a02acfbddd2c8bbee0adcda1d737c9566c0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305601
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-07-27 14:24:30 +00:00
Robert Phillips
809a99819e Revert "implement working CorrectnessActivity to generate lottie keyframe PNGs"
This reverts commit 7f5e99465d.

Reason for revert: Blocking the Google3 roll

Original change's description:
> implement working CorrectnessActivity to generate lottie keyframe PNGs
> 
> 
> make correctness activity loop through all available lotties
> 
> 
> implement tests for lottie correctness through Android Activity
> 
> Change-Id: I8b5d1dfc0641e3227f23a4d4560faa756b245ede
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305216
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>

TBR=stani@google.com,jmbetancourt@google.com

Change-Id: I307129723f71644186378ca364c278661f128a5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305723
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-24 15:18:31 +00:00
Jorge Betancourt
7f5e99465d implement working CorrectnessActivity to generate lottie keyframe PNGs
make correctness activity loop through all available lotties


implement tests for lottie correctness through Android Activity

Change-Id: I8b5d1dfc0641e3227f23a4d4560faa756b245ede
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305216
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-07-24 13:21:01 +00:00
Jorge Betancourt
cb41a4bf74 turn skottie view into a view group so we can swap out TextureView and SurfaceView
Change-Id: Iec87cf169c7d013e6727df8a9343b64b9d64243e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300621
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-07-09 19:19:30 +00:00
Jorge Betancourt
4522f6e82d fix undefined behavior when skipping drawFrames
Bug: skia:10467
Change-Id: I2831938cde36c77129b013173c8a19120077f507
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299919
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
2020-07-06 16:05:02 +00:00
Jorge Betancourt
afaf5d56c5 performance increase by not drawing on do nothing frames
Change-Id: Ibcd4f0ed468563b22e29d23c7d72b474534d21f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299916
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-30 18:14:27 +00:00
Jorge Betancourt
ea25120849 Clean up skottielib: modify access to package classes and delete unneeded code
Change-Id: I86bff8efde4bdcd269c0c9940643926f9362dff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299596
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-29 20:04:24 +00:00
Jorge Betancourt
1449d835af Move InputStream handling of SkottieLib to SkottieView
An effort to hide nuts and bolts from developers who wish to use
SkottieLib in their own application.

Change-Id: I2020e73279a53de8852d5b04d90d0e28bdbb5c6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298978
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-29 14:08:35 +00:00
Stan Iliev
c0ab92c52f Reland Implement Skottie vs Lottie perf tool
Add PerfActivity to Skottie demo app, which can render
with both Lottie and Skottie players. Create bash script, which
runs 15 lottie files with both renderers, runs perfetto and
outputs performance metrics in json files.

Test: ran run_perf.sh and it outputs perf metrics on WearOS and Android
Change-Id: I6bdd86629284ac5c461cf2f5ee537e0495a72bd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298980
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2020-06-26 16:34:25 +00:00
Michael Ludwig
34878824fc Revert "Implement Skottie vs Lottie perf tool"
This reverts commit 8ee607cbc1.

Reason for revert: proto extension number collision blocking roll into google

Original change's description:
> Implement Skottie vs Lottie perf tool
> 
> Add PerfActivity to Skottie demo app, which can render
> with both Lottie and Skottie players. Create bash script, which
> runs 15 lottie files with both renderers, runs perfetto and
> outputs performance metrics in json files.
> 
> Test: ran run_perf.sh and it outpus perf metrics
> Change-Id: Ibc29d3a9dc7bfe79002bf91472e93883d746c03d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296276
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>

TBR=djsollen@google.com,hcm@google.com,stani@google.com

Change-Id: I2de7feadf8ac2a5690c26e4e07b231af62502655
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298680
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-24 23:15:20 +00:00
Jorge Betancourt
287c28c047 update gradle version for android projects
When building application from command line, ensure that your
out file has the args:

ndk="[absolute path to ndk]"
ndk_api="[specific ndk api number]"

Then run:
platform_tools/android/bin/android_build_app -C  out/[out dir] [application name]

Change-Id: Ib380e99bf2dc2e6c136388a0653e380c21e180ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298679
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-24 18:36:53 +00:00
Stan Iliev
8ee607cbc1 Implement Skottie vs Lottie perf tool
Add PerfActivity to Skottie demo app, which can render
with both Lottie and Skottie players. Create bash script, which
runs 15 lottie files with both renderers, runs perfetto and
outputs performance metrics in json files.

Test: ran run_perf.sh and it outpus perf metrics
Change-Id: Ibc29d3a9dc7bfe79002bf91472e93883d746c03d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296276
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2020-06-24 16:42:53 +00:00
Jorge Betancourt
1fcdcaa0a1 Reland the new module for skia lib for g3
Try to merge change 296417 again with new changes to skottie BUILD in google3
This time, the autoroller shouldn't get upset.

move setupSkiaLibraryBuild call to new lib module
Move shared skottie files we intend to distribute into a library module

Change-Id: I3a86ec611cb38e1940033b60d607fabe6a4b24e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297842
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-23 14:19:13 +00:00
Derek Sollenberger
83195191bd Revert "Convert Skottie build instructions to build an Android Library (AAR) instead of app (APK)"
This reverts commit dff4d584ed.

Reason for revert: breaking the google3 roll

Change-Id: I0e26c77e9bad0f48bc726d3b63a97d5aa7fa51ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297190
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-06-17 20:35:21 +00:00
Jorge Betancourt
dff4d584ed Convert Skottie build instructions to build an Android Library (AAR) instead of app (APK)
Change-Id: Ib12364792523ac896c74ce2cd563173dd6081e78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296417
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-17 18:09:28 +00:00
Derek Sollenberger
2af055b14d Skottie example app to copy InputStreams in Java.
This CL avoids the JNI complexity of reading the Java InputStream in
C++. Instead, the stream is read into memory (or mmap'd) in Java and
the resulting ByteBuffer is passed to the native code to be wrapped
in a SkData object.

Change-Id: Iba4e41999da03481188434ddfbbff2d7bd741edd
Bug: skia:10310
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295820
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-12 16:41:19 +00:00
Jorge Betancourt
6c4b67d13b remove arcore from apps project directory
arcore is untouched and impedes builds of other apps in platform-tools

Change-Id: I92b603de318b956c116fa0a065a26d2217755b68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294736
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-06-09 17:46:47 +00:00
John Stiles
7b1355e509 Revert "Reland "Move JavaInputStreamAdaptor into third_party and add a LICENSE file.""
This reverts commit fee069880d.

Reason for revert: google3 roller is glitchy today, try again later

Original change's description:
> Reland "Move JavaInputStreamAdaptor into third_party and add a LICENSE file."
> 
> This is a reland of eac2d518bd
> 
> The aosp folder was added to the google3 roller include_patterns list:
> http://cl/315274044
> 
> Original change's description:
> > Move JavaInputStreamAdaptor into third_party and add a LICENSE file.
> >
> > Change-Id: I723b15fbcf3343559fb5a3fe3015cf3db96e2841
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294696
> > Reviewed-by: Heather Miller <hcm@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
> 
> Change-Id: I27ac16c3ac05fbee1473af886379e95492302d50
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295000
> Reviewed-by: Heather Miller <hcm@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=djsollen@google.com,hcm@google.com,johnstiles@google.com

Change-Id: I8c620c47a8c6c7f3e081fe786a17396a40236105
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295081
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-08 19:18:15 +00:00
John Stiles
fee069880d Reland "Move JavaInputStreamAdaptor into third_party and add a LICENSE file."
This is a reland of eac2d518bd

The aosp folder was added to the google3 roller include_patterns list:
http://cl/315274044

Original change's description:
> Move JavaInputStreamAdaptor into third_party and add a LICENSE file.
>
> Change-Id: I723b15fbcf3343559fb5a3fe3015cf3db96e2841
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294696
> Reviewed-by: Heather Miller <hcm@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: I27ac16c3ac05fbee1473af886379e95492302d50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295000
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-08 16:44:04 +00:00
John Stiles
429d9d7981 Revert "Move JavaInputStreamAdaptor into third_party and add a LICENSE file."
This reverts commit eac2d518bd.

Reason for revert: google3 roll broke

Original change's description:
> Move JavaInputStreamAdaptor into third_party and add a LICENSE file.
> 
> Change-Id: I723b15fbcf3343559fb5a3fe3015cf3db96e2841
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294696
> Reviewed-by: Heather Miller <hcm@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=djsollen@google.com,hcm@google.com,johnstiles@google.com

Change-Id: Ia2e23547ad39a0e3d069d9a9807f581b5c73c199
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294710
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-05 21:21:48 +00:00
John Stiles
eac2d518bd Move JavaInputStreamAdaptor into third_party and add a LICENSE file.
Change-Id: I723b15fbcf3343559fb5a3fe3015cf3db96e2841
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294696
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-05 20:29:49 +00:00
Herb Derby
64aa5138c7 Remove SkAtlasTextTarget
I can find no references to SkAtlasTextTarget in AOSP or in Chromium.
With google3 CL/314226466 there are no more uses in Google3.

Change-Id: I60b5f06fc17c0e4f8d008886c96645475e3d48e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293839
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-04 03:52:35 +00:00
John Stiles
7a8e394496 Revert "Allow printf-style formatting to be used in SK_ABORT."
This reverts commit 67e50a6b5c.

Reason for revert: roller complains about LICENSE issue. cl/314177415

Original change's description:
> Allow printf-style formatting to be used in SK_ABORT.
> 
> SK_ABORT was already using SkDebugf to print the error message to the
> console, so all the moving parts were there. This CL just adds a
> mechanism for the calling code to pass in arguments.
> 
> Added a use case to demonstrate usage--when an allocation fails, the
> requested size is now shown in the error message.
> 
> Change-Id: I42f141151fb57a399c086926249816833f349ddb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293272
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,johnstiles@google.com

Change-Id: I7a2e98bcda82bbe6edfa3d00057586754df0ee71
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293342
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-01 19:32:08 +00:00
John Stiles
67e50a6b5c Allow printf-style formatting to be used in SK_ABORT.
SK_ABORT was already using SkDebugf to print the error message to the
console, so all the moving parts were there. This CL just adds a
mechanism for the calling code to pass in arguments.

Added a use case to demonstrate usage--when an allocation fails, the
requested size is now shown in the error message.

Change-Id: I42f141151fb57a399c086926249816833f349ddb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293272
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-01 18:49:37 +00:00
Hal Canary
ea2d2bbb06 Reland "GrGLMakeNativeInterface_{iOS,mac,win}: clean up"
This reverts commit 565fb9d1a6.

Original change's description:
> Revert "GrGLMakeNativeInterface_{iOS,mac,win}: clean up"
>
> This reverts commit a423802d40.
>
> Reason for revert: Mac test/perf failures
>
> Original change's description:
> > GrGLMakeNativeInterface_{iOS,mac,win}: clean up
> >
> > Change-Id: Ie4aad36164352dcb4ae364b3cfbabfc5f1493447
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261538
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Auto-Submit: Hal Canary <halcanary@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> TBR=halcanary@google.com,brianosman@google.com
>
> Change-Id: I129c9861ee0d0d196ad9545c7edc71a0f0824ad5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261553
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-x86_64-Release-Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-x86_64-Debug-Metal
Cq-Include-Trybots: skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal
Cq-Include-Trybots: skia/skia.primary:Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Debug-All-Metal
Change-Id: Ib777d4746bacc1b53c21837c86ce1f411f3d2f3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262803
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2020-01-08 16:55:43 +00:00
Florin Malita
565fb9d1a6 Revert "GrGLMakeNativeInterface_{iOS,mac,win}: clean up"
This reverts commit a423802d40.

Reason for revert: Mac test/perf failures

Original change's description:
> GrGLMakeNativeInterface_{iOS,mac,win}: clean up
> 
> Change-Id: Ie4aad36164352dcb4ae364b3cfbabfc5f1493447
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261538
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Hal Canary <halcanary@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I129c9861ee0d0d196ad9545c7edc71a0f0824ad5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261553
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2019-12-27 17:38:53 +00:00
Hal Canary
a423802d40 GrGLMakeNativeInterface_{iOS,mac,win}: clean up
Change-Id: Ie4aad36164352dcb4ae364b3cfbabfc5f1493447
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261538
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-12-27 16:47:24 +00:00
Hal Canary
fdf4bfe6d3 SkQP: Refactor Java method SkQP.runTests()
Since it was only called by SkQPActivity.run(), I simply moved the code
into that method.

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: I82ef407dd440fa94e4c01c0f21a76389793ece58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225177
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-07-24 13:54:15 +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
Hal Canary
8b23d0ee53 SkQP: fix Filterable.filter
Change-Id: Id50c24d16a3ba6810fbf49b91a7a93c3df5cb743
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223296
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-06-25 13:50:39 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
4941a2239e switch some idiosyncratic <includes> to ""
Change-Id: I099f8a635df7dd0ddd3902459615250ea2c120c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209874
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-04-23 17:54:48 +00:00
Mike Klein
cd5104e942 SkAnimTimer -> AnimTimer
Change-Id: I700b7c0461475062ac66712cc29070f150cf777d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202315
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 18:26:35 +00:00
Chris Dalton
f774818f57 Reland "Disable coverage counting by default"
This reverts commit 9ff956e6de.

Reason for revert: Will fix the issues with the change landed.

Original change's description:
> Revert "Disable coverage counting by default"
> 
> This reverts commit 576b2a5596.
> 
> Reason for revert: DDL and MSRTC unhappy
> 
> Original change's description:
> > Disable coverage counting by default
> > 
> > Bug: skia:
> > Change-Id: Iacb4cb3e409c6abdd25319ec0884ef673fb04cec
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201101
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> 
> TBR=djsollen@google.com,bsalomon@google.com,csmartdalton@google.com
> 
> Change-Id: Iabdb3116d97c7470044b962ff78cffd47ccee744
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201933
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=djsollen@google.com,bsalomon@google.com,csmartdalton@google.com

Change-Id: I1d81f7a52e81079bd232e97588fd34729a8f50cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201938
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-03-18 16:22:47 +00:00
Chris Dalton
9ff956e6de Revert "Disable coverage counting by default"
This reverts commit 576b2a5596.

Reason for revert: DDL and MSRTC unhappy

Original change's description:
> Disable coverage counting by default
> 
> Bug: skia:
> Change-Id: Iacb4cb3e409c6abdd25319ec0884ef673fb04cec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201101
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=djsollen@google.com,bsalomon@google.com,csmartdalton@google.com

Change-Id: Iabdb3116d97c7470044b962ff78cffd47ccee744
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201933
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-03-18 15:59:47 +00:00
Chris Dalton
576b2a5596 Disable coverage counting by default
Bug: skia:
Change-Id: Iacb4cb3e409c6abdd25319ec0884ef673fb04cec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-03-17 23:54:24 +00:00
Hal Canary
2ccdd2bc1d SkQP: android.support.test -> androidx.test
Change-Id: I8f9cb8130162235754ecb390d3ebbe33fc526cf6
Reviewed-on: https://skia-review.googlesource.com/c/193161
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-18 17:50:38 +00:00
Chris Dalton
f1202c61de Add support for Windows to the gradle builds
Bug: skia:
Change-Id: Ie463354281f5091866c6ccda3d041f6c7d8f0558
Reviewed-on: https://skia-review.googlesource.com/c/182101
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-01-08 20:01:29 +00:00
Kevin Lubick
48ce543def remove more extra semicolons
The cloud-build is now at a new enough Clang to find these.

Bug: skia:
Change-Id: Ib7cfecb7d79194dcdeca7c0cf22a9b2dbb8cb655
Reviewed-on: https://skia-review.googlesource.com/c/181162
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-01-04 14:19:36 +00:00
Hal Canary
ac7f23c807 SkQP: refatctor C++ bits.
* C++ code moved into tools/skqp/src/.
  * State held with single SkQP class.
  * gmkb functions moved to skqp_model.{h,cpp}
  * model no longer knows about report format.
  * skqp_main and skqp_lib no longer have globals
  * jni code has fewer globals.
  * skqp_main no longer uses googletest.
  * AssetMng returns SkData, not a SkStream.
  * Add jitter tool.
  * dump GPU information into grdump.txt
  * JUnit puts report in directory with timestamp.
  * Document SkQP Render Test Algorithm.
  * GPU driver correctness workarounds always off
  * cut_release tool for assembling models
  * make_rendertests_list.py to help cut_release
  * make_gmkb.go emits a list of models

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP

Change-Id: I7d4f0c24592b1f64be0088578a3f1a0bc366dd4d
Reviewed-on: https://skia-review.googlesource.com/c/110420
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-11-30 18:38:00 +00:00
Stan Iliev
762ba1038d Skottie Android demo app improvements
Changed SkottieView base class to TextureView.
Implemented new SkottieAnimation interface, which allows to
get animation duration, set and get animation progress.
SkottieView will draw correctly even if animation is stopped.

Test: Ran Skottie app
Bug: skia:
Change-Id: I952793b75518107f515ddec8ad6524f4048f42e7
Reviewed-on: https://skia-review.googlesource.com/c/167945
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-11-07 15:41:34 +00:00
Hal Canary
2474c3b5b9 SkQP/Java: remove unneeded stack trace, count tests correcctly
Change-Id: I347817c785d28340001e130a691d034cccec4ec1
Reviewed-on: https://skia-review.googlesource.com/c/165310
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>
2018-10-26 18:07:33 +00:00
Hal Canary
0675ffaef6 skqp/.../assets/.gitignore: remove important things
Change-Id: Iabe82a2404d4119b1464a62729fdc04ee0b0e765
Reviewed-on: https://skia-review.googlesource.com/c/165309
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-10-26 18:03:02 +00:00
Hal Canary
355d698ce6 SkQP: rely on TestRunner for logging
BEFORE:
    V org.skia.skqp: Rendering Test 'gles_lcdtextsize' started (411/890).
    I TestRunner: started: gles_lcdtextsize(org.skia.skqp.SkQPRunner)
    I org.skia.skqp: Rendering Test 'gles_lcdtextsize' passed
    I TestRunner: finished: gles_lcdtextsize(org.skia.skqp.SkQPRunner)

AFTER:
    I TestRunner: started: gles_lcdtextsize(org.skia.skqp.SkQPRunner)
    I TestRunner: finished: gles_lcdtextsize(org.skia.skqp.SkQPRunner)
    I org.skia.skqp: Rendering Test 'gles_lcdtextsize' complete (411/890). [pass]

Change-Id: I40632ac1dc06da2395de83564580c0e490bc6e18
Reviewed-on: https://skia-review.googlesource.com/c/163786
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-19 18:41:47 +00:00
Kevin Lubick
35b87a5b44 Add Build and Test jobs for SKQP using docker.
Uses Docker to compile an APK and then run it on an emulator.

We use a specialized image for build (includes Clang, etc)
And then the 3rd party base image for just the test (which
has the emulator and SDK on it).

Bug: skia:7578, skia:7692
Change-Id: I948e0b091868e7173b00e3affd7c3d59a5cd1ec2
Reviewed-on: https://skia-review.googlesource.com/c/159681
Reviewed-by: Stephan Altmueller <stephana@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-10-08 19:17:25 +00:00
Stan Iliev
98590d2934 Update android apps to latest android plugin
NDK depricated mips toolchain, which is causing a build error,
because old android gradle plugin is looking for it.
Updating to latest plugin is fixing the build issue.

Test: Built skottie demo app from command line and Android Studio
Bug: skia:
Change-Id: I0071bf996c44f96969079cb680cb05ec38efdc93
Reviewed-on: https://skia-review.googlesource.com/c/159581
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2018-10-04 16:39:06 +00:00
Florin Malita
40c37426b3 [skottie] Plumb external SkFontMgr
Allow embedders to pass a font manager.

In order to avoid excessive factory API clutter, introduce an
Animation::Builder helper to wrap factory options.

Also clean up various bits:

  * hoist scene parsing out of the Animation ctor
  * store the animation duration explicitly (instead of unused fps)
  * plumb const SkFontMgr& internally (instead of a ref)

Change-Id: I3e180dfa85ba18c8462cfeb5a7385bef985ed6c4
Reviewed-on: https://skia-review.googlesource.com/148800
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-08-23 13:13:30 +00:00
Stan Iliev
93151726ed Prototype an Android lottie player
Create a new Skottie test app, which plays lottie files using
a TextureView.
Implement SkottieView, which takes a JSON input stream and
plays the animation.

Bug: skia:
Change-Id: Ic62688b91692c28f35b13356d1e99b4d15d3e30f
Reviewed-on: https://skia-review.googlesource.com/130125
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Stan Iliev <stani@google.com>
2018-08-02 16:20:13 +00:00
ziadb
883ed3000e SkAR Java: fixed runtime bugs, better UI
Bug: skia:
Change-Id: Ibfee885f5ed655c2f838d637406406da90f0c6fd
Reviewed-on: https://skia-review.googlesource.com/144033
Reviewed-by: Mike Reed <reed@google.com>
2018-07-27 19:47:18 +00:00
ziadb
55e553525d SkAR Java: DrawManager dox and minor changes, removed unnecessary files
Bug: skia:
Change-Id: If1a92c5b70d99233208f7db74f5dda9641b1c65b
Reviewed-on: https://skia-review.googlesource.com/144027
Reviewed-by: Mike Reed <reed@google.com>
2018-07-27 17:17:04 +00:00
ziadb
2175f1b1b7 SkAR Java: minor refactoring to TapHelper (now GestureHelper)
Bug: skia:
Change-Id: I1983c6cb1727e86fec91a0c9a5706f26070b1b49
Reviewed-on: https://skia-review.googlesource.com/144021
Reviewed-by: Mike Reed <reed@google.com>
2018-07-27 16:01:47 +00:00
ziadb
3c9a0c04f2 SkAR Java: refactoring main app class & finger painting class
Main things to look at:
1) onDrawFrame changes + moving many functions as separate helpers
2) SkARFingerPainting changes (name should change too)

Bug: skia:
Change-Id: I5068ce6c416a2f5d6c6c389cd63d08d5350e83e6
Reviewed-on: https://skia-review.googlesource.com/143701
Reviewed-by: Mike Reed <reed@google.com>
2018-07-27 15:46:21 +00:00
ziadb
f27b479f95 SkAR Java: refactored project structure
1) Changed file paths
2) Added helpers that were missing previously

Bug: skia:
Change-Id: Idb4194fcef815a23277a17670acf46255a47451d
Reviewed-on: https://skia-review.googlesource.com/143680
Reviewed-by: Mike Reed <reed@google.com>
2018-07-26 19:37:04 +00:00
ziadb
3ab3b562b1 SkAR Java: changes to DrawManager/FingerPainting
Bug: skia:
Change-Id: I609fa91f89ec0cc011046d2f20716efd9b44d4da
Reviewed-on: https://skia-review.googlesource.com/143643
Reviewed-by: Mike Reed <reed@google.com>
2018-07-26 19:29:49 +00:00
ziadb
c4db8708c9 SkAR Java: refactored SkARUtil (now PaintUtil)
SkAR Java: refactored SkARMatrix.java


Merge branch 'master' of https://skia.googlesource.com/skia into skar-java


SkAR Java: better UI for finger painting


Merge branch 'master' of https://skia.googlesource.com/skia into skar-java


SkAR Java: smooth finger painting, planes draw with outlines


SkAR Java: better finger painting. Cleaner UI


FREEZE.unindexed


SkAR Java: drawing planes as paths

Bug: skia:
Change-Id: I56a26b358f1c5903fafe20cacf221c6eb6585c4b
Reviewed-on: https://skia-review.googlesource.com/143541
Reviewed-by: Ziad Ben Hadj-Alouane <ziadb@google.com>
2018-07-26 18:58:16 +00:00
ziadb
aafaf924d5 SkAR Java: refactored SkARMatrix.java (now CanvasMatrixUtil.java)
Bug: skia:
Change-Id: I57ff2f723b2445270246c96ee35e9669e2b21954
Reviewed-on: https://skia-review.googlesource.com/143503
Reviewed-by: Mike Reed <reed@google.com>
2018-07-26 18:57:30 +00:00
ziadb
90edd336ee SkAR Java: better UI for finger painting
Merge branch 'master' of https://skia.googlesource.com/skia into skar-java


SkAR Java: smooth finger painting, planes draw with outlines


SkAR Java: better finger painting. Cleaner UI


FREEZE.unindexed


SkAR Java: drawing planes as paths

Bug: skia:
Change-Id: If138d1d840c013848b1482830713affa5b5d815b
Reviewed-on: https://skia-review.googlesource.com/143502
Reviewed-by: Mike Reed <reed@google.com>
2018-07-26 18:28:45 +00:00
ziadb
897f256413 SkAR Java: smooth finger painting, planes draw with outlines
Bug: skia:
Change-Id: I0e6f3c00f030f7a03c3829cd4ff22ac7459dc132
Reviewed-on: https://skia-review.googlesource.com/142685
Reviewed-by: Mike Reed <reed@google.com>
2018-07-26 15:29:41 +00:00
ziadb
7ae4fcad7b SkAR Java: better finger painting. Cleaner UI
Bug: skia:
Change-Id: If3b595982deb42326213f2feffdddcaa46a5d8ff
Reviewed-on: https://skia-review.googlesource.com/142506
Reviewed-by: Mike Reed <reed@google.com>
2018-07-20 14:28:56 +00:00
ziadb
a44a8a16a8 SkAR-Java: finger painting first implementation
SkAR Java: drawing planes as paths


FREEZE.unindexed

Bug: skia:
Change-Id: I2a7a8534fc1c35c4b8d6054bc1d6e682ffabc47a
Reviewed-on: https://skia-review.googlesource.com/141827
Reviewed-by: Mike Reed <reed@google.com>
2018-07-18 15:31:35 +00:00
ziadb
5a31a60889 SkAR Java: drawing planes as paths
FREEZE.unindexed

Bug: skia:
Change-Id: Ifcb73345d7073f13bf027d79fd90bf3fbff73e5b
Reviewed-on: https://skia-review.googlesource.com/141229
Reviewed-by: Mike Reed <reed@google.com>
2018-07-17 19:26:13 +00:00
ziadb
be396c05f9 SkAR Java: Animation support
Bug: skia:
Change-Id: Ia43ccd7d9969e5167e6cd6f561b2d6d604e700a1
Reviewed-on: https://skia-review.googlesource.com/141100
Reviewed-by: Mike Reed <reed@google.com>
2018-07-13 18:06:50 +00:00
ziadb
5bc4fc8f3f Drawing point cloud + planes on Canvas
Java-only version of SkAR: drawing on android Canvas

Bug: skia:
Change-Id: I76285aa85c7523ad9ae213d32a159b671d8aa30f
Reviewed-on: https://skia-review.googlesource.com/141048
Reviewed-by: Mike Reed <reed@google.com>
2018-07-12 20:08:53 +00:00
ziadb
4cb6520bd0 SkArCamera* files
Bug: skia:
Change-Id: I711143c53bf66ebc8130b2401738da3cde644fbe
Reviewed-on: https://skia-review.googlesource.com/140560
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-12 17:32:54 +00:00
ziadb
bb5b7588d6 Java-only version of SkAR: drawing on android Canvas
Bug: skia:
Change-Id: I3b85fac93a2854d1575f71554e2a7da66e8a6a6f
Reviewed-on: https://skia-review.googlesource.com/138920
Reviewed-by: Mike Reed <reed@google.com>
2018-07-12 14:52:22 +00:00
ziadb
bceddbcb72 SkAR: drawing text, shapes, rotation modes enabled, translating objects
To run this app, you need to create an out directory as such:
bin/gn gen out/arm64 --args='ndk="NDK_PATH" target_cpu="ABI"'

For now, the only supported ABI is arm64

Change-Id: I012f0c6a0550d80a0028f42177d5ca72974d848d
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/130980
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ziad Ben Hadj-Alouane <ziadb@google.com>
2018-06-19 19:10:54 +00:00