mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-09 15:47:56 +08:00
make viewcount debuginfo print only changed
This commit is contained in:
parent
f4731ac943
commit
8e1f54754a
@ -444,8 +444,6 @@ ColorStateList* Assets::getColorStateList(const std::string&fullresid) {
|
||||
name = AttributeSet::normalize(pkg,name);
|
||||
auto itc= mColors.find(name);
|
||||
auto its = mStateColors.find(name);
|
||||
if(fullresid.compare("#313431")==0)
|
||||
LOGI("");
|
||||
if( its!=mStateColors.end())
|
||||
return its->second;
|
||||
else if(itc != mColors.end()){
|
||||
|
@ -266,6 +266,10 @@ void GraphDevice::composeSurfaces(){
|
||||
}/*endif for wSurfaces.size*/
|
||||
GFXFlip(mPrimarySurface);
|
||||
mLastComposeTime = SystemClock::uptimeMillis();
|
||||
if( (View::mViewCount!=mLastViewCount) && View::VIEW_DEBUG){
|
||||
LOGD("Total ViewCount %d",View::mViewCount);
|
||||
mLastViewCount = View::mViewCount;
|
||||
}
|
||||
mPendingCompose = 0;
|
||||
}
|
||||
}//end namespace
|
||||
|
@ -18,6 +18,7 @@ private:
|
||||
int mFormat;
|
||||
int mComposing;
|
||||
int mPendingCompose;
|
||||
int mLastViewCount;
|
||||
bool mQuitFlag;
|
||||
bool mShowFPS;
|
||||
uint64_t mLastComposeTime;
|
||||
|
@ -441,7 +441,7 @@ View::View(Context*ctx,const AttributeSet&attrs){
|
||||
|
||||
void View::initView(){
|
||||
mViewCount ++;
|
||||
LOGD_IF(View::VIEW_DEBUG,"mViewCount=%d",mViewCount);
|
||||
LOGV_IF(View::VIEW_DEBUG,"mViewCount=%d",mViewCount);
|
||||
mID = NO_ID;
|
||||
mAutofillViewId =NO_ID;
|
||||
mAccessibilityViewId = NO_ID;
|
||||
@ -519,7 +519,7 @@ void View::initView(){
|
||||
|
||||
View::~View(){
|
||||
mViewCount --;
|
||||
LOGD_IF(View::VIEW_DEBUG,"mViewCount=%d",mViewCount);
|
||||
LOGV_IF(View::VIEW_DEBUG,"mViewCount=%d",mViewCount);
|
||||
if(mParent)
|
||||
mParent->removeViewInternal(this);
|
||||
if(isAttachedToWindow())onDetachedFromWindow();
|
||||
|
@ -47,6 +47,7 @@ typedef std::string Parcelable;
|
||||
class View:public Drawable::Callback,public KeyEvent::Callback{
|
||||
public:
|
||||
static bool VIEW_DEBUG;
|
||||
static int mViewCount;
|
||||
constexpr static int DEBUG_CORNERS_COLOR = 0xFF3f7fff;
|
||||
constexpr static int DEBUG_CORNERS_SIZE_DIP = 8;
|
||||
constexpr static int NO_ID =-1;
|
||||
@ -371,7 +372,6 @@ public:
|
||||
private:
|
||||
friend ViewGroup;
|
||||
friend ViewPropertyAnimator;
|
||||
static int mViewCount;
|
||||
int mMinWidth;
|
||||
int mMinHeight;
|
||||
int mDrawingCacheBackgroundColor;
|
||||
|
Loading…
Reference in New Issue
Block a user