GL renderer was not initializing scissor correctly for translucent
surfaces, resulting in invisible window backgrounds in some cases
like fading popup windows
Change-Id: I87a964986e1ba2c4f59708c8892c5fa71903e6fc
Lines were not drawing in Calendar because they were getting clipped
by the previous clip rectangle. This change simply updates the scissor
as needed. This change also reduces the number of state changes in GL.
Change-Id: I41ab13dca3a33cfa6d1a44371c48852ab418b04e
drawColor() was not calling quickReject because it fills the clip region
and thus always passes the test. However, quickReject also checks whether
the current layer is invisible. drawColor() now performs the same check
and avoid drawing inside an invisible layer.
Change-Id: I63d0e9a8a9c0fba774f0f5c3870d58e6ed96fbd1
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.
Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
This change batches calls to glScissor() and removes extra GL
queries and glActiveTexture() calls.
Change-Id: I1cd079d314f87cd9c088f95c8d4909c2f860f6aa
We now use a copy of SkPaint objects to avoid having it changed from under us.
We reuse copies that have not changed. We also copy the SkMatrix every time to
avoid the same problem.
Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
Removes unnecessary forward class declaration, make Caches::currentBuffer
private instead of public.
Change-Id: Idba6325c8c602d89239e667cb8ec87e7943f8e75
The declaration of Singleton objects must be in CPP files (not header
files) to avoid creating separate instances of what is supposedly a
single object.
Change-Id: Ie903384824a458b5572f3ce5b6cfb359c18a9c44
A change was made earlier in the renderer to not snap the current clip rect
on every clip operation. The clip rect must not be snapped to pixel boundaries
before being used for pixel precision operations. Some operations were doing
this correctly, others were not. For instance, a layer was always created by
rounding to the correct pixels, but composing a layer was done with a non
rounded clip, thus resulting in slightly odd behaviors.
Change-Id: I31c2cf0a343450470bcd449c3f13fe37648b9c7c
The local clip rect could be off by one pixel when a 3D transform
was applied to a text primitive. This would cause small rendering
glitches in Launcher in particular.
Change-Id: I1254f6a5838c26810cbe969b096679d40b8dd504
Don't clear the entire texture when we use textures that are bigger
than the layer itself. This will save time during the glClear() calls.
Change-Id: I06f3259ba62affb3708ba69ea41418832c7e1a65
This change detects empty quads in 9patches and removes them from
the mesh to avoid unnecessary blending.
Change-Id: I4500566fb4cb6845d64dcb59b522c0be7a0ec704