am 07efb030
: Merge "Defer process mode upon draw" into jb-mr1.1-dev
* commit '07efb0303ff031512b7c38c6e7e9c2fcdb5849c0': Defer process mode upon draw
This commit is contained in:
@ -1304,17 +1304,11 @@ public abstract class HardwareRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status & DisplayList.STATUS_INVOKE) != 0) {
|
if ((status & DisplayList.STATUS_INVOKE) != 0 ||
|
||||||
scheduleFunctors(attachInfo, true);
|
attachInfo.mHandler.hasCallbacks(mFunctorsRunnable)) {
|
||||||
}
|
attachInfo.mHandler.removeCallbacks(mFunctorsRunnable);
|
||||||
}
|
|
||||||
|
|
||||||
private void scheduleFunctors(View.AttachInfo attachInfo, boolean delayed) {
|
|
||||||
mFunctorsRunnable.attachInfo = attachInfo;
|
mFunctorsRunnable.attachInfo = attachInfo;
|
||||||
if (!attachInfo.mHandler.hasCallbacks(mFunctorsRunnable)) {
|
attachInfo.mHandler.postDelayed(mFunctorsRunnable, FUNCTOR_PROCESS_DELAY);
|
||||||
// delay the functor callback by a few ms so it isn't polled constantly
|
|
||||||
attachInfo.mHandler.postDelayed(mFunctorsRunnable,
|
|
||||||
delayed ? FUNCTOR_PROCESS_DELAY : 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1329,7 +1323,9 @@ public abstract class HardwareRenderer {
|
|||||||
boolean attachFunctor(View.AttachInfo attachInfo, int functor) {
|
boolean attachFunctor(View.AttachInfo attachInfo, int functor) {
|
||||||
if (mCanvas != null) {
|
if (mCanvas != null) {
|
||||||
mCanvas.attachFunctor(functor);
|
mCanvas.attachFunctor(functor);
|
||||||
scheduleFunctors(attachInfo, false);
|
mFunctorsRunnable.attachInfo = attachInfo;
|
||||||
|
attachInfo.mHandler.removeCallbacks(mFunctorsRunnable);
|
||||||
|
attachInfo.mHandler.postDelayed(mFunctorsRunnable, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user