Bug: 18718646
Caused because the Texture object thought the GLES texture
was in a different state than it was as it persists across
EGL/GL contexts. Fix this by force-flushing the default
values when the texid has changed.
Change-Id: I264bac9a2beb08df8e2ba8a85ad15f0dd1fce22a
Bug: 18317479
RenderNode::prepareSubTree calls prefetchAndMarkInUse
on every bitmapResoruce in the DisplayList. However,
this resulted in textures being uploaded for bitmaps
that would be drawn from the AssetAtlas instead.
To fix this we teach TextureCache about the AssetAtlas
so that calls to TextureCache return the Texture from
AssetAtlas if it exists. Thus usage of AssetAtlas
is now purely to allow for further optimizations via
draw merging instead of a requirement to get
any benefit at all.
Change-Id: I65282fa05bac46f4e93822b3467ffa0261ccf200
bug:18667472
Previously, we were allocating per-frame temporary paths within the
PlaybackStateStruct, but these are not safe as layers allocate these
transiently. Instead, move these to the OpenGLRenderer, which has
better define lifecycle.
Additionally, don't store SkPath objects directly in vector, since
they are then subject to relocation.
Change-Id: I8187ef542fcd5b030502bb75eb123ee26c0daa96
A sentinal value of 0x00000000 was used to mark the first time an AttributeFinder
was used. If the resource ID of an attribute was also 0x00000000 (which occurs with
non-resource attributes, like 'style'), then it would be mistaken as the sentinel
start value.
Bug:18421787
Change-Id: I4be353e0f8c940cb6f262d155129f048dcc444ae
The SkBitmap* used by HWUI holds a reference to the PixelRef (which
in turn holds the colorTable) so keeping an additional ref is not
only unnecessary, but also potentially problematic.
If a bitmap changes its pixelRef after it has been added to a displayList,
then we end up with unbalanced ref/unref calls that cause the newly added
PixelRef to be unref'd and prematurely deleted, while the original PixelRef
is leaked.
bug: 18659976
Change-Id: I34a06152e7bb2d733249a207dafd36b9b5dc0712
Private attributes are typically placed after public
attributes in the resource table. Each time a new version
of the Android framework is released, new public attributes
take the place of the private attributes, and the private
attributes are shifted after the new public ones.
This means that any apps built against the newer SDK
may inadvertently be using private attributes on older
devices.
This change moves all private attributes to a completely
different type ID, so there will never be collisions across
versions.
These private attributes are automatically moved to a synthesized
type only for the system resources.
Bug:18263655
Change-Id: I7a850512953fadcc9f3524d509cea30249782db8
Bug: 18203577
The issue occurs as a result of performTraversals() both doing
a window relayout call *and* early-returning because it's not dirty.
To fix this pauseSurface() returns whether or not the RT-side is
"dirty" to force ViewRootImpl to do a draw even if mDirty is
otherwise empty.
Change-Id: I534f367e75d18d273ebf14df3927f5c464ef6bef
bug:18509823
This allows animations of View clipBounds (and other callers of
setClipBounds) to affect shadows, instead of leaving them floating.
Change-Id: I249fa4b371a170cb0c54001f5b0e0097e109b8b8
Bug: 18518580
When destroying CanvasContext, the surface can be invalid
state. So the surface should be updated to null prior to
destroying GL resources to ensure that GL functions
are not called with an invalid surface.
Some GL implementation makes an error if GL functions
are called with an invalid surface. (Adreno 3xx)
Cherry picked from AOSP: f76d36f96bf221672e98e440c9df7cbf0e02e84e
Change-Id: Ie6f6ea081ec931fc9df30b2c3ed066ec1ae9d294
bug:18538502
Cherry-pick of adc0d9da8648abfea1035fb1108eceea9fd9b5b1 from AOSP
Previously stencil clipping within clearLayerRegions is disabled by commit
62d307c2402777d5e53b4590af5f32f8c55afd81. However, clearing whole layer
regions causes black-colored triangle regions when a TextView has
RotateAnimation because the draw within clearLayerRegions does not
affected by the current stencil clip.
Change-Id: Id32a0b16754b109905f833e063ebfa156bd953f2
Signed-off-by: Dohyun Lee <dohyun.lee@lge.com>
Bug: 18518580
If CanvasContext is being destroyed() the Surface
is probably no longer valid as well, so make sure to
makeCurrent() to the pbuffer surface so that the
subsequent GL operations are not using an invalid
EGLSurface
Change-Id: Ica5d6a065841772c47e00ad65aa7894c7e27e043
bug:17702227
Add details useful to developers (such as layer size/View name), and
switch away from logging implementation names/details, since they
are generally not relevant to developers.
Change-Id: Iee605d182f241450f7e75a6d0c283d51fa1312f5
Fix the crash from searching for closest umbra vertex by initialized the
starting index correctly.
Fix another potential crash related to ray intersection by introducing epsilon.
b/18315089
Change-Id: I9ac9a781a885701a8388714d44f79a1d905e5d33
Add a non-public API to Canvas/GLES20Canvas to provide a way to draw
the touch ripple animation without using a save layer.
Change-Id: I6e2095adffe515194f669fb75bb67abf813bd518
Bug: 17516789
This will force a relayout/reinitialize pass if the Surface
is lost mid-render instead of crashing on the next frame
Change-Id: If08bfa16f740728fa7c05904fa11e26f07b81e2e
1. This improve the looking, the star shape (spike) on long action bar is gone.
Shadow is more smooth now.
2. The performance is better, too. For averaging around rect, round rect and
circle, the spot shadow itself is 3 times faster. On N7 v1, it could be less than
0.1 ms.
b/14976551
b/16712006
Change-Id: I61ed546ee56e7c8dbe504dfcaef12d084904b4b8
Bug: 17947547
Pull the ResourceCache (aka, ref-counting side channel) out of
Caches so that DisplayListRenderer doesn't use Caches, avoiding
the risk of instantiating Caches on the wrong thread or
without a GL context
Change-Id: I7d63b70b3b0a0163308c5dedd6ef255eadebe8fd
So that there will be something to diagnose when such failures occur during
stability tests.
Bug: 18092655
Change-Id: I9a9d8d33b34273a477f2a9dbcf092887dcbc91c0
Shared libraries have their package ID assigned at run-time, so some
of the guarantees we used to have about sort order of attributes in
bags or XML elements no longer hold.
This CL adds back-tracking and can jump to the nearest attribute with the
same package ID and continue searching.
This means that attributes with the same package ID must be sorted by increasing
resource ID, as was the case before.
Attributes with the same package ID must be grouped together, but the groups can
be in any order. Ex: 0x02010001, 0x02010002, 0x01010000, 0x01010010, 0x7f010032
Bug:17666947
Change-Id: I9c198bbb6ca788849aac85b6323606ea5d9550d6