summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-03-13 18:02:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-13 18:02:55 -0700
commit67c7377ef15508f7b459fe393d30a694ec519d62 (patch)
tree259ca6ea56739ea5681048e7d5317f2027f784a0 /libs
parent29000644aece4bdaff9cd84fdbfacd38d1ec38a0 (diff)
parent390f882f8905e8d1ac0d4b7f2e01aa04dccc3c16 (diff)
downloadframeworks_base-67c7377ef15508f7b459fe393d30a694ec519d62.zip
frameworks_base-67c7377ef15508f7b459fe393d30a694ec519d62.tar.gz
frameworks_base-67c7377ef15508f7b459fe393d30a694ec519d62.tar.bz2
Merge "Correctly compute the number of bytes written by each op. Bug #6157792"
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/DisplayListRenderer.cpp2
-rw-r--r--libs/hwui/DisplayListRenderer.h9
2 files changed, 5 insertions, 6 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 24f52e0..a884d8e 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -826,7 +826,7 @@ bool DisplayList::replay(OpenGLRenderer& renderer, uint32_t width,
while (!mReader.eof()) {
int op = mReader.readInt();
if (op & OP_MAY_BE_SKIPPED_MASK) {
- int32_t skip = mReader.readInt() * 4;
+ int32_t skip = mReader.readInt();
if (CC_LIKELY(flags & kReplayFlag_ClipChildren)) {
mReader.skip(skip);
DISPLAY_LIST_LOGD("%s%s skipping %d bytes", (char*) indent,
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index abe8b82..43617e7 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -656,9 +656,8 @@ private:
if (reject) {
mWriter.writeInt(OP_MAY_BE_SKIPPED_MASK | drawOp);
mWriter.writeInt(0xdeaddead);
- uint32_t* location = reject ?
- mWriter.peek32(mWriter.size() - sizeof(int32_t)) : NULL;
- return location;
+ mBufferSize = mWriter.size();
+ return mWriter.peek32(mBufferSize - sizeof(int32_t));
}
mWriter.writeInt(drawOp);
return NULL;
@@ -666,8 +665,7 @@ private:
inline void addSkip(uint32_t* location) {
if (location) {
- *location = (int32_t) (mWriter.peek32(
- mWriter.size() - sizeof(int32_t)) - location);
+ *location = (int32_t) (mWriter.size() - mBufferSize);
}
}
@@ -822,6 +820,7 @@ private:
Vector<SkMatrix*> mMatrices;
SkWriter32 mWriter;
+ uint32_t mBufferSize;
int mRestoreSaveCount;