diff options
Diffstat (limited to 'libs/hwui/GlLayer.cpp')
-rw-r--r-- | libs/hwui/GlLayer.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libs/hwui/GlLayer.cpp b/libs/hwui/GlLayer.cpp index 8174bcc35d97..aacad548c68b 100644 --- a/libs/hwui/GlLayer.cpp +++ b/libs/hwui/GlLayer.cpp @@ -43,7 +43,10 @@ GlLayer::GlLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHe } GlLayer::~GlLayer() { - if (texture.mId) { + // There's a rare possibility that Caches could have been destroyed already + // since this method is queued up as a task. + // Since this is a reset method, treat this as non-fatal. + if (caches.isInitialized() && texture.mId) { texture.deleteTexture(); } } @@ -64,15 +67,5 @@ void GlLayer::generateTexture() { } } -void GlLayer::clearTexture() { - // There's a rare possibility that Caches could have been destroyed already - // since this method is queued up as a task. - // Since this is a reset method, treat this as non-fatal. - if (caches.isInitialized()) { - caches.textureState().unbindTexture(texture.mId); - } - texture.mId = 0; -} - }; // namespace uirenderer }; // namespace android |