Loading core/java/android/view/HardwareRenderer.java +29 −24 Original line number Diff line number Diff line Loading @@ -1525,30 +1525,6 @@ public abstract class HardwareRenderer { ((GLES20TextureLayer) layer).setSurfaceTexture(surfaceTexture); } @Override void destroyLayers(View view) { if (view != null && isEnabled() && checkCurrent() != SURFACE_STATE_ERROR) { if (mCanvas != null) { mCanvas.clearLayerUpdates(); } destroyHardwareLayer(view); GLES20Canvas.flushCaches(GLES20Canvas.FLUSH_CACHES_LAYERS); } } private static void destroyHardwareLayer(View view) { view.destroyLayer(true); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; int count = group.getChildCount(); for (int i = 0; i < count; i++) { destroyHardwareLayer(group.getChildAt(i)); } } } @Override boolean safelyRun(Runnable action) { boolean needsContext = true; Loading @@ -1573,6 +1549,35 @@ public abstract class HardwareRenderer { return true; } @Override void destroyLayers(final View view) { if (view != null) { safelyRun(new Runnable() { @Override public void run() { if (mCanvas != null) { mCanvas.clearLayerUpdates(); } destroyHardwareLayer(view); GLES20Canvas.flushCaches(GLES20Canvas.FLUSH_CACHES_LAYERS); } }); } } private static void destroyHardwareLayer(View view) { view.destroyLayer(true); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; int count = group.getChildCount(); for (int i = 0; i < count; i++) { destroyHardwareLayer(group.getChildAt(i)); } } } @Override void destroyHardwareResources(final View view) { if (view != null) { Loading Loading
core/java/android/view/HardwareRenderer.java +29 −24 Original line number Diff line number Diff line Loading @@ -1525,30 +1525,6 @@ public abstract class HardwareRenderer { ((GLES20TextureLayer) layer).setSurfaceTexture(surfaceTexture); } @Override void destroyLayers(View view) { if (view != null && isEnabled() && checkCurrent() != SURFACE_STATE_ERROR) { if (mCanvas != null) { mCanvas.clearLayerUpdates(); } destroyHardwareLayer(view); GLES20Canvas.flushCaches(GLES20Canvas.FLUSH_CACHES_LAYERS); } } private static void destroyHardwareLayer(View view) { view.destroyLayer(true); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; int count = group.getChildCount(); for (int i = 0; i < count; i++) { destroyHardwareLayer(group.getChildAt(i)); } } } @Override boolean safelyRun(Runnable action) { boolean needsContext = true; Loading @@ -1573,6 +1549,35 @@ public abstract class HardwareRenderer { return true; } @Override void destroyLayers(final View view) { if (view != null) { safelyRun(new Runnable() { @Override public void run() { if (mCanvas != null) { mCanvas.clearLayerUpdates(); } destroyHardwareLayer(view); GLES20Canvas.flushCaches(GLES20Canvas.FLUSH_CACHES_LAYERS); } }); } } private static void destroyHardwareLayer(View view) { view.destroyLayer(true); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; int count = group.getChildCount(); for (int i = 0; i < count; i++) { destroyHardwareLayer(group.getChildAt(i)); } } } @Override void destroyHardwareResources(final View view) { if (view != null) { Loading