diff options
author | Chris Craik <ccraik@google.com> | 2012-11-26 18:30:17 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2013-01-22 13:47:03 -0800 |
commit | 2af4635e4a9e448a65ff541252f8f94bc6ac48e0 (patch) | |
tree | 2ea27d507f81660cdbb8e2cdf48cce875c1b8cdd /core | |
parent | 878749fef09c7cb5894f77d9b032f876f9476e47 (diff) | |
download | frameworks_base-2af4635e4a9e448a65ff541252f8f94bc6ac48e0.zip frameworks_base-2af4635e4a9e448a65ff541252f8f94bc6ac48e0.tar.gz frameworks_base-2af4635e4a9e448a65ff541252f8f94bc6ac48e0.tar.bz2 |
Object-based DisplayList recording
bug:8037003
Changes the DisplayList from using stream read/write commands to use an array of
objects manually allocated on a linear buffer.
Depends on frameworks/native change https://googleplex-android-review.googlesource.com/#/c/257695/ which adds LinearAllocator
Also changes drawRects to use float count instead of rect count, to be more like drawLines/drawPoints
Change-Id: Ia2e4a11acd8f0a757042a05cbc9e7563cb73ee47
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/view/HardwareRenderer.java | 2 | ||||
-rw-r--r-- | core/jni/android_view_GLES20Canvas.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java index 2b4260d..5e6125f 100644 --- a/core/java/android/view/HardwareRenderer.java +++ b/core/java/android/view/HardwareRenderer.java @@ -1868,7 +1868,7 @@ public abstract class HardwareRenderer { mDebugDataProvider.setupGraphPaint(mProfilePaint, i); switch (graphType) { case GraphDataProvider.GRAPH_TYPE_BARS: - mGlCanvas.drawRects(mProfileShapes[i], count, mProfilePaint); + mGlCanvas.drawRects(mProfileShapes[i], count * 4, mProfilePaint); break; case GraphDataProvider.GRAPH_TYPE_LINES: mGlCanvas.drawLines(mProfileShapes[i], 0, count * 4, mProfilePaint); diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index de14826..f4fcc81 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -479,7 +479,7 @@ static void android_view_GLES20Canvas_drawRegionAsRects(JNIEnv* env, jobject cla rects.push(r.fTop); rects.push(r.fRight); rects.push(r.fBottom); - count++; + count += 4; it.next(); } renderer->drawRects(rects.array(), count, paint); |