968 Commits

Author SHA1 Message Date
Romain Guy
fb5a41a371 Merge "Fix regression: TextureView.setAlpha() was ignored" 2013-06-19 23:40:57 +00:00
Romain Guy
2458939b5f Fix regression: TextureView.setAlpha() was ignored
Change-Id: I9f43eec0fe23a65dcc1cf9cd0ac1f5e8907786a7
2013-06-19 12:17:01 -07:00
Romain Guy
cadc5bf411 Merge "Share Caches' index buffer with FontRenderer" 2013-06-19 19:16:21 +00:00
Romain Guy
31e08e953f Share Caches' index buffer with FontRenderer
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
2013-06-18 15:53:53 -07:00
Romain Guy
77d55c7e5c Merge "Take hinting into account when caching fonts Bug #9464403" 2013-06-18 20:08:39 +00:00
Romain Guy
2d5945e887 Take hinting into account when caching fonts
Bug #9464403

Change-Id: I26a5f0c17eb27d096717b444d3e18ad1d2b5a43c
2013-06-18 13:02:03 -07:00
Chris Craik
49cc5d7119 Merge "Handle all text bounds as post-translated" 2013-06-17 22:50:39 +00:00
Chris Craik
f09b746acb Handle all text bounds as post-translated
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
2013-06-17 15:17:11 -07:00
Chris Craik
36d38cb904 Merge "Better handle op size edge cases" 2013-06-17 21:02:56 +00:00
Chris Craik
d72b73cea4 Better handle op size edge cases
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
2013-06-17 13:52:06 -07:00
Romain Guy
fb5c905097 Merge "Cancel layer update when a layer is about to be destroyed Bug #9310706" 2013-06-17 20:39:45 +00:00
Romain Guy
e93482f5ea Cancel layer update when a layer is about to be destroyed
Bug #9310706

Change-Id: I73eea6314c326f15a979617e3a05b525935f0d3f
2013-06-17 13:35:03 -07:00
Chris Craik
61e1ca68fa Merge "Check for layer renderer in flush" 2013-06-17 20:16:37 +00:00
Chris Craik
8c6e17c2a9 Check for layer renderer in flush
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
2013-06-17 13:04:45 -07:00
Chris Craik
2a0451e54a Merge "Fix clip merging behavior" 2013-06-17 18:11:34 +00:00
Romain Guy
5216c3b05f Merge more 9patches
Change-Id: If8b16af84f0ee42afc406922d15897e51d833e68
2013-06-14 16:31:37 -07:00
Chris Craik
a02c4ed885 Fix clip merging behavior
Previously, a new op with a clipped side could be added to a
MergingDrawBatch without considering the batch's current bounds.

Change-Id: I1b873ecf821bad7cda6630c3f311edd90ac5cc8c
2013-06-14 13:43:58 -07:00
Chris Craik
d1f9aaa5d7 Merge "Fix various draw ops that may incorrectly not scissor" 2013-06-14 01:06:30 +00:00
Chris Craik
39a908c1df Fix various draw ops that may incorrectly not scissor
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
2013-06-13 16:16:13 -07:00
Romain Guy
735760e3c2 Merge "Add new Query class for debugging" 2013-06-13 22:10:22 +00:00
Romain Guy
7f4307668b Add new Query class for debugging
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
2013-06-13 14:58:32 -07:00
Chris Craik
f70119cd77 Reset batching state when overlap batch deletion occurs
Change-Id: Ifdbee9baaa734e27d15d2b54aa3b3abfffbce1e9
2013-06-13 11:28:45 -07:00
Romain Guy
7112fddbe2 Merge "Restore buildLayer()'s old behavior; it's synchronous again Bug #9193833" 2013-06-13 01:19:46 +00:00
Chris Craik
149b015db9 Merge "Overdraw avoidance and merging of clipped ops" 2013-06-13 00:37:02 +00:00
Chris Craik
9846de68f1 Remove crash workarounds, add logging
bug:9321162
Change-Id: I748c27f979af1a303be01db29aedcbad6d608c38
2013-06-12 16:26:34 -07:00
Romain Guy
405436021d Restore buildLayer()'s old behavior; it's synchronous again
Bug #9193833

Change-Id: I4ee07e65c0a8967f0b55da030ecaad6dfc46136f
2013-06-12 15:31:28 -07:00
Chris Craik
28ce94a4ff Overdraw avoidance and merging of clipped ops
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
2013-06-12 14:46:52 -07:00
Romain Guy
1e4795ab64 Merge "Avoid 9patch cache lookups when possible" 2013-06-12 00:23:27 +00:00
Romain Guy
4c2547fa92 Avoid 9patch cache lookups when possible
This optimization saves up to 0.3ms per frame on the Play Store's
front page, on a Nexus 4 device.

