6595 Commits

Author SHA1 Message Date
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
Derek Sollenberger
dbf22ccd92 Merge "Update HWUI to store its own SkBitmap objects" 2015-01-14 15:06:27 +00:00
Elliott Hughes
c2b7abdbb2 am 1e147221: am d6c475dc: am 595ae39f: Merge "Use more intention-revealing tests for S_ISLNK and S_ISSOCK."
* commit '1e14722167210e176cc1f6e702f1a7a98271c6d2':
  Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
2015-01-13 20:32:52 +00: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
Derek Sollenberger
3d4eed7f1a Update HWUI to store its own SkBitmap objects
This enables us to...

1) simplify the lifecycle/ownership between Java and HWUI
2) remove DisplayListRenderer::drawBitmapData and associated logic
3) track pixel lifecycle using standard SkPixelRef refcounting
4) Remove uncessary calls to ref/unref the bitmap's pixels and colorTable

Change-Id: I3c95078da20995444f6388a029414280fd654318
2015-01-09 13:56:56 -05:00
John Reck
25bd5d6b04 Merge "Replace sleep() hack with vsync listening" 2015-01-08 19:15:31 +00:00
John Reck
84e390cc90 Replace sleep() hack with vsync listening
Change-Id: I4eb744d9a5abe40cf4f8bbaafa03e59b7360608a
2015-01-06 13:50:43 -08:00
Mike Reed
71487eb0ce Merge frameworks/base changes from master-skia to master.
Adaptations to changes in Skia upstream since Oct 2014.
(https://code.google.com/p/skia/issues/detail?id=2377)

cbb922d use new roundOut signature
77082de Call SkColorTable::readColors().
5456ab1 Handle the result of SkMatrix::asAffine.
25cfc78 Remove dependence on SK_LEGACY_PICTURE_SIZE_API.

BUG:18468293

Change-Id: I5a4d274e854298843891410b1ffd5e24f038b88a
2015-01-06 21:41:35 +00:00
Chris Craik
d41c4d8c73 Add overrides and switch to nullptr keyword for all files
Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.

Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
2015-01-05 16:49:13 -08:00
Tom Hudson
8dfaa49042 Make DisplayListRenderer inherit from Canvas, merge JNI
Incrementally unify the upper layers for Skia and HWUI.
Remove redundant code from GLES20Canvas.java; instead
use inherited mNativeCanvasWrapper and superclass method
definitions.

Moves some unrelated SkPaint utility functions from Renderer
to new utils/PaintUtils.

bug: 15672762
Change-Id: I4ddd4214b8e9eeb95289d054ef423f2542bb5fa5
2015-01-05 15:25:41 -08:00
Chris Craik
51d6a3db97 Cleanup various clang warnings, use unique_ptrs in several places
Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
2014-12-23 16:53:56 -08:00
Chris Craik
e84a208317 Add overrides and switch to nullptr keyword
Changes generated with clang-modernize.

Additionally, fixed some struct-vs-class usage to make clang happy.

Change-Id: Ic6ef2427401ff1e794d26f21f7b44868fc75fb72
2014-12-22 14:56:08 -08:00
Chris Craik
07adacf499 Cleanup
Change-Id: I91ffb9c66697741116fdeaa31abdf6cfd79155df
2014-12-22 11:20:57 -08:00
John Reck
a285e9ed82 am 165fb8f5: am f89dac47: Merge "Tweak RT-animator scheduling" into lmp-mr1-dev
automerge: ed3c296

* commit 'ed3c2962be1e2966c3b46f20e81d2902a8302d8b':
  Tweak RT-animator scheduling
2014-12-19 23:22:58 +00: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
John Reck
a2732a2bf9 Stop pretending USE_OPENGL_RENDERER is a thing
Change-Id: I732b490431fe90eafa00a00f3b5429f0d3a067e6
2014-12-18 14:12:27 -08:00
John Reck
35cf58ab28 Split hwui's makefile
Change-Id: I7ad1a692e708cad052e8ca5b412c17e25992862c
2014-12-18 13:14:40 -08:00
Chris Craik
a5f0918ec1 resolved conflicts for merge of fd461ede to master
Change-Id: I36f263c7e6d96355dd8a2c3565581b9a983ae481
2014-12-17 15:11:30 -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
30839ce439 am ec9b598c: am b9a4d15d: Merge "Force-flush state sync on texid change" into lmp-mr1-dev automerge: b21a7ad
* commit 'ec9b598c7be65abb5ceb9d82e752c50f7e93deab':
  Force-flush state sync on texid change
2014-12-12 04:34:55 +00:00
Chris Craik
a1c3fdfbc7 am 3f454e7d: am 63c7b246: Merge "Correct layer size formatting in trace" into lmp-mr1-dev automerge: 00905a9
* commit '3f454e7d1cf7103e312f67f745f01f00fa49df13':
  Correct layer size formatting in trace
2014-12-12 04:30:44 +00: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
Yohann Roussel
59cf734f9e resolved conflicts for merge of d67bb501 to master
Change-Id: I40698ce1e382cb41eec7af5ea49ac0e2f997d555
2014-12-11 11:10:50 +01:00
Adam Lesinski
a76db13fb0 am 347040cf: am 740acf21: am c7801877: Merge "Fix issue where non-resource attributes would cause obtainStyleAttributes to fail" into lmp-mr1-dev
* commit '347040cf84401601b0d5cbb1d76e4648d1c8a461':
  Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
2014-12-11 01:38:33 +00: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
Chris Craik
e2831a181f resolved conflicts for merge of 5369b769 to master
Change-Id: Iccb2ce948321534e05d67e64dc40a38332adb1a7
2014-12-10 17:05:43 -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
Nick Kralevich
7668e78601 resolved conflicts for merge of 3bae94d7 to master
Change-Id: I381539b1494447d62290c492f2550840fe0b559c
2014-12-10 11:03:40 -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
Derek Sollenberger
8386aee175 am 1f78b336: am 497499b1: am 04c2bf4f: Merge "Remove unnecessary/erroneous reference counting" into lmp-mr1-dev
* commit '1f78b3364f0e39db912d898187bed0195d9319cd':
  Remove unnecessary/erroneous reference counting
2014-12-09 23:49:27 +00: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
Derek Sollenberger
1f78b3364f am 497499b1: am 04c2bf4f: Merge "Remove unnecessary/erroneous reference counting" into lmp-mr1-dev
* commit '497499b1eb76726090ea46dcfc5b8ab0221cd447':
  Remove unnecessary/erroneous reference counting
2014-12-09 22:18:33 +00:00