6150 Commits

Author SHA1 Message Date
Dan Albert
571c5a26f7 Merge "Fix UB in ResourceTable::stringToInt." 2015-04-14 23:25:27 +00:00
John Reck
a08f6a66e9 Merge "Fix GL_INVALID_OPERATION in font renderer when font cache is limited." 2015-04-10 15:32:01 +00:00
John Reck
d56e087b55 Merge "Fixing memory leak in RenderBufferCache" 2015-04-10 15:27:02 +00:00
Dan Albert
1b4f316651 Fix UB in ResourceTable::stringToInt.
Was here because UBsan found integer overflow in the parsing for hex
numbers, since hex numbers here are actually unsigned but assigned to
a signed integer.

Also fixes a number of missing error conditions.

Change-Id: Iaea576daedfc6c75521cde02de3fe9dd0198a3b7
2015-04-08 14:12:21 -07:00
Chris Craik
82f6b16e10 Merge "hwui : fix memory leak due to duplicate in shadow cache" 2015-03-25 16:15:12 +00:00
youngmin0822.lee
c80c9ad188 Don't create unnecessary RenderThread's instance when executing 'dumpsys gfxinfo'
To obtain the gfxinfo for each process, the static method of RenderProxy is used, which is named outputLogBuffer().
In there,
1. RenderTask is created for getting DisplayList Commands in RenderNode.
2. staticPostAndWait() is called
3. RenderThread's instance is created by 'RenderThread::getInstance()' in staticPostAndWait()

In case of the service, they don't use HW Acceleration, so don't need RenderThread.
But, by the process of No.3, RenderThread is created for all process.
As we know, RenderThread never be destroyed while the process is alive.
This patch checks RenderThread instance before the creation of RenderTask.
And, there is no one, just return to prevent the unnecessay creation of it.

Change-Id: I4fe29d83c9ced3e8b67177c0874c5d8ee62e1870
2015-03-20 21:22:32 +09:00
Mykola Kondratenko
b159633aa3 hwui : fix memory leak due to duplicate in shadow cache
New ShadowTask with the ShadowDescription key that already
exists in the shadow LruCache will leak as it is not being
added.

Fix adds check for the existing key that is common in the hwui
code but missing for the TessellationCache::precacheShadow
function.

Change-Id: I37fd5ec82f8b8da5d1ec0f2ab9fd04c5f8534367
2015-03-17 08:57:41 +01:00
Narayan Kamath
76507a64b5 am 72dc62ea: Merge "Track removal of refcounts from FileMap."
* commit '72dc62ead214bdec5c46d42f4e859b139dba0a00':
  Track removal of refcounts from FileMap.
2015-02-24 12:56:52 +00:00
Narayan Kamath
688ff4cf0f Track removal of refcounts from FileMap.
Use delete instead of release.

Change-Id: I25c841b368aa9d51e9259399b94cafa2bbb7a076
2015-02-23 15:47:54 +00:00
John Reck
c7e6b93aba am af6eaf65: Merge "Fix ANR caused by hwuiTask thread" automerge: 5ad36d4
* commit 'af6eaf656ec0de5fcbea03968daffe2c845e2089':
  Fix ANR caused by hwuiTask thread
2015-02-04 22:08:27 +00:00
John Reck
5ad36d4591 Merge "Fix ANR caused by hwuiTask thread" 2015-02-04 21:53:48 +00:00
John Reck
fe5ac4fc31 am 5f3e21ce: am 6efc3ac6: Merge "Allow ~Layer() to happen after onGLContextDestroyed" into lmp-mr1-dev
* commit '5f3e21cebeecf042e8e18a5021b3965415d9ff60':
  Allow ~Layer() to happen after onGLContextDestroyed
2015-01-29 20:28:08 +00:00
John Reck
57998017ff Allow ~Layer() to happen after onGLContextDestroyed
Bug: 19146354
Change-Id: I9e885936168bd541bfbed4064ad67ab524f58e32
2015-01-29 10:17:57 -08:00
Yabin Cui
3a10a672f0 am f7049289: am 3812e68e: Merge "kill HAVE_PTHREADS."
* commit 'f70492898b3efa3c5f480f195062fa6f293bc764':
  kill HAVE_PTHREADS.
2015-01-27 07:04:55 +00:00
Yabin Cui
1610486d37 kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: Ib466949bb6cd6d1bbc4680e989f0f9fae62ca564
2015-01-26 22:32:38 -08:00
Adam Lesinski
d9bd08864e am aee7225e: Merge "Process base APK" into lmp-mr1-dev
automerge: 554a6f5

* commit '554a6f5278ec05077d8252249afc911897fbfe76':
  Process base APK
2015-01-20 21:55:12 +00:00
Adam Lesinski
42eea270a0 Process base APK
The base APK may have resources with configurations that compete
against some splits. The base APK must be involved in the selection
of splits.

