Skia is looking to make SkAutoMalloc private and will be moving it.
Using FatVector instead will make this code both less dependent on Skia
internals and more performant.
Test: refactoring CL. Existing unit tests still pass.
Change-Id: If9de10059775b75e1ab89078eacede2e20e91299
This CL enables developers to specify axis values to the underlying
font collection. The specification of the font variation settings is
the same as the CSS font-variation-settings attribute in CSS working
draft as of 2016-11-30.
Code example: Here is an example to set width 100 and weight 1.5.
TextView tv = (TextView) findViewById(R.id.textView);
tv.setFontVariationSettings("'wdth' 100, 'wght' 1.5");
Bug: 33062398
Test: Manually done. Ran FrameworksGraphicsTests, CtsGraphicsTestCases
and CtsWidgetTestCases
Change-Id: I249d464f8cdaa56017a987588b94ed685aadeb58
minikin::FontFamily no longer has addFont function, instead it accept
vector of Fonts in its constructor. To follow this signature change,
holding minikin::Font instance in native and build minikin::FontFamily
instance in FontFamily.freeze() method.
Test: hwui test passed
Change-Id: Id10ca97f6f6f5bbe4999c1ad2736423a204d6e87
This warning was generated by the static analyzer:
warning: The left expression of the compound assignment is an
uninitialized value. The computed value will also be garbage
*mDirtyMask |= animator->dirtyMask();
This can be fixed by initializing dirtyMask before using it in
AnimateFunctor.
Bug: None
Test: Static analyzer no longer complains about this.
Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e
Implement onDrawImage, onDrawImageRect and onDrawImageLattice in
SkiaCanvasProxy. This allows to replay SkPicture with HWUI pipeline.
This CL is needed to keep up with other changes in SkiaRecordingCanvas,
because Canvas::drawBitmap is translated to SkCanvas::drawImage.
Test: Built and ran angler-userdebug, ran HWUI unit tests.
Change-Id: Icd6cfd3bc51628a2c336faf4c95dfd5366a949a9
This API is difficult to support for printing and has other negative
effects as it does not respect the current matrix/clip.
Test: compile
Bug: 14650725
Change-Id: I71f9bd687d446c7ce8910d755421aad8e09458db
Use new Skia API to enfore clip restriction for root render node.
This brings Skia pipeline in line with HWUI. Unit test is
updated to reflect the new behaviour.
Test: Built and ran angler-eng, ran HWUI unit tests.
Change-Id: Iffce70fd37b6aff45eb6a23c8b1a64f45b5f1463
This configuration uses 64 bits per pixel. Heach component is stored as a
half precision float value (16 bits). Half floats can be decoded/encoded
using android.util.Half.
RGBA_F16 bitmaps are used to decode wide-gamut images stored in 16 bit
formats (PNG 16 bit for instance). aapt is currently not aware of PNG
16 bits so such files must be placed in raw/ resource directories.
This first pass provides only partial drawing support with hardware
acceleration. RGBA_F16 bitmaps are stored in linear space and need
to be encoded to gamma space with the appropriate OETF to be rendered
properly on Android's current surfaces. They are however suitable for
linear blending. Full rendering support will be provided in a future
CL (BitmapShaders might be a bit tricky to handle properly during
shader generation).
Bug: 32984164
Test: bit CtsGraphicsTestCases:android.graphics.cts.BitmapRGBAF16Test
Change-Id: I328e6b567441a1b9d152a3e7be944a2cf63193bd
Modify SkiaCanvas::saveLayer to always save matrix and clip and
match HWUI behaviour. Also ensure android state tracking
behavior matches that of the Skia API (partial saves not
supported). This change is fixing SaveLayerAnimation
macrobench when buffer age is disabled.
Add a HWUI unit test that verifies clip and matrix are restored.
Test: built and ran angler-eng, ran hwui unit tests
bug:33429678
Change-Id: I62e429f9746518fef67663b0dd99ac499bf31af3
Fix SkiaPipeline unit tests failure, caused by double deallocation
of SkCanvas in DeferLayer.
Test: build and ran angler-eng, ran HWUI unit tests.
Change-Id: I4a0a0113588e40a8ed32093d57efc6af3c0d7745