6283 Commits

Author SHA1 Message Date
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
John Reck
dad7d84c04 Teach AssetAtlas about more drawables
Bug: 18317479

Change-Id: I16868ee204d24af72af9a2efc987f7e9eb1d266b
2014-12-09 14:18:33 -08:00
Derek Sollenberger
ee648e517f Remove unnecessary/erroneous reference counting
The SkBitmap* used by HWUI holds a reference to the PixelRef (which
in turn holds the colorTable) so keeping an additional ref is not
only unnecessary, but also potentially problematic.

If a bitmap changes its pixelRef after it has been added to a displayList,
then we end up with unbalanced ref/unref calls that cause the newly added
PixelRef to be unref'd and prematurely deleted, while the original PixelRef
is leaked.

bug: 18659976
Change-Id: I34a06152e7bb2d733249a207dafd36b9b5dc0712
2014-12-09 18:36:42 +00:00
Adam Lesinski
7e74da3172 am e97908d3: Merge commit \'0953ab27\' into manualmerge
* commit 'e97908d32ee8ea80138d085260a0eac93841c722':
  AAPT: Move private attrs to new type for framework
2014-12-05 19:16:27 +00:00
Adam Lesinski
e97908d32e Merge commit '0953ab27' into manualmerge
Change-Id: I36dea45f7571096136ea7bda5e2680bd85a0df32
2014-12-05 11:06:21 -08:00
John Reck
9fb42f0778 resolved conflicts for merge of a75b0ad3 to master
Change-Id: I32a2d129c556407727ada909daa6470309d42499
2014-12-04 13:51:41 -08:00
John Reck
a75b0ad384 resolved conflicts for merge of a51a0901 to lmp-mr1-dev-plus-aosp
Change-Id: Id7df835f0bd3d5d276b162635ddfb7fe0918dfed
2014-12-04 13:41:04 -08:00
Adam Lesinski
720beef28d Merge "AAPT: Move private attrs to new type for framework" into lmp-mr1-dev 2014-12-04 18:24:41 +00:00
Adam Lesinski
63377406f7 am 8e5362f2: am 503071ae: am a2b5067a: Merge "RRO: prevent duplicate system overlays"
* commit '8e5362f20e2bc41b1dcf130a613b7e0b3cd1db58':
  RRO: prevent duplicate system overlays
2014-12-04 16:17:12 +00:00
Adam Lesinski
8e5362f20e am 503071ae: am a2b5067a: Merge "RRO: prevent duplicate system overlays"
* commit '503071ae41374a66f61e53e05a91243473db83b9':
  RRO: prevent duplicate system overlays
2014-12-04 09:21:45 +00:00
Adam Lesinski
9b624c186c AAPT: Move private attrs to new type for framework
Private attributes are typically placed after public
attributes in the resource table. Each time a new version
of the Android framework is released, new public attributes
take the place of the private attributes, and the private
attributes are shifted after the new public ones.

This means that any apps built against the newer SDK
may inadvertently be using private attributes on older
devices.

This change moves all private attributes to a completely
different type ID, so there will never be collisions across
versions.

These private attributes are automatically moved to a synthesized
type only for the system resources.

Bug:18263655

Change-Id: I7a850512953fadcc9f3524d509cea30249782db8
2014-12-03 15:59:20 -08:00