summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-06-02 23:16:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-02 23:16:31 +0000
commit4e14da5695b5457ae7da53c7f3079c71e37b2e19 (patch)
tree3e223d0fc4bd4167a486fab86e8be1201ac1c40d
parent97769b0c437a1a09aa925f07bbc8c0ae14d5c31b (diff)
parent4db3d17debef68f72d23999d69ae68b75f59dda3 (diff)
downloadframeworks_base-4e14da5695b5457ae7da53c7f3079c71e37b2e19.zip
frameworks_base-4e14da5695b5457ae7da53c7f3079c71e37b2e19.tar.gz
frameworks_base-4e14da5695b5457ae7da53c7f3079c71e37b2e19.tar.bz2
Merge "FrameInfo header fixes" into mnc-dev
-rw-r--r--libs/hwui/FrameInfo.cpp16
-rw-r--r--libs/hwui/FrameInfo.h3
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp6
3 files changed, 24 insertions, 1 deletions
diff --git a/libs/hwui/FrameInfo.cpp b/libs/hwui/FrameInfo.cpp
index 6da1fa8..c24833b 100644
--- a/libs/hwui/FrameInfo.cpp
+++ b/libs/hwui/FrameInfo.cpp
@@ -20,6 +20,22 @@
namespace android {
namespace uirenderer {
+std::string FrameInfoNames[] = {
+ "Flags",
+ "IntendedVsync",
+ "Vsync",
+ "OldestInputEvent",
+ "NewestInputEvent",
+ "HandleInputStart",
+ "AnimationStart",
+ "PerformTraversalsStart",
+ "DrawStart",
+ "SyncStart",
+ "IssueDrawCommandsStart",
+ "SwapBuffers",
+ "FrameCompleted",
+};
+
void FrameInfo::importUiThreadInfo(int64_t* info) {
memcpy(mFrameInfo, info, UI_THREAD_FRAME_INFO_SIZE * sizeof(int64_t));
}
diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h
index c8189b8..816ef56 100644
--- a/libs/hwui/FrameInfo.h
+++ b/libs/hwui/FrameInfo.h
@@ -22,6 +22,7 @@
#include <utils/Timers.h>
#include <memory.h>
+#include <string>
namespace android {
namespace uirenderer {
@@ -49,6 +50,8 @@ enum class FrameInfoIndex {
kNumIndexes
};
+extern std::string FrameInfoNames[];
+
enum class FrameInfoFlags {
kWindowLayoutChanged = 1 << 0,
kRTAnimation = 1 << 1,
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 706e14e..b5d7346 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -391,7 +391,11 @@ void CanvasContext::setTextureAtlas(RenderThread& thread,
void CanvasContext::dumpFrames(int fd) {
FILE* file = fdopen(fd, "a");
- fprintf(file, "\n\n---PROFILEDATA---");
+ fprintf(file, "\n\n---PROFILEDATA---\n");
+ for (size_t i = 0; i < static_cast<size_t>(FrameInfoIndex::kNumIndexes); i++) {
+ fprintf(file, FrameInfoNames[i].c_str());
+ fprintf(file, ",");
+ }
for (size_t i = 0; i < mFrames.size(); i++) {
FrameInfo& frame = mFrames[i];
if (frame[FrameInfoIndex::kSyncStart] == 0) {