am 83fb64e8: Merge "If the surface is lost, release it" into lmp-mr1-dev
* commit '83fb64e8ec4c6bc0930f50b24bd1c36a81f6a1c2': If the surface is lost, release it
This commit is contained in:
@@ -340,6 +340,7 @@ public class ThreadedRenderer extends HardwareRenderer {
|
|||||||
recordDuration, view.getResources().getDisplayMetrics().density);
|
recordDuration, view.getResources().getDisplayMetrics().density);
|
||||||
if ((syncResult & SYNC_LOST_SURFACE_REWARD_IF_FOUND) != 0) {
|
if ((syncResult & SYNC_LOST_SURFACE_REWARD_IF_FOUND) != 0) {
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
|
attachInfo.mViewRootImpl.mSurface.release();
|
||||||
// Invalidate since we failed to draw. This should fetch a Surface
|
// Invalidate since we failed to draw. This should fetch a Surface
|
||||||
// if it is still needed or do nothing if we are no longer drawing
|
// if it is still needed or do nothing if we are no longer drawing
|
||||||
attachInfo.mViewRootImpl.invalidate();
|
attachInfo.mViewRootImpl.invalidate();
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
|
|
||||||
// These can be accessed by any thread, must be protected with a lock.
|
// These can be accessed by any thread, must be protected with a lock.
|
||||||
// Surface can never be reassigned or cleared (use Surface.clear()).
|
// Surface can never be reassigned or cleared (use Surface.clear()).
|
||||||
private final Surface mSurface = new Surface();
|
final Surface mSurface = new Surface();
|
||||||
|
|
||||||
boolean mAdded;
|
boolean mAdded;
|
||||||
boolean mAddedTouchMode;
|
boolean mAddedTouchMode;
|
||||||
|
|||||||
Reference in New Issue
Block a user