am bd15e4f5: Merge "Resume RT-animations after a pauseSurface" into lmp-mr1-dev
* commit 'bd15e4f59c0ac4386ad11ba1555e41cb32d3a52c': Resume RT-animations after a pauseSurface
This commit is contained in:
@@ -235,7 +235,7 @@ public abstract class HardwareRenderer {
|
||||
* or not the surface used by the HardwareRenderer will be changing. It
|
||||
* Suspends any rendering into the surface, but will not do any destruction
|
||||
*/
|
||||
abstract void pauseSurface(Surface surface);
|
||||
abstract boolean pauseSurface(Surface surface);
|
||||
|
||||
/**
|
||||
* Destroys all hardware rendering resources associated with the specified
|
||||
|
||||
@@ -155,8 +155,8 @@ public class ThreadedRenderer extends HardwareRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
void pauseSurface(Surface surface) {
|
||||
nPauseSurface(mNativeProxy, surface);
|
||||
boolean pauseSurface(Surface surface) {
|
||||
return nPauseSurface(mNativeProxy, surface);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -494,7 +494,7 @@ public class ThreadedRenderer extends HardwareRenderer {
|
||||
|
||||
private static native boolean nInitialize(long nativeProxy, Surface window);
|
||||
private static native void nUpdateSurface(long nativeProxy, Surface window);
|
||||
private static native void nPauseSurface(long nativeProxy, Surface window);
|
||||
private static native boolean nPauseSurface(long nativeProxy, Surface window);
|
||||
private static native void nSetup(long nativeProxy, int width, int height,
|
||||
float lightX, float lightY, float lightZ, float lightRadius,
|
||||
int ambientShadowAlpha, int spotShadowAlpha);
|
||||
|
||||
@@ -1493,7 +1493,11 @@ public final class ViewRootImpl implements ViewParent,
|
||||
// relayoutWindow may decide to destroy mSurface. As that decision
|
||||
// happens in WindowManager service, we need to be defensive here
|
||||
// and stop using the surface in case it gets destroyed.
|
||||
mAttachInfo.mHardwareRenderer.pauseSurface(mSurface);
|
||||
if (mAttachInfo.mHardwareRenderer.pauseSurface(mSurface)) {
|
||||
// Animations were running so we need to push a frame
|
||||
// to resume them
|
||||
mDirty.set(0, 0, mWidth, mHeight);
|
||||
}
|
||||
}
|
||||
final int surfaceGenerationId = mSurface.getGenerationId();
|
||||
relayoutResult = relayoutWindow(params, viewVisibility, insetsPending);
|
||||
|
||||
Reference in New Issue
Block a user