Commit Graph

615 Commits

Author SHA1 Message Date
John Stiles
07e0a0abd3 Honor SkQP flag when running SkSL tests.
The Android builds of SkQP will conditionally exclude any tests that are
not flagged with `SkQP`.

Note that local builds of the C++ skqp binary do not actually set
SK_BUILD_FOR_SKQP. This flag is set by gn_to_bp. So local skqp binaries
will continue to run these tests. A possible fix for this limitation
has been written in the followup CL: http://review.skia.org/518939

Change-Id: I879650d165c5931693b14102586bae2c9e45dd43
Bug: skia:13037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518936
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2022-03-10 15:16:23 +00:00
Kevin Lubick
efce17de5d Reland "[includes] Remove link between SkImage.h and SkImageEncoder.h"
This is a reland of commit f60584eb0f

Client changes:
 - https://chromium-review.googlesource.com/c/chromium/src/+/3508565
 - http://cl/433225409
 - http://cl/433450799

Original change's description:
> [includes] Remove link between SkImage.h and SkImageEncoder.h
>
> According to go/chrome-includes [1], this will save about
> 210MB (0.09%) off the Chrome build. http://screen/GVdDaRRneTRuroL
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&included=&limit=1000
>
> Change-Id: If911ec283a9ce2b07c8509768a6a05446573a215
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512416
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: 242216
Change-Id: Ic61e4ac2878e7a51f389312a3a434856e2e32be3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518277
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-10 04:47:51 +00:00
Nathaniel Nifong
db949f4643 Remove three qualcomm related tests from skqp
Bug: b/222736702
Change-Id: I0dfeea605b65b42ed3f2521698a9c998d0787105
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518698
Auto-Submit: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2022-03-09 19:49:46 +00:00
Kevin Lubick
a573cbab1a Revert "[includes] Remove link between SkImage.h and SkImageEncoder.h"
This reverts commit f60584eb0f.

Reason for revert: Chrome and G3 issues

Original change's description:
> [includes] Remove link between SkImage.h and SkImageEncoder.h
>
> According to go/chrome-includes [1], this will save about
> 210MB (0.09%) off the Chrome build. http://screen/GVdDaRRneTRuroL
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&included=&limit=1000
>
> Canary-Android-Topic: image-encoder-2
> Change-Id: If911ec283a9ce2b07c8509768a6a05446573a215
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512416
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: 242216
Change-Id: Idc906ff54d8baf49989d3ee24e045d7b0ca710df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517676
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2022-03-08 13:09:49 +00:00
Kevin Lubick
f60584eb0f [includes] Remove link between SkImage.h and SkImageEncoder.h
According to go/chrome-includes [1], this will save about
210MB (0.09%) off the Chrome build. http://screen/GVdDaRRneTRuroL

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImage%5C.h%24&included=&limit=1000

Canary-Android-Topic: image-encoder-2
Change-Id: If911ec283a9ce2b07c8509768a6a05446573a215
Bug: 242216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512416
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-07 21:32:13 +00:00
Nathaniel Nifong
3b3d0a5129 Do not run ProcessorOptimizationValidationTest
Change-Id: Ib891a4d18b5f66e992fcb43d2f982f0893962368
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513878
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-03-01 16:39:45 +00:00
Nathaniel Nifong
c0714019cd Copy in list of test exclusions from go/skqp-cts-tests
Bug:skia:12980

Change-Id: I28406750487ff7a8c74508bad93dc30a043ac1ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512153
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-24 19:03:19 +00:00
Jorge Betancourt
19b722d8d7 remove now unused CorrectnessActivity in Skottie android app
This is an old activity that generates a 5x5 film strip of lottie animations on Android devices.
While unlikely, if this removal breaks something, it will most likely be in our lottie gold instance.

Change-Id: I2d3f6b81b2e5481ed0ae581d2fd86e4e61020e54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512154
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-02-23 20:05:48 +00:00
Derek Sollenberger
007fd156a0 Fix SkQP errors when built in the Android framework.
Bug: skia:12890
Change-Id: I81ab3c883fc085d02ff6984c799f2e7d840f7a1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507916
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-11 20:48:50 +00:00
Nathaniel Nifong
0d36473ebc Add android build files for skqp cts testing
Bug: skia:12890
Change-Id: I44dde188b7b7daf1c6e5c718b6b2874bbc28510d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506459
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-11 18:52:27 +00:00
Florin Malita
82d65d0487 Revert "Migrate compat v4 classes to androidx"
This reverts commit dec95f24e1.

Reason for revert: broke viewer build

The original CL was landed to keep upstream Skia the source of
truth when the changes were proposed directly in G3 in cl/414839941.

Original change's description:
> Migrate compat v4 classes to androidx
>
> Change-Id: I9dd1d4cbaaf0dc5c4dc8a7bd9155ae6334ab24af
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/480396
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: I660ba61a3a777e18154c52e8eda63937be4d7b4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507184
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-02-11 00:51:39 +00:00
Nathaniel Nifong
9eb1679b77 Add regular expression capability to SKQP unittest filter
Current behavior, as an example, is to run every test not matching ".+ES3"
but this is subject to change based on Brian Osman's input

Bug: skia:12796
Change-Id: Ib798a6a6e6323ae0cf349010fce3f5982f2038bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/498976
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-01-25 21:39:44 +00:00
Derek Sollenberger
1afa5fb64b Reduce scope of SkQP to pass/fail runs of GMs and UnitTests
Going forward specific GMs can be added to the rendertest.txt
in order to do a basic pass/fail run based on whether the GM
can successfully complete without crashing.

