summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DrawProfiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/DrawProfiler.h')
-rw-r--r--libs/hwui/DrawProfiler.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/libs/hwui/DrawProfiler.h b/libs/hwui/DrawProfiler.h
index de64088..ef6101c 100644
--- a/libs/hwui/DrawProfiler.h
+++ b/libs/hwui/DrawProfiler.h
@@ -16,9 +16,11 @@
#ifndef DRAWPROFILER_H
#define DRAWPROFILER_H
-#include <utils/Timers.h>
+#include "Properties.h"
#include "Rect.h"
+#include <utils/Timers.h>
+
namespace android {
namespace uirenderer {
@@ -29,7 +31,7 @@ public:
DrawProfiler();
~DrawProfiler();
- bool loadSystemProperties();
+ bool consumeProperties();
void setDensity(float density);
void startFrame(nsecs_t recordDurationNanos = 0);
@@ -43,12 +45,6 @@ public:
void dumpData(int fd);
private:
- enum ProfileType {
- kNone,
- kConsole,
- kBars,
- };
-
typedef struct {
float record;
float prepare;
@@ -65,20 +61,18 @@ private:
void drawCurrentFrame(OpenGLRenderer* canvas);
void drawThreshold(OpenGLRenderer* canvas);
- ProfileType loadRequestedProfileType();
-
- ProfileType mType;
- float mDensity;
+ ProfileType mType = ProfileType::None;
+ float mDensity = 0;
- FrameTimingData* mData;
- int mDataSize;
+ FrameTimingData* mData = nullptr;
+ int mDataSize = 0;
- int mCurrentFrame;
- nsecs_t mPreviousTime;
+ int mCurrentFrame = -1;
+ nsecs_t mPreviousTime = 0;
- int mVerticalUnit;
- int mHorizontalUnit;
- int mThresholdStroke;
+ int mVerticalUnit = 0;
+ int mHorizontalUnit = 0;
+ int mThresholdStroke = 0;
/*
* mRects represents an array of rect shapes, divided into NUM_ELEMENTS
@@ -87,11 +81,11 @@ private:
* OpenGLRenderer:drawRects() that makes up all the FrameTimingData:record
* information.
*/
- float** mRects;
+ float** mRects = nullptr;
- bool mShowDirtyRegions;
+ bool mShowDirtyRegions = false;
SkRect mDirtyRegion;
- bool mFlashToggle;
+ bool mFlashToggle = false;
};
} /* namespace uirenderer */