This reduces state changes when we draw 9patches and text together,
which happens *a lot*. Also disable the NV profiling extension by
default since it doesn't play nice with display lists deferrals.
To enable it set debug.hwui.nv_profiling to true.
Change-Id: I518b44b7d294e5def10c78911ceb9f01ae401609
We were treating immediate mode bounds as pre translate, which is
inconsistent with using them for quickRejection.
This fixes the overdraw counter not drawing correctly (since it uses
immediate mode drawing.
Change-Id: I1c734d367a00942bd7d9b041822c0a9f284e70a8
bug:9464358
Previously, empty and unknown sized ops are assumed to fully cover
their clip. This is now corrected such that empty sized ops are
pre-rejected before defer. Additionally, unknown sized ops disable
overdraw avoidance.
Change-Id: Icf2ce24f98be5ea6299e24ffcf826790373564a1
bug:9310706
In some cases flush will occur after a layer is destroyed. Avoid
trying to draw after putting the layer in the layer cache.
Change-Id: I55d66f420e7354fe552c82eb3145a7d91b4441e3
Previously, a new op with a clipped side could be added to a
MergingDrawBatch without considering the batch's current bounds.
Change-Id: I1b873ecf821bad7cda6630c3f311edd90ac5cc8c
bug:8965976
Also consolidates quickReject scissor-ing and scissor-less paths.
Renamed plain 'quickReject' method, as it has sideEffects beyond what
the java and skia canvases do.
Change-Id: I4bdf874d3c8f469d283eae1e71c5e7ea53d47016
This class can be used to perform occlusion queries. An occlusion query
can be used to test whether an object is entirely hidden or not.
Change-Id: Ida456df81dbe008a64d3ff4cb7879340785c6abf
bug:8951267
If an opaque op, or group of opaque ops covers the invalidate region,
skip draw operations that precede it.
Clipped operations may now be merged, but only if they share a
clipRect - this is a very case for e.g. ListView, where all background
elements may now be a part of the same MergingDrawBatch.
It is this more aggressive merging that groups together clipped
background elements in the ListView case, enabling the overdraw
avoidance skipping the window background.
Change-Id: Ib0961977e272c5ac37f59e4c67d828467422d259
This optimization saves up to 0.3ms per frame on the Play Store's
front page, on a Nexus 4 device.
Change-Id: Iaa4ef33c6e3b37e175efd5b9eea9ef59b43f14f3
Bug #9316260
The GL specification indicates that deleting a bound texture has
the side effect of binding the default texture (name=0). This change
replaces all calls to glDeleteTextures() by Caches::deleteTexture()
to properly keep track of texture bindings.
Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0
The 9aptch cache was reinitialized after destroying/recreating
the EGL context but not after clearing it during a normal
memory trim.
Change-Id: If6155bfc8a62439e9878bc742a4766b3bd6c6aec
The virtual textures would each have their own values for wrapping
and filtering which could lead to conflict and/or extraneous GL
commands being issued.
Change-Id: I64cb59a03e598f46bf645bd1d30fccfa63a07431
The eglGetSystemTimeNV extension can be used to enable profiling
in PerfHUD ES. When the delta of two calls to eglGetSystemTimeNV
equals 0, we now cancels display lists updates. This allows the
tool to redraw the same frame several times in a row to run its
analysis.
For better results profiling should only be attempted after
setting viewroot.profile_rendering to true using adb shell
setprop.
Change-Id: I02e3c237418004cff8d6cb0b9a37126efae44c90
Previously, when a DisplayList operation was rejected because it was not
in the clip bounds, the code would not properly restore the previous
state, leading to errors in alpha values of the noop'd op being applied
to unrelated operations later in the DisplayList.
Issue #9051935 Flash of grey background when transitioning to conversation view
Change-Id: I56645cc9ebf2e07be0228ca5e249213dbeb10d7d
bug:8766924
Previously text bounds were calculated to be from 0 to totalAdvance in
the X, and from the font's top to bottom. These are incorrect,
especially in light of the font fallback mechanism.
Now, we calculate the bounds of the text as we layout each glyph.
Since these are much tighter bounds in the common case, this
significantly reduces the amount of clipping required (which in turn
enables more aggressive text merging).
Change-Id: I172e5466bf5975bf837af894a9964c41db538746
bug:4351353
bug:8185479
Point tessellation is similar to line special case, except that we
only tessellate one point (as a circle or rect) and duplicate it
across other instances.
Additionally:
Fixes square caps for AA=false lines
Cleanup in CanvasCompare, disabling interpolation on zoomed-in
comparison view
Change-Id: I0756fcc4b20f77878fed0d8057297c80e82ed9dc
bug:8875715
Additionally moves op logging before the op is executed, to print
correctly, in pre-order traversal
Change-Id: I4e9566261f8363c73739d183e6d82b854f72ffad