Bug:18982001
Change-Id: Ieb29b5a36cf2c68e7831484d98a9fd275acd97e8
2015-01-16 14:11:30 -08:00
Chris Craik
a2e1630b1e am 996d3974: am ed35f5c7: Merge "Fast loadInverse() implementation for the common case"
* commit '996d39743a73cc37fb888779d52323743f50c666':
  Fast loadInverse() implementation for the common case
2015-01-16 18:07:23 +00:00
Romain Guy
e4998e1ea9 Fast loadInverse() implementation for the common case
Most matrices used by the UI toolkit are translation matrices, whose
inverses can be quickly computed by using the negated translation
vector.

Change-Id: I54a28a634a586085779bfc26f3a4160cd5ab2b22
2015-01-15 16:49:18 -08:00
Brian Carlstrom
5baa164aec Restore write_delete_file
Change-Id: Id93a59ae6c82f6068c58b22e2a651ff8a3b8f530
2015-01-14 18:19:54 -08:00
John Reck
cefeb34e48 am 2c9f86aa: am 53af1cd3: Merge "Vsyncs are hard" into lmp-mr1-dev
* commit '2c9f86aa21b8d7ea6a77eaca9a49ccdb31245129':
  Vsyncs are hard
2015-01-15 01:39:50 +00:00
Christopher Tate
49138184de am 9568307c: am 43a4a8c7: Fix redundant file backups
* commit '9568307cf32c8abc6703dc7a1b0b0fee56c4f8f5':
  Fix redundant file backups
2015-01-15 01:39:29 +00:00
John Reck
53af1cd393 Merge "Vsyncs are hard" into lmp-mr1-dev 2015-01-15 01:08:57 +00:00
Christopher Tate
43a4a8c777 Fix redundant file backups
We'd observed a bug in which an unchanged file was nevertheless
being redundantly transmitted for backup on every backup pass.
The underlying issue turns out to have been the FileBackupHelper
base implementation's logic for diffing the prior-state file
set against the current state, in the case when there had been
deletions of prior files.  In addition, there was also a
parallel bug in which file checksums were not calculated
properly in some cases, leading to at least one additional
redundant backup of the file in question.

Bug 18694053

Change-Id: Ie0dec06486b5fef4624561737019569c85d6b2a0
2015-01-14 16:36:30 -08:00
John Reck
a22c9b2cd1 Vsyncs are hard
Bug: 18866485
Change-Id: I7d304df0f20a3296956cb6887a72adba9243f117
2015-01-14 10:40:15 -08:00
Elliott Hughes
1e14722167 am d6c475dc: am 595ae39f: Merge "Use more intention-revealing tests for S_ISLNK and S_ISSOCK."
* commit 'd6c475dc246b1681f5c9af9e00ac74183812329c':
  Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
2015-01-13 01:32:37 +00:00
Elliott Hughes
1bf2481233 Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
Change-Id: Ia7f13eb7d5a36cf2b4c0a253b2b4d7f7af396951
2015-01-12 14:33:04 -08:00
Sangkyu Lee
c3c58e015f Fix ANR caused by hwuiTask thread
If hwuiTask thread is exited while HWUI renders something,
some tasks can remain unfinished forever.
This can make ANR problem if RenderThread waits this kind of tasks.

According to the current implementation, hwuiTask threads are
exited when HWUI receives trimMemory() callback with level >= 20
and some applications such as SystemUI can receive trimMemory()
with level >= 20 even though they renders something yet.
(For instance, when RecentsActivity in SystemUI is finished,
HWUI receives trimMemory() callback with level >= 20
but SystemUI should still render the status bar and navigation bar.)

This patch prevents the tasks from remaining unfinished and
make the tasks executed immediately if they cannot be added
to their TaskProcessors.

Change-Id: I5bd26439aa5f183b1a7c1ce466362e27554b4d16
2015-01-12 13:10:52 +09:00
John Reck
ed3c2962be am 165fb8f5: am f89dac47: Merge "Tweak RT-animator scheduling" into lmp-mr1-dev
* commit '165fb8f5aa0709a8dc35f99a9b81f6906452a648':
  Tweak RT-animator scheduling
2014-12-19 23:21:44 +00:00
John Reck
a733f89c05 Tweak RT-animator scheduling
Bug: 18226391

The issue occurs as a result of a dispatchFrame itself
taking longer than 12ms, the alloted budget. The result
is that a vsync request (which occured at the end) would
miss the vsync that occured 1ms prior to the end of the frame.
As a result it would end up waiting for the following vsync,
essentially dropping to 30fps even though 60 could have been
sustained.

