mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 21:58:44 +08:00
add some debug message
This commit is contained in:
parent
43b7a6f586
commit
e03e9fd8de
@ -80,7 +80,6 @@ BitmapDrawable::BitmapDrawable(Context*ctx,const std::string&resname)
|
||||
:BitmapDrawable(std::make_shared<BitmapState>()){
|
||||
std::ifstream fs(resname,std::ios::binary);
|
||||
RefPtr<ImageSurface>b;
|
||||
LOGV("%s",resname.c_str());
|
||||
mBitmapState->mResource = resname;
|
||||
if((ctx==nullptr)||fs.good()){
|
||||
b = ImageSurface::create_from_stream(fs);
|
||||
@ -88,6 +87,19 @@ BitmapDrawable::BitmapDrawable(Context*ctx,const std::string&resname)
|
||||
b = ctx->loadImage(resname);
|
||||
}
|
||||
setBitmap(b);
|
||||
#if defined(DEBUG) && ( defined(__x86_64__) || defined(__i386__) )
|
||||
const char*tNames[] = {"UNKNOWN","TRANSLUCENT","TRANSPARENT","OPAQUE"};
|
||||
DisplayMetrics dm = ctx->getDisplayMetrics();
|
||||
const size_t fullScreenSize=dm.widthPixels*dm.heightPixels;
|
||||
const size_t bitmapSize = b->get_width()*b->get_height();
|
||||
char mime[32] = {0};
|
||||
size_t len = 0;
|
||||
b->get_mime_data(mime,len);
|
||||
LOGD_IF( ( (mBitmapState->mTransparency!=PixelFormat::OPAQUE)&&(bitmapSize>=fullScreenSize/4) )
|
||||
|| (b->get_stride()<b->get_width()*4),
|
||||
"is %-12s bpp:%d %s/%d '%s' maby cause compose more slowly" , tNames[mBitmapState->mTransparency],
|
||||
b->get_stride()/b->get_width(), mime,len,mBitmapState->mResource.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
BitmapDrawable::~BitmapDrawable(){
|
||||
|
@ -600,7 +600,7 @@ float MotionEvent::getHistoricalAxisValue(int axis,size_t pointerIndex,size_t hi
|
||||
}
|
||||
|
||||
float MotionEvent::getHistoricalX(size_t pointerIndex, size_t historicalIndex) const{
|
||||
return getHistoricalRawAxisValue(AXIS_X, pointerIndex, historicalIndex);
|
||||
return getHistoricalRawAxisValue(AXIS_X, pointerIndex, historicalIndex);
|
||||
}
|
||||
|
||||
float MotionEvent::getHistoricalY(size_t pointerIndex, size_t historicalIndex) const{
|
||||
|
Loading…
Reference in New Issue
Block a user