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>
- 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>
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>
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>
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>