Track down unsupported texture target
bug:19641517
Change-Id: Idc2e413abef5bb1438ffb3f52efb001504d3e89f
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h
index 38d8e4a..82f2741 100644
--- a/libs/hwui/DeferredLayerUpdater.h
+++ b/libs/hwui/DeferredLayerUpdater.h
@@ -59,6 +59,10 @@
if (texture.get() != mSurfaceTexture.get()) {
mNeedsGLContextAttach = needsAttach;
mSurfaceTexture = texture;
+
+ GLenum target = texture->getCurrentTextureTarget();
+ LOG_ALWAYS_FATAL_IF(target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES,
+ "set unsupported GLConsumer with target %x", target);
}
}