diff options
| author | Romain Guy <romainguy@google.com> | 2012-09-25 12:17:14 -0700 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2012-09-25 12:22:21 -0700 |
| commit | ef09a210dd6ea481158b7028ec2424a7f5769ed2 (patch) | |
| tree | ac7cac37d1dbe20679cf102f36fee076bc07b120 /core/java/android/view/HardwareLayer.java | |
| parent | 509e2ced819ebaece2abb21693cb2046b5524c5b (diff) | |
Don't destroy the same texture twice
Bug #7221449
SurfaceTexture already deletes the GL texture when detachFromContext
is invoked. The newly introduced refcount would casue the Layer
object to be destroyed later and attempt to delete the GL texture
again. By the time the second cleanup occurs, the texture name
might have been reused by somebody else, resulting in erroneous
behaviors.
Change-Id: I257c589fea64b34c00f46fbfaa7732e6854a5e41
Diffstat (limited to 'core/java/android/view/HardwareLayer.java')
| -rw-r--r-- | core/java/android/view/HardwareLayer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/view/HardwareLayer.java b/core/java/android/view/HardwareLayer.java index d6868ca16f9a..d3bc35a2af42 100644 --- a/core/java/android/view/HardwareLayer.java +++ b/core/java/android/view/HardwareLayer.java @@ -204,4 +204,9 @@ abstract class HardwareLayer { * @param dirtyRect The dirty region of the layer that needs to be redrawn */ abstract void redrawLater(DisplayList displayList, Rect dirtyRect); + + /** + * Indicates that this layer has lost its underlying storage. + */ + abstract void clearStorage(); } |
