diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/ThreadedRenderer.java | 15 | ||||
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 11 |
2 files changed, 6 insertions, 20 deletions
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java index f44d4c1ac9df..c97247656540 100644 --- a/core/java/android/view/ThreadedRenderer.java +++ b/core/java/android/view/ThreadedRenderer.java @@ -485,25 +485,15 @@ public final class ThreadedRenderer { } /** - * Halts any current rendering into the surface. Use this if it is unclear whether + * Stops any rendering into the surface. Use this if it is unclear whether * or not the surface used by the HardwareRenderer will be changing. It - * Suspends any rendering into the surface, but will not do any destruction. - * - * Any subsequent draws will override the pause, resuming normal operation. + * Suspends any rendering into the surface, but will not do any destruction */ boolean pauseSurface(Surface surface) { return nPauseSurface(mNativeProxy, surface); } /** - * Hard stops or resumes rendering into the surface. This flag is used to - * determine whether or not it is safe to use the given surface *at all* - */ - void setStopped(boolean stopped) { - nSetStopped(mNativeProxy, stopped); - } - - /** * Destroys all hardware rendering resources associated with the specified * view hierarchy. * @@ -998,7 +988,6 @@ public final class ThreadedRenderer { private static native void nInitialize(long nativeProxy, Surface window); private static native void nUpdateSurface(long nativeProxy, Surface window); private static native boolean nPauseSurface(long nativeProxy, Surface window); - private static native void nSetStopped(long nativeProxy, boolean stopped); private static native void nSetup(long nativeProxy, int width, int height, float lightRadius, int ambientShadowAlpha, int spotShadowAlpha); private static native void nSetLightCenter(long nativeProxy, diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 94c4cef959ba..a324767ac4ed 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1079,16 +1079,13 @@ public final class ViewRootImpl implements ViewParent, void setWindowStopped(boolean stopped) { if (mStopped != stopped) { mStopped = stopped; - final ThreadedRenderer renderer = mAttachInfo.mHardwareRenderer; - if (renderer != null) { - if (DEBUG_DRAW) Log.d(mTag, "WindowStopped on " + getTitle() + " set to " + mStopped); - renderer.setStopped(mStopped); - } if (!mStopped) { scheduleTraversals(); } else { - if (renderer != null) { - renderer.destroyHardwareResources(mView); + if (mAttachInfo.mHardwareRenderer != null) { + if (DEBUG_DRAW) Log.d(mTag, "WindowStopped on " + getTitle()); + mAttachInfo.mHardwareRenderer.updateSurface(null); + mAttachInfo.mHardwareRenderer.destroyHardwareResources(mView); } } } |
