diff options
| author | 2013-05-10 12:44:26 -0700 | |
|---|---|---|
| committer | 2013-05-10 12:44:26 -0700 | |
| commit | f420a36e5f62a9ab38f6782db78f5d94947b034e (patch) | |
| tree | 354cb4379b8bcc663baf157718e5231ef4fd64f9 | |
| parent | 68c666ebb75b7e87ee9773752165351482b49a08 (diff) | |
| parent | 4329ee25659c27b1cd90f95f127192964346e471 (diff) | |
am 4329ee25: Merge "Fix off by one error in log tracking" into jb-mr2-dev
* commit '4329ee25659c27b1cd90f95f127192964346e471':
Fix off by one error in log tracking
| -rw-r--r-- | libs/hwui/DeferredDisplayList.cpp | 4 | ||||
| -rw-r--r-- | libs/hwui/DisplayList.cpp | 2 | ||||
| -rw-r--r-- | libs/hwui/DisplayListLogBuffer.cpp | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/libs/hwui/DeferredDisplayList.cpp b/libs/hwui/DeferredDisplayList.cpp index f0084f205577..9323a3ae676a 100644 --- a/libs/hwui/DeferredDisplayList.cpp +++ b/libs/hwui/DeferredDisplayList.cpp @@ -98,8 +98,8 @@ public: #if DEBUG_DISPLAY_LIST_OPS_AS_EVENTS renderer.eventMark(op->name()); #endif - status |= op->applyDraw(renderer, dirty); logBuffer.writeCommand(0, op->name()); + status |= op->applyDraw(renderer, dirty); #if DEBUG_MERGE_BEHAVIOR Rect& bounds = mOps[i]->state.mBounds; @@ -200,10 +200,10 @@ public: } DrawOp* op = mOps[0]; - status_t status = op->multiDraw(renderer, dirty, mOps, mBounds); DisplayListLogBuffer& buffer = DisplayListLogBuffer::getInstance(); buffer.writeCommand(0, "multiDraw"); buffer.writeCommand(1, op->name()); + status_t status = op->multiDraw(renderer, dirty, mOps, mBounds); #if DEBUG_MERGE_BEHAVIOR renderer.drawScreenSpaceColorRect(mBounds.left, mBounds.top, mBounds.right, mBounds.bottom, diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp index 3c587976d007..c11741c12638 100644 --- a/libs/hwui/DisplayList.cpp +++ b/libs/hwui/DisplayList.cpp @@ -511,8 +511,8 @@ void DisplayList::iterate(OpenGLRenderer& renderer, T& handler, const int level) for (unsigned int i = 0; i < mDisplayListData->displayListOps.size(); i++) { DisplayListOp *op = mDisplayListData->displayListOps[i]; - handler(op, saveCount, mClipToBounds); logBuffer.writeCommand(level, op->name()); + handler(op, saveCount, mClipToBounds); } DISPLAY_LIST_LOGD("%*sRestoreToCount %d", (level + 1) * 2, "", restoreTo); diff --git a/libs/hwui/DisplayListLogBuffer.cpp b/libs/hwui/DisplayListLogBuffer.cpp index f039fcd9571f..45aaccac7abe 100644 --- a/libs/hwui/DisplayListLogBuffer.cpp +++ b/libs/hwui/DisplayListLogBuffer.cpp @@ -77,12 +77,13 @@ void DisplayListLogBuffer::outputCommands(FILE *file) if (tmpBufferPtr == mEnd) { break; } + + fprintf(file, "%*s%s\n", 2 * tmpBufferPtr->level, "", tmpBufferPtr->label); + OpLog* nextOp = tmpBufferPtr++; if (tmpBufferPtr > mBufferLast) { tmpBufferPtr = mBufferFirst; } - - fprintf(file, "%*s%s\n", tmpBufferPtr->level*2, "", tmpBufferPtr->label); } } |