Fix this with a few tweaks.
First, adjust the UI thread's delay bias from (now + 4ms) to
(vsync + 4ms), this prevents RT animators from slowly drifting
if the vsync occurs mid-task.
Second, request a vsync preemptively prior to running callbacks.
This way if any callbacks needs the next vsync and it takes
"too long", we will catch that vsync.
Finally, fix an issue where the display event queue was always
drained & rejected at the end of a task loop. Instead, drain
and reject all stale vsyncs. This still prevents the issue of
both UI thread & RT thread trying to drive 2 frames in a single
pulse, but also allows RT to notice that it missed a vsync
pulse it needed and that it should speed-up a bit in response

Change-Id: I9d6be037737e9283297898cac2e3563453e797cd
2014-12-19 11:37:21 -08:00
Chris Craik
fd461edee0 am 93492d1a: am c748832f: Merge "Revert overdraw avoidance visualization change" into lmp-mr1-dev
* commit '93492d1a478770783abab764855c8d47e0264f71':
  Revert overdraw avoidance visualization change
2014-12-17 22:17:21 +00:00
Chris Craik
c748832f75 Merge "Revert overdraw avoidance visualization change" into lmp-mr1-dev 2014-12-17 22:07:04 +00:00
Chris Craik
ef8d6f272a Revert overdraw avoidance visualization change
bug:18787324

Partial revert of 23d307c8d88f4a3849163b9e5b7cd11d0d4f372c.

Change-Id: Ic8b91b046707fc5b8fa53c35ea7b37bb19c3c943
2014-12-17 11:21:02 -08:00
John Reck
f088c349df Fix style
Change-Id: I7227b0eac126bf470ed50249a7809b845872983b
2014-12-12 09:49:29 -08:00
John Reck
ec9b598c7b am b9a4d15d: Merge "Force-flush state sync on texid change" into lmp-mr1-dev
automerge: b21a7ad

* commit 'b21a7ad02e43900ea5480e796cb1518bd5829e3f':
  Force-flush state sync on texid change
2014-12-12 04:27:14 +00:00
Chris Craik
3f454e7d1c am 63c7b246: Merge "Correct layer size formatting in trace" into lmp-mr1-dev
automerge: 00905a9

* commit '00905a984c07ffc9960ce83548631c59aae37ec6':
  Correct layer size formatting in trace
2014-12-12 04:25:43 +00:00
John Reck
b9a4d15d09 Merge "Force-flush state sync on texid change" into lmp-mr1-dev 2014-12-11 22:44:19 +00:00
Chris Craik
63c7b24645 Merge "Correct layer size formatting in trace" into lmp-mr1-dev 2014-12-11 22:43:18 +00:00
Chris Craik
c2379070a4 Correct layer size formatting in trace
bug:18722704
Change-Id: Icef9aaa62633b2d86ad250f43d4c8fa5cc0b6842
2014-12-11 14:29:51 -08:00
John Reck
9a7fe1a034 Force-flush state sync on texid change
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
2014-12-11 14:27:39 -08:00
John Reck
d67bb5015f am eb2dcc79: Merge "Don\'t preload textures for AssetAtlas" into lmp-mr1-dev
automerge: e4a6ed9

* commit 'e4a6ed9d6d8721c9fad018b0d43dfe7daf4b24e7':
  Don't preload textures for AssetAtlas
2014-12-11 01:25:54 +00:00
John Reck
eb2dcc791e Merge "Don't preload textures for AssetAtlas" into lmp-mr1-dev 2014-12-11 01:12:31 +00:00
John Reck
ebd52610cf Don't preload textures for AssetAtlas
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
2014-12-10 17:07:41 -08:00
Adam Lesinski
347040cf84 am 740acf21: am c7801877: Merge "Fix issue where non-resource attributes would cause obtainStyleAttributes to fail" into lmp-mr1-dev
* commit '740acf213c56c406132294790fa2fadd0380cfa7':
  Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
2014-12-11 00:07:02 +00:00
Chris Craik
5369b76963 resolve merge conflicts of ed211b9 to lmp-mr1-dev-plus-aosp.
Change-Id: Ib9d6d301282bbaae6b23b9ce07b9e6a4e9075991
2014-12-10 15:23:54 -08:00
Adam Lesinski
c780187745 Merge "Fix issue where non-resource attributes would cause obtainStyleAttributes to fail" into lmp-mr1-dev 2014-12-10 21:12:04 +00:00
Chris Craik
4ac36f80be Fix frame-allocated path lifecycles
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
2014-12-10 12:27:08 -08:00
Adam Lesinski
5dce5e67db Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
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
2014-12-10 10:51:48 -08:00
John Reck
3bae94d78e resolved conflicts for merge of fe11126d to lmp-mr1-dev-plus-aosp
Change-Id: I60bf82ff71d9af0d80e7da8856efb4641c85885b
2014-12-09 15:38:38 -08:00
John Reck
4f1942d999 Merge "Teach AssetAtlas about more drawables" into lmp-mr1-dev 2014-12-09 23:12:42 +00:00