diff options
| author | 2014-05-22 15:43:54 -0700 | |
|---|---|---|
| committer | 2014-05-23 12:56:38 -0700 | |
| commit | a5dda645da738da7b4ae15e28fa7d93d3b04b94f (patch) | |
| tree | 5ce51af907c91030662b69c37e8ece7a63e041ed /libs/hwui/TreeInfo.h | |
| parent | d30241541c3adcb126bb263ad8596e7902a6b5ae (diff) | |
Bag of scheduling tweaks
Bug: 15118640
* Prevent over-stuffing the queue by dropping frames
* Prevent double-drawing in one pulse by RT by deferring
vsync registration until post-draw so that it catches
the next vsync pulse instead of the current one
* Bias vsync race condition towards the UI thread
* Fix queueDelay to actually work
Change-Id: Ibf584258bd93ebcbba058bd976dc8b307f1c6155
Diffstat (limited to 'libs/hwui/TreeInfo.h')
| -rw-r--r-- | libs/hwui/TreeInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/TreeInfo.h b/libs/hwui/TreeInfo.h index d4a23b878390..8355f83ea37c 100644 --- a/libs/hwui/TreeInfo.h +++ b/libs/hwui/TreeInfo.h @@ -52,6 +52,7 @@ struct TreeInfo { : hasFunctors(false) , hasAnimations(false) , requiresUiRedraw(false) + , canDrawThisFrame(true) {} bool hasFunctors; // This is only updated if evaluateAnimations is true @@ -60,6 +61,13 @@ struct TreeInfo { // animate itself, such as if hasFunctors is true // This is only set if hasAnimations is true bool requiresUiRedraw; + // This is set to true if draw() can be called this frame + // false means that we must delay until the next vsync pulse as frame + // production is outrunning consumption + // NOTE that if this is false CanvasContext will set either requiresUiRedraw + // *OR* will post itself for the next vsync automatically, use this + // only to avoid calling draw() + bool canDrawThisFrame; } out; // TODO: Damage calculations |