IsContainedVolume -> hasIsolatedZVolume conveys that this affects Z
ordering of views
ProjectToContainedBackground -> ProjectBackwards, since it ended up
using its own projection target, separate from the 3d volume bit
Change-Id: Ia2cde838cc4da134366fe6ff623290fbd65e50c3
Because the caching of projection matrix didn't account for changes in
the offset flag, the flag could be ignored. Now we use both to verify
that the cached matrix can be used.
Change-Id: I193b94eaf0b98f046a6484f0866c3d25048653fd
Fixes the simplifying assumption that shadow casters were always
rectangular.
Java side APIs + plumbing to pass down correct shapes still need to be added.
Change-Id: Ic4fee90af15679951a44bb5cc6ae454b98c4c194
bug:12581401
Adds temporary logging which should log/crash earlier on incorrectly
reordering hierarchies.
Change-Id: Iee00940718c3cc868161e754aff93cd3b2747094
For positioning of glyphs within a bitmap, roundf(int + float) is used,
where the float is the glyph position and the int is the text position.
When the text position is varied, this may lead to the sum being rounded
in different directions, due to floating point rounding, caused by that
floating point numbers have different precision in different ranges.
This may therefore lead to slightly different positioning for glyphs and
therefore slightly different widths and heights for text strings,
depending on the position they are rendered at.
The solution in this patch is to use int + (int) roundf(float), which
has consistent rounding, and also enables us to use the full range of
ints.
Change-Id: Id1143cdfcbdfa9915ced878ae04df589a3e03cee
mBitmap and mTexture is not initialized to NULL which causes
illegal address access when it fails to be created from
oversized bitmap.
Change-Id: Iea54bec8788bc5f3a10040fdb43f416c0d41a14c
The ortho projection can't handle 3d translation, so skip that step if
perspective projection isn't enabled.
Change-Id: I231e6bcecc82e876b697e098e034f0fd3b06efde
For now, ancestor views signal the acceptance of projections with a
save(0x20)/restore pair.
During the order traversal, each view with the save(0x20) code will
collect descendent views with mProjectToContainedVolume (which still
needs to be renamed) so that they can be drawn out of order later.
- *Temporary* sample code added to HwAccelerationTest.
- Note that a projected displaylist must not be clipped.
Change-Id: I45c493e845961535b958d59c53e8aff3f8891d9f
setIsOpaque() has been removed from ToT Skia.
Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.
Change-Id: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a
The eventual goal is for the StatefulBaseRenderer to serve as the
common base class between the DisplayListRenderer and OpenGLRenderer.
This will separate DisplayList recording, Snapshot stack management,
and the GL in OpenGLRenderer.
Additionally, avoid sp<> parameters, and use const parameters in
several places, with the intent of greatly reducing the surface area
where renderer subclasses can modify snapshot stack.
Next steps:
-move bulk of clipping logic into StatefulBaseRenderer
-disable direct snapshot access
Change-Id: Ibc3c6747134ec7daf8ea535866239fa73b874390
This will eventually serve as a base class to allow
DisplayListRenderer to split off from OpenGLRenderer, and could
eventually support other rendering approaches, such as an
SkCanvas/SkPicture.
This will also be the main source of (implementation-independent)
documentation of the canvas/renderer methods.
Change-Id: I52047f338f5cf86a3b0b3002af7154bff5c3c227
Doing so prevents us from double-locking the glyph cache, thereby
effectively locking ourselves out of reusing work that we'd just done.
Bug: 11968757
Change-Id: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89
Basically we compute the shadow as a strip of triangles, whose alpha value
is the strength of the shadow.
We use the normal to extend the geometry.
And we use static function and try to avoid new/malloc in the computation.
Change-Id: I382286f1cad351bd5ff983f76f446c075819dcaf