Merge "surfaceflinger: defer EGLImage creation"
diff --git a/services/surfaceflinger/BufferLayerConsumer.cpp b/services/surfaceflinger/BufferLayerConsumer.cpp
index 16c3254..f577020 100644
--- a/services/surfaceflinger/BufferLayerConsumer.cpp
+++ b/services/surfaceflinger/BufferLayerConsumer.cpp
@@ -292,19 +292,6 @@
int slot = item.mSlot;
- // Ensure we have a valid EglImageKHR for the slot, creating an EglImage
- // if nessessary, for the gralloc buffer currently in the slot in
- // ConsumerBase.
- // We may have to do this even when item.mGraphicBuffer == NULL (which
- // means the buffer was previously acquired).
- const Rect& imageCrop = canUseImageCrop(item.mCrop) ? item.mCrop : Rect::EMPTY_RECT;
- err = mImages[slot]->createIfNeeded(imageCrop);
- if (err != NO_ERROR) {
- BLC_LOGW("updateAndRelease: unable to createImage on slot=%d", slot);
- releaseBufferLocked(slot, mSlots[slot].mGraphicBuffer);
- return UNKNOWN_ERROR;
- }
-
// Do whatever sync ops we need to do before releasing the old slot.
if (slot != mCurrentTexture) {
err = syncForReleaseLocked();