diff options
| -rw-r--r-- | libs/hwui/DeferredDisplayList.h | 4 | ||||
| -rw-r--r-- | libs/hwui/Layer.cpp | 3 | ||||
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 8 |
3 files changed, 7 insertions, 8 deletions
diff --git a/libs/hwui/DeferredDisplayList.h b/libs/hwui/DeferredDisplayList.h index 3e450daf888a..653f315c69fb 100644 --- a/libs/hwui/DeferredDisplayList.h +++ b/libs/hwui/DeferredDisplayList.h @@ -52,8 +52,6 @@ public: kOpBatch_Count, // Add other batch ids before this }; - void clear(); - bool isEmpty() { return mBatches.isEmpty(); } /** @@ -80,6 +78,8 @@ private: */ void resetBatchingState(); + void clear(); + void storeStateOpBarrier(OpenGLRenderer& renderer, StateOp* op); void storeRestoreToCountBarrier(OpenGLRenderer& renderer, StateOp* op, int newSaveCount); diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp index 63bb73f12775..d257110c5088 100644 --- a/libs/hwui/Layer.cpp +++ b/libs/hwui/Layer.cpp @@ -167,7 +167,6 @@ void Layer::defer() { displayList->defer(deferredState, 0); deferredUpdateScheduled = false; - displayList = NULL; } void Layer::flush() { @@ -182,7 +181,7 @@ void Layer::flush() { renderer = NULL; dirtyRect.setEmpty(); - deferredList->clear(); + displayList = NULL; } } diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 1138998432a6..d34246d81533 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -571,8 +571,8 @@ void OpenGLRenderer::updateLayers() { startMark("Defer Layer Updates"); } - // Note: it is very important to update the layers in reverse order - for (int i = count - 1; i >= 0; i--) { + // Note: it is very important to update the layers in order + for (int i = 0; i < count; i++) { Layer* layer = mLayerUpdates.itemAt(i); updateLayer(layer, false); if (CC_UNLIKELY(mCaches.drawDeferDisabled)) { @@ -594,8 +594,8 @@ void OpenGLRenderer::flushLayers() { startMark("Apply Layer Updates"); char layerName[12]; - // Note: it is very important to update the layers in reverse order - for (int i = count - 1; i >= 0; i--) { + // Note: it is very important to update the layers in order + for (int i = 0; i < count; i++) { sprintf(layerName, "Layer #%d", i); startMark(layerName); |