The output of the executable was also updated to print one test
per line in order to make following its execution more readable.

Bug: skia:12777
Change-Id: I98f6fa7af765130ddf68203d62c972659fd4e325
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/489617
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2022-01-04 18:07:48 +00:00
Ben Wagner
dec95f24e1 Migrate compat v4 classes to androidx
Change-Id: I9dd1d4cbaaf0dc5c4dc8a7bd9155ae6334ab24af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/480396
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-12-06 18:04:57 +00:00
Jorge Betancourt
2cddedd5f9 change method signature for FontChain
Change-Id: I1adf796be5ae1c6c7b70022cbe8e42ce9089f74d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463258
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-10-28 01:57:32 +00:00
Jorge Betancourt
ebe2d82384 [JetSki] get TypeFace from FontMgr
Change-Id: Ied6cc2f67434757ed1cf6dd4edb6c40798ec206b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450038
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-10-20 19:33:30 +00:00
Jorge Betancourt
aa9656d8ca expose FontChain interface to Java with FontChainAdapter
initial commit to add fontChain to JetSki

Change-Id: Ic2e27b055888394b0b8202d817b0c09595ca9fa0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457837
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-10-14 19:58:29 +00:00
Jorge Betancourt
4d06441fca [JetSki] bind drawGlyphs to JetSki for Text rendering
Change-Id: I5cd691b5b3fda58afdc8ddd5213063c202b19672
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447716
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-09-22 19:38:13 +00:00
Jorge Betancourt
151a6f34e1 expose Font to JetSki
Change-Id: Icea51ab00118b48898df70f4f1fa9ed985372589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444760
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-09-07 21:51:30 +00:00
Jorge Betancourt
c1727fc217 [JetSki] pass SkPaint into experimental SkText drawText calls
tests currently through jetski demo

Change-Id: I0847e98579b62104e5d9ddaa7ca008f5a75be5c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441427
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-08-26 13:01:51 +00:00
Jorge Betancourt
e1fb47daac [JetSki] plumb experimental SkText to JetSki
Change-Id: I972ff5bd066ff9e8afa98f506e6fe9d6b9dc621a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440597
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-08-24 15:34:21 +00:00
Jorge Betancourt
14c4206d25 [androidkit] add seekTime and seekFrame for SkottieView util view
Change-Id: Ic714c0be2f63f62485e9d44f1db1e708f3c04dcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433056
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-29 14:12:54 +00:00
Jorge Betancourt
0b94acc132 [androidkit] initial upload of SkottieView util
Change-Id: I6f83ee6947121bef8a0c5b76b7a96ad85f24bd36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430018
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-26 15:47:10 +00:00
Jorge Betancourt
5514beaf3b [androidkit] bind SkImageFilters to java shared library
SkImageFilter::image
SkImageFilter::blend
SkImageFilter::dropShadow
Change-Id: Ie8cce8a06a2f50b2b3c905097740cc10b91a6c86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428577
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-16 16:18:55 +00:00
Florin Malita
1df8756419 [androidkit] Color filter support
Add MatrixColorFilter, HSLAMatrixColorFilter and ComposeColorFilter.

Change-Id: I047368adcd13452566a40e91a6f594dd525efd5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422517
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-29 12:42:19 +00:00
Jorge Betancourt
4588910612 [androidkit] expose paint stroke settings
Change-Id: I9e34c319ff8b056e5b9cc0104be2ad50b37284c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422618
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-28 20:19:22 +00:00
Jorge Betancourt
0ce582790a [androidkit] introduce clipping to java Canvas
clipPath(), clipRect(), clipRRect(), clipShader()

Change-Id: Iee2571c6ab7c3f8cdfbfc4df223fd59d307b5c62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420880
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-28 16:04:49 +00:00
Florin Malita
b445cbeee2 [androidkit] Add remaining gradients
Consolidate the common logic in a Gradient base class, and add
radial/conical/sweep factories.

Change-Id: Ife15ae78e7c6df48cfa67fe20054f9bd9a8a1e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420897
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-24 17:43:38 +00:00
Jorge Betancourt
b75ee08162 [androidkit] add bounds and paint to canvas.saveLayer()
Change-Id: I55701ebb23bcf31a8f1e1533b030f685f2f10127
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420117
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-06-23 16:40:45 +00:00
Jorge Betancourt
7280b36687 [androidkit] add gaussian blur filter to java ImageFilters
Change-Id: I63f3f3feaf590971633c88857105ed14dbab2bb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420122
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-22 15:42:11 +00:00
Florin Malita
ca8191b0ad [androidkit] Add linear gradient
Change-Id: Ie08dcde421bb4f67b8467361bda563d5a65ddbd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416777
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-17 20:55:53 +00:00
Jorge Betancourt
cfa4774f9a [androidkit] expose SkPath to androidkit
Change-Id: Ibc871459234ba72b0ab948c601e0895c15e21126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415797
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-16 20:23:20 +00:00
Florin Malita
dca72634f1 [android] Bump gradle heap size to 4GB
Change-Id: Ic6b1ff506fc11ee077be80cf8781ad0e6c5874e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418136
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-06-15 19:15:48 +00:00
Florin Malita
4f382641ec [androidkit] Add pinch-zoom support to cube demo
Also add translate/scale Canvas helpers.

Change-Id: I8c46d45f73a41907d8d8f83b355a4185b6975f06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416776
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-15 14:06:17 +00:00
Jorge Betancourt
ed3c0ed9e4 [androidkit] fix parameter names for drawRect
Change-Id: Ieb8c7869654531c01e9000cc0a0af9f87822a2fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415762
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
2021-06-07 14:20:20 +00:00
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