Change-Id: Iaa4ef33c6e3b37e175efd5b9eea9ef59b43f14f3
2013-06-11 17:14:59 -07:00
Chris Craik
e13fb01d25 am 8cb26c09: am cb5d644f: Merge "Workaround possible use after delete" into jb-mr2-dev
* commit '8cb26c099dc6357340141c9d81a1131ee404ae41':
  Workaround possible use after delete
2013-06-11 14:13:32 -07:00
Chris Craik
9abddd54d4 Workaround possible use after delete
bug:9321162
Change-Id: Ic35af5b5925da56e9a143e6b33658831038f3b72
2013-06-10 11:30:37 -07:00
Romain Guy
be1b127c7b Assume a texture is unbound after deleting it
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
2013-06-06 16:26:51 -07:00
Romain Guy
450dc7554d Remove string allocations when creating display lists
Change-Id: Id520db981a3988cb980c8da5dbea8f26ef94989f
2013-06-05 14:14:03 -07:00
Romain Guy
8aa195d708 Introduce Caches::bindTexture() to reduce glBindTexture calls
Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
2013-06-04 18:58:36 -07:00
Romain Guy
f9f0016b1f Enable GPU pixel buffers on OpenGL ES 3.0 devices
Change-Id: I164d72ccd7a9bf6ae0e3f79dfef50083558937ba
2013-06-04 11:57:58 -07:00
Romain Guy
7d9b1b3c02 Re-initialize the 9patch cache if cleared with onTrimMemory
The 9aptch cache was reinitialized after destroying/recreating
the EGL context but not after clearing it during a normal
memory trim.

Change-Id: If6155bfc8a62439e9878bc742a4766b3bd6c6aec
2013-05-28 14:32:01 -07:00
Romain Guy
a404e16e49 Make sure atlas antries can correctly filter/wrap textures
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
2013-05-24 16:19:19 -07:00
Romain Guy
6080940411 Merge "Add PerfHUD ES profiling capabilities" 2013-05-23 19:50:58 +00:00
Romain Guy
e9bc11f712 Add PerfHUD ES profiling capabilities
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
2013-05-23 12:50:13 -07:00
Chet Haase
341ac60009 am 1bf58a5a: am cfbbc864: Merge "Restore previous alpha value on noop\'d DisplayList operations" into jb-mr2-dev
* commit '1bf58a5a4c3275a8de676046da311ec0c3c61c78':
  Restore previous alpha value on noop'd DisplayList operations
2013-05-23 11:28:05 -07:00
Chet Haase
c725903eec Restore previous alpha value on noop'd DisplayList operations
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
2013-05-23 07:57:17 -07:00
Romain Guy
7f77736599 Merge "Merge scaled bitmaps with translated bitmaps" 2013-05-22 00:43:48 +00:00
Romain Guy
2db5e993b6 Merge scaled bitmaps with translated bitmaps
Change-Id: I03089f48f97b69fcb4a0171984d3ff548d41c4a8
2013-05-21 17:42:43 -07:00
Chris Craik
41541825bc Use individual glyph positions to determine text bounds.
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
2013-05-21 23:04:05 +00:00
Chris Craik
7f43674db3 Merge "Fix DISPLAY_LIST_DEBUG" 2013-05-21 20:30:19 +00:00
Chris Craik
6045d2b7cd Fix DISPLAY_LIST_DEBUG
will now log ops

Change-Id: I4e119999af7ceea0558225aa78926e761277fee2
2013-05-21 10:49:47 -07:00
Chris Craik
6d29c8d521 Add tessellation path for points
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
2013-05-14 14:12:55 -07:00
Chris Craik
e8f9a37395 am f420a36e: am 4329ee25: Merge "Fix off by one error in log tracking" into jb-mr2-dev
* commit 'f420a36e5f62a9ab38f6782db78f5d94947b034e':
  Fix off by one error in log tracking
2013-05-10 12:46:45 -07:00
Chris Craik
d4b43b3cf3 Fix off by one error in log tracking
bug:8875715

Additionally moves op logging before the op is executed, to print
correctly, in pre-order traversal

Change-Id: I4e9566261f8363c73739d183e6d82b854f72ffad
2013-05-09 17:00:46 -07:00
Mathias Agopian
1f5762e646 libutils clean-up
Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
2013-05-07 17:09:46 -07:00