diff options
author | Chris Craik <ccraik@google.com> | 2015-05-04 14:36:49 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-05-05 10:36:09 -0700 |
commit | 2507c34d91bb0d722b6012e85cb47387b2aa6873 (patch) | |
tree | ff515c6827fb20c904ee1af7e551144c46ba3385 /libs/hwui/DrawProfiler.h | |
parent | 57436d3f7e7fca99400a9b90e93491e892d135ae (diff) | |
download | frameworks_base-2507c34d91bb0d722b6012e85cb47387b2aa6873.zip frameworks_base-2507c34d91bb0d722b6012e85cb47387b2aa6873.tar.gz frameworks_base-2507c34d91bb0d722b6012e85cb47387b2aa6873.tar.bz2 |
Cleanup properties
bug:19967854
Separate properties from Caches, into static, RenderThread-only class.
Also rewrites the means for java to set properties to correctly handle
threading, and adds an override for profile bars so that SysUi doesn't clutter
the screen with them.
Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
Diffstat (limited to 'libs/hwui/DrawProfiler.h')
-rw-r--r-- | libs/hwui/DrawProfiler.h | 38 |
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 */ |