2240 Commits

Author SHA1 Message Date
John Reck
49dec430e8 Move updateMatrix() call to animateCommon
Bug: 22667315

HWUI internally always assumes that RenderNode->properties()
has a fully-baked matrix. However, RenderThread animations violate
this and will perform an update of that matrix after they run. This
was missing in the fallback scenario where an animation was
running on a View that is detached from the tree.

If a RenderThread animation is started on an attached view, it becomes
detached, and is then re-attached it will crash in the staging
properties push. The fix for this is to move the call to updateMatrix
from animate() to animateCommon() so that the animateNoDamage()
path will similarly perform the necessary matrix update.

Change-Id: I4c899a6f68659342a6515f1d7f20d3c4af65caf0
2015-07-23 22:37:21 +00:00
John Reck
e5783e58db am 2abf0f24: Fix a race condition that could cause lockup
* commit '2abf0f24af60b8644d5b61eed9666793083546ee':
  Fix a race condition that could cause lockup
2015-07-23 19:20:47 +00:00
John Reck
2abf0f24af Fix a race condition that could cause lockup
Bug: 22676664

If a task is queued on a worker thread that is busy
processing a task AND a trim memory signal comes along
prior to the initial task being completed then the
tasks that were queued prior to the exit request will
never be processed.

This is bad, as when those futures are used later on, such
as in trying to delete them from the cache, they will block
waiting for the orphaned task to be finished.

Simple fix is to just never stop the worker threads. Increase
RAM usage slightly as we won't reclaim that stack space, but
this cost is fairly small

Change-Id: I818b011f9bc6ba06942fdad81c27656bd97b42d4
2015-07-23 17:34:14 +00:00
John Reck
c052a9a1bb am a2fd3234: am 3bfe4b47: am 1cd5afc1: am 9317d0b9: am 1fddd3ef: Merge "Mark isInUse per-window" into mnc-dev
* commit 'a2fd32348b06b22963fcc7c33179fddbd2394dbf':
  Mark isInUse per-window
2015-07-21 22:00:50 +00:00
John Reck
9317d0b990 am 1fddd3ef: Merge "Mark isInUse per-window" into mnc-dev
* commit '1fddd3efa9ac10e794d7bdf457b7b52c7e4614f7':
  Mark isInUse per-window
2015-07-21 21:04:45 +00:00
John Reck
00e79c9947 Mark isInUse per-window
Bug: 22509159
Change-Id: I0ae0f1fa582ee38dcb9f24ca20f0b4d0c57ccb32
2015-07-21 10:46:54 -07:00
Chris Craik
011550e1f2 am 3699c603: am 62a2696c: am fbd2d949: am b6e41a08: am 0bb5c26b: Merge "Fix AssetAtlas usage in BitmapShaders" into mnc-dev
* commit '3699c60323aca45eb0e385d6b4a27bd5861fadf2':
  Fix AssetAtlas usage in BitmapShaders
2015-07-18 01:05:25 +00:00
Chris Craik
b6e41a0882 am 0bb5c26b: Merge "Fix AssetAtlas usage in BitmapShaders" into mnc-dev
* commit '0bb5c26bcea4b171583e57134b9717c77fbdcb14':
  Fix AssetAtlas usage in BitmapShaders
2015-07-18 00:07:13 +00:00
Chris Craik
0bb5c26bce Merge "Fix AssetAtlas usage in BitmapShaders" into mnc-dev 2015-07-17 23:59:17 +00:00
Chris Craik
6ad690e16f Fix AssetAtlas usage in BitmapShaders
bug:22521999

Change-Id: I60859748ceee19ebc89ec98845e550ea26e36ecd
2015-07-17 15:53:24 -07:00
Chris Craik
86c96504be am 8f587bfb: am 4c935068: am 41b43d7c: am 7b0fa466: am 0f724601: Merge "Fix clip area behavior for REPLACE op" into mnc-dev
* commit '8f587bfb05c0db2d48692c9701ac2d97e43acdc1':
  Fix clip area behavior for REPLACE op
2015-07-16 23:20:39 +00:00
Chris Craik
7b0fa466b5 am 0f724601: Merge "Fix clip area behavior for REPLACE op" into mnc-dev
* commit '0f724601d78d8f36a297333227d9c460e10b3203':
  Fix clip area behavior for REPLACE op
2015-07-16 22:23:34 +00:00
Chris Craik
8ce8f3f4d6 Fix clip area behavior for REPLACE op
bug:22291400

Work around clippath-clipped-to-view-bounds behavior by
implementing REPLACE op fast path, avoiding the transition to
SkRegion/SkPath.

Change-Id: I63c1cf961db2d6e3759d83914de1036c9ac7497a
2015-07-16 13:31:41 -07:00
Chris Craik
1d5d34624b Merge "Clean up unncessary defines" 2015-07-16 20:11:05 +00:00
John Reck
7f9c7b7694 am be7e2a47: am 599287b1: am b4d49a4d: am d5612d06: am ba4f0757: Merge "Don\'t crash on makeCurrent fail" into mnc-dev
* commit 'be7e2a476fd8f3e25710a96a391a2d9ca2ddad99':
  Don't crash on makeCurrent fail
2015-07-16 19:20:46 +00:00
John Reck
d5612d06c4 am ba4f0757: Merge "Don\'t crash on makeCurrent fail" into mnc-dev
* commit 'ba4f0757779d6e91e52ebee0fd4c847b673a69e2':
  Don't crash on makeCurrent fail
2015-07-16 17:01:22 +00:00
John Reck
f2dcc2aecb Don't crash on makeCurrent fail
Bug: 22444755

WindowManager may decide to yank the surface at any point, so
attempt to kinda handle this

Change-Id: Id2f665d2f0f93bccd4ec977fbf52dca4dc1ec891
2015-07-16 09:17:59 -07:00
Chris Craik
5a4690bf26 Clean up unncessary defines
LOG_TAG and TRACE_TAG are already defined in the makefile

Change-Id: I9e53e3dacbe018441edd74cb7c8c90846defee74
2015-07-14 13:25:38 -07:00
Chris Craik
401415d35e am cd843caa: am 230d8243: am 9f43ac77: am e2a5c184: am 941bcedb: Merge "Fix unsafety in SkiaShader storage, and texture unit accounting" into mnc-dev
* commit 'cd843caa3704a14d02a2b8df6e72be8a2f53049c':
  Fix unsafety in SkiaShader storage, and texture unit accounting
2015-07-14 18:47:39 +00:00
Chris Craik
e2a5c184e3 am 941bcedb: Merge "Fix unsafety in SkiaShader storage, and texture unit accounting" into mnc-dev
* commit '941bcedb4c03832cd54225217697c7b8cba6e07c':
  Fix unsafety in SkiaShader storage, and texture unit accounting
2015-07-14 17:35:50 +00:00
Chris Craik
e310f83d59 Fix unsafety in SkiaShader storage, and texture unit accounting
bug:22390304

Fixes two issues:

1) The max texture unit wasn't large enough to handle the most complex
ComposeShader case (1 for draw primitive, 2 for gradient shader, 1 for
bitmap shader).

2) If a shader isn't supported by SkiaShader::store, the shader data
needs to be explicitly disabled, so we won't read uninitilized data
from it when trying to read shader information out.

Change-Id: I29ee7b7c1e07f67db88c1707bdc857daa305e713
2015-07-13 13:34:07 -07:00
Derek Sollenberger
876d56612a Support High Contrast Text for all canvas types
Change-Id: Ib46ba3d7c67e081872e6a4b11d294fe9a61f5bbd
2015-07-13 15:13:15 -04:00
Derek Sollenberger
94394b3fb0 Move drawRegion from DisplayList to Canvas
Change-Id: I9f401dc5b24732938ac2ca7ed829796e2d7ef3e8
2015-07-13 13:48:08 -04:00
Derek Sollenberger
cc882b6518 Remove unused functions and variables from DisplayListCanvas
This also moves some functions that are only called when creating/completing
a displayList into the appropriate constructors and endRecording calls.

Change-Id: I9f6add156d7f476a52766934af713b0f852c8dea
2015-07-10 19:32:30 +00:00
Tom Hudson
0f6cb32c75 am a5e2946f: am b9d7bba5: am 434b577f: am 8ac76504: am 9613e9b7: Merge "New setLocalMatrix() operation for HWUI" into mnc-dev
* commit 'a5e2946f5ab7618997fb317ad9f5f56c160ebee5':
  New setLocalMatrix() operation for HWUI
2015-07-10 13:35:27 +00:00
Tom Hudson
8ac76504fe am 9613e9b7: Merge "New setLocalMatrix() operation for HWUI" into mnc-dev
* commit '9613e9b76410b15b7f2700080a17476bf9f3461c':
  New setLocalMatrix() operation for HWUI
2015-07-10 12:46:24 +00:00
Tom Hudson
9613e9b764 Merge "New setLocalMatrix() operation for HWUI" into mnc-dev 2015-07-10 12:35:12 +00:00
Tom Hudson
ac7b6d33d2 New setLocalMatrix() operation for HWUI
Concats any matrix passed through from DisplayListCanvas with the
initialTransform of the containing RenderNode.

BUG:22189925

Change-Id: I5ea54a6e2a29520c79a8860bde7682694e8595d2
2015-07-09 16:15:31 -04:00
John Reck
a25ecac971 am ea103a9f: am 0ea996cf: am 62a65071: am dcf8837d: Merge "Restrict number of hwuiTask threads" into mnc-dr-dev
* commit 'ea103a9f7fb94b2d6cd290df648e50417a0c1c76':
  Restrict number of hwuiTask threads
2015-07-08 16:32:59 +00:00
John Reck
dcf8837d49 Merge "Restrict number of hwuiTask threads" into mnc-dr-dev 2015-07-08 15:40:44 +00:00
Chris Craik
43b42d8bdb am 41e4d8b3: am 0c218e43: am 9ca926ad: am fdb87b76: am 127b478a: Merge "Remove all usage of fmin and fmax" into mnc-dev
* commit '41e4d8b3ed044ed724bc340b77d3f9ca60105407':
  Remove all usage of fmin and fmax
2015-07-08 03:15:47 +00:00
Chris Craik
127b478ac6 Merge "Remove all usage of fmin and fmax" into mnc-dev 2015-07-08 01:53:57 +00:00
Chris Craik
e6a15ee3d0 Remove all usage of fmin and fmax
bug:22208220

Removes needless call, and upconversion to doubles in multiple places.

Change-Id: I1b949fa5f206446ac34de800154c0147d6bd8034
2015-07-07 18:42:42 -07:00
John Reck
c452654a45 Restrict number of hwuiTask threads
Bug: 22324907
Change-Id: I0013557ede15949a5bd6f3f75bc5dd023a9f945b
2015-07-07 16:19:57 -07:00
Chris Craik
4a067fb999 am 9d080ff6: am ab614e54: am 30eaf590: am df134e87: am 54d1f043: Merge "Simplify matrix copy constructor/load" into mnc-dev
* commit '9d080ff64162da9772974400c53566659ab28eec':
  Simplify matrix copy constructor/load
2015-07-07 20:38:06 +00:00
Chris Craik
54d1f0439e Merge "Simplify matrix copy constructor/load" into mnc-dev 2015-07-07 19:09:43 +00:00
John Reck
d67db081a3 am 7772b03d: am 6ac3b54d: am 8e5d4761: am dfbae1f9: am 15b64099: Merge "Adjust for pipeline stalls" into mnc-dev
* commit '7772b03d5e3a8bce01cac511197afc52c9e56f5f':
  Adjust for pipeline stalls
2015-07-07 19:08:46 +00:00
Chris Craik
d2bfcc74fc Simplify matrix copy constructor/load
bug:22208220

Change-Id: Id096eb8de8da0dd1687d6af9456b16ce2a1a589b
2015-07-07 10:09:35 -07:00
John Reck
be3fba05e8 Adjust for pipeline stalls
Bug: 20853441

Calculating duration that crosses the UI-RT
sync point will now subtract out the time spent waiting
in queue under the assumption that this time will be
accounted for in the previous frame's metrics

Change-Id: Ia8213f4410638840613f5ae439e98dfb77532a6a
2015-07-06 16:12:46 -07:00
John Reck
6b6ba748f0 am e463f28e: am 1826da24: am f70a5a78: Merge "Set go-faster arguments" into mnc-dev
* commit 'e463f28eae88d0433a7bb41f5534b86000578900':
  Set go-faster arguments
2015-07-04 07:28:02 +00:00
John Reck
0606a04136 am 91d01e5d: am 0cec5293: am d7580333: Merge "Use std::sort instead of quickSortX" into mnc-dev
* commit '91d01e5d8b9a50ad04f0d0b5d6e35885f5d878a3':
  Use std::sort instead of quickSortX
2015-07-04 07:26:47 +00:00
Chris Craik
7b293b5556 am c3988e0a: am b4c02e8f: am d3ecb3e6: Merge "Switch from fminf/fmaxf to std::min/max" into mnc-dev
* commit 'c3988e0aa337b74693feb0abb898eb87fbb61b58':
  Switch from fminf/fmaxf to std::min/max
2015-07-03 20:35:50 +00:00
John Reck
f70a5a78bb Merge "Set go-faster arguments" into mnc-dev 2015-07-01 23:52:20 +00:00
John Reck
d758033368 Merge "Use std::sort instead of quickSortX" into mnc-dev 2015-07-01 20:55:23 +00:00
John Reck
5600d579b9 Set go-faster arguments
Bug: 22208220

Increases performance of shadows by yet another
15% by using more aggressive math optimizations

Change-Id: Ie3fabeae3647632a19ff573bf6b2d7f7a7cef555
2015-07-01 13:51:44 -07:00
Chris Craik
d3ecb3e6f0 Merge "Switch from fminf/fmaxf to std::min/max" into mnc-dev 2015-07-01 18:10:33 +00:00
John Reck
1e4209e387 Use std::sort instead of quickSortX
Bug: 22208220

Libcxx has a really good sort algorithm, use that
instead. This speeds up shadow tesellation by about 10%.

Also less code

Change-Id: Iaad424187121d7644076f94ba8a3cf4c110da2f2
2015-07-01 09:54:47 -07:00
Chris Craik
df72b63928 Switch from fminf/fmaxf to std::min/max
bug:22208220

Shows considerable improvement in performance, especially in tight
loops.

Change-Id: I4bcf6584a3c145bfc55e73c9c73dcf6199290b3c
2015-06-30 17:58:21 -07:00
Chris Craik
ba3964f48c am 6aa9b4ab: am cf225194: am a763bb83: Merge "Saturate alpha values when overlaying glyphs" into mnc-dev
* commit '6aa9b4abf335d7ecf5c33cc48b41f9f9f8cbd8ab':
  Saturate alpha values when overlaying glyphs
2015-06-30 21:54:52 +00:00
Chris Craik
de25a672b1 Saturate alpha values when overlaying glyphs
bug:19062769

Glyphs were stored to the output buffer with the assumption of
non-overlap, which is incorrect for certain fonts/strings. Instead,
blend src into dst, so new glyphs don't clobber existing content.

Change-Id: I6e22037500e67d5348ee2a43d939416c23c4d1ea
2015-06-30 13:24:18 -07:00