Bug #6258973
When flushing the layer caches we would attempt to delete the FBOs
associate with layers in the cache. The FBO property was however not
always properly cleared when recycling layers.
Change-Id: I7dedfe391d659a0849f1e1d84df17313b2c6e2b2
I don't know who's to blame, SGX or Tegra2 but one of those two GPUs is not
following the OpenGL ES 2.0 spec.
Change-Id: I2624e0efbc9c57d571c55c8b440a5e43f08a54f2
This change removes unnessary symbols. All symbols are hidden by
default, public APIs with exported symbols are explicitly marked
with ANDROID_API.
Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
This method is invoked by TextureView.getBitmap() and failures must be
caught to avoid leaving the GL context in a potentially bad state.
Change-Id: I620de395ba1bc20154de58c81963223dc55cac78
Bug #4343984
TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.
The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.
For instance, to render the camera preview at 50% opacity,
all you need to do is the following:
mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();
TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.
Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
This brings back an optimization disabled in HC-MR1. This time the
correct geometry is generated to avoid unnecessary blending.
Change-Id: Id56404dc46bb84c75facc25c18488a690741b592
Bug #3515248
The problem is caused by the fast path when compositing layers on screen.
The fast path draws a single quad using glDrawArrays() whereas the general
path draws an arbitrary mesh using glDrawElements(). It looks like there's
an issue in the driver since glDrawArrays() is significantly slower than
glDrawElements() for a quad (6 vertices!)
This change just gets rid of the fast path.
Change-Id: Ib2361253ec67f44a988270f76c183422f12ce537
Bug #3413433
This change will be beneficial to Launcher to avoid hiccups when
swiping pages of icons. When a layer is discarded, it is kept
in the layers pool instead of being destroyed right away. This
favors memory reuse over allocations.
Change-Id: Ifb6944ba83d6ceb67c331527c0827b26ce648eb1
Bug #3413433
This helps Launcher when a widget updates during a scroll, or when interacting
with widgets on the workspace if layers are still turned on.
Change-Id: Ic7a42eb34f74f4ae988039754f815e2efd1d1e4f
Various property setters in View need to invalidate the parent's
cache to get redrawn properly when accelerated with display lists.
Also, fix logic around display lists and old-style Animations in
ViewGroup.
Change-Id: I70e1c2fa49e62228ee4a1301a006ce50bda4c305
The renderer was checking whether the layer's region is a rect to
draw it with a simple quad. This test was done against the layer's
region structure, which was cleared after generating the mesh.
Unfortunately Region::isRect() returns true when the region is
empty, which was causing the renderer to always use a quad to
draw a mesh on screen.
Change-Id: If4b874579ee0cedcb67367c9efa5c0c98ca55231
With this change, the rendere keeps track of what regions are rendered into
and generates a mesh that matches these regions exactly. The mesh is used
to composite the layer on screen.
Change-Id: I1f342576b9134fb29caff7fb8f4c1da179fe956d
The new implementation relies on OpenGLRenderer's existing layer
code instead of duplicating it. The new code is much cleaner, with
simpler and better APIs and allows tracking of drawn regions inside
layers. Region tracking is not yet enabled but this will be done
in a future CL.
Change-Id: Ie826121a2227de8252c77b992a61218defea5143
With this new backend, a hardware layer is only recreated when
its associated view is udpated. This offers fast composition
in GL and fast update of the layer in GL as well.
Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076