mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-03 12:48:56 +08:00
rename env SCREENSIZE to SCREEN_SIZE
This commit is contained in:
parent
ec5f25f87e
commit
8f98e3abbd
@ -107,7 +107,7 @@ int main(int argc,const char*argv[]){
|
|||||||
rv->getLayoutManager()->requestSimpleAnimationsInNextLayout();
|
rv->getLayoutManager()->requestSimpleAnimationsInNextLayout();
|
||||||
for(int i=0;i<100;i++){
|
for(int i=0;i<100;i++){
|
||||||
adapter->add(std::string("string ")+std::to_string(i));
|
adapter->add(std::string("string ")+std::to_string(i));
|
||||||
adapter->notifyItemInserted(i);
|
//adapter->notifyItemInserted(i);//Notice:call notifyItemInserted before layout will cause memleak.
|
||||||
}
|
}
|
||||||
decoration->setDrawable(new ColorDrawable(0xFFFF0000));
|
decoration->setDrawable(new ColorDrawable(0xFFFF0000));
|
||||||
rv->addItemDecoration(decoration);
|
rv->addItemDecoration(decoration);
|
||||||
|
@ -59,7 +59,7 @@ int GraphDevice::init(){
|
|||||||
Cairo::RefPtr<Cairo::ImageSurface> img= nullptr;
|
Cairo::RefPtr<Cairo::ImageSurface> img= nullptr;
|
||||||
if(!mLogo.empty()){
|
if(!mLogo.empty()){
|
||||||
std::ifstream fs(mLogo.c_str());
|
std::ifstream fs(mLogo.c_str());
|
||||||
img = Cairo::ImageSurface::create_from_stream(fs);
|
img = Cairo::ImageSurface::create_from_stream(fs);
|
||||||
}
|
}
|
||||||
GFXInit();
|
GFXInit();
|
||||||
|
|
||||||
@ -71,13 +71,17 @@ int GraphDevice::init(){
|
|||||||
mPrimaryContext = new Canvas(surf);
|
mPrimaryContext = new Canvas(surf);
|
||||||
mRectBanner.set(0,0,400,40);
|
mRectBanner.set(0,0,400,40);
|
||||||
|
|
||||||
GFXCreateSurface(0,&logoSurface,mScreenWidth,mScreenHeight,mFormat,0);
|
if(img){
|
||||||
GFXLockSurface(logoSurface,(void**)&logoBuffer,&pitch);
|
GFXCreateSurface(0,&logoSurface,mScreenWidth,mScreenHeight,mFormat,0);
|
||||||
RefPtr<Surface>logoSurf = ImageSurface::create(logoBuffer,Surface::Format::ARGB32,mScreenWidth,mScreenHeight,pitch);
|
GFXLockSurface(logoSurface,(void**)&logoBuffer,&pitch);
|
||||||
RefPtr<Cairo::Context>logoContext=Cairo::Context::create(logoSurf);
|
RefPtr<Surface>logoSurf = ImageSurface::create(logoBuffer,Surface::Format::ARGB32,mScreenWidth,mScreenHeight,pitch);
|
||||||
showLogo(logoContext.get(),img);
|
RefPtr<Cairo::Context>logoContext=Cairo::Context::create(logoSurf);
|
||||||
GFXBlit(mPrimarySurface,0,0,logoSurface,nullptr);
|
showLogo(logoContext.get(),img);
|
||||||
GFXDestroySurface(logoSurface);
|
GFXBlit(mPrimarySurface,0,0,logoSurface,nullptr);
|
||||||
|
GFXDestroySurface(logoSurface);
|
||||||
|
}else{
|
||||||
|
showLogo(mPrimaryContext,img);
|
||||||
|
}
|
||||||
|
|
||||||
mLastComposeTime = SystemClock::uptimeMillis();
|
mLastComposeTime = SystemClock::uptimeMillis();
|
||||||
mComposing = 0;
|
mComposing = 0;
|
||||||
|
@ -163,7 +163,7 @@ std::shared_ptr<Drawable::ConstantState>DrawableWrapper::getConstantState(){
|
|||||||
int DrawableWrapper::getChangingConfigurations()const{
|
int DrawableWrapper::getChangingConfigurations()const{
|
||||||
return Drawable::getChangingConfigurations()
|
return Drawable::getChangingConfigurations()
|
||||||
| (mState != nullptr ? mState->getChangingConfigurations() : 0)
|
| (mState != nullptr ? mState->getChangingConfigurations() : 0)
|
||||||
| mDrawable->getChangingConfigurations();
|
| (mDrawable&&mDrawable->getChangingConfigurations());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawableWrapper::invalidateDrawable(Drawable& who){
|
void DrawableWrapper::invalidateDrawable(Drawable& who){
|
||||||
|
@ -209,6 +209,7 @@ LayerDrawable::LayerDrawable():LayerDrawable(nullptr){
|
|||||||
|
|
||||||
LayerDrawable::LayerDrawable(const std::vector<Drawable*>&drawables)
|
LayerDrawable::LayerDrawable(const std::vector<Drawable*>&drawables)
|
||||||
:LayerDrawable(){
|
:LayerDrawable(){
|
||||||
|
mHotspotBounds.set(0,0,0,0);
|
||||||
for(auto d:drawables){
|
for(auto d:drawables){
|
||||||
ChildDrawable*child=new ChildDrawable(0);
|
ChildDrawable*child=new ChildDrawable(0);
|
||||||
child->mDrawable=d;
|
child->mDrawable=d;
|
||||||
|
@ -25,8 +25,10 @@ static GFXRect screenMargin= {0}; //{60,0,60,0};
|
|||||||
|
|
||||||
#define SENDKEY(k,down) {InjectKey(EV_KEY,k,down);}
|
#define SENDKEY(k,down) {InjectKey(EV_KEY,k,down);}
|
||||||
#if 1
|
#if 1
|
||||||
#define SENDMOUSE(time,x,y) {InjectABS(time,EV_ABS,0,x);\
|
#define SENDMOUSE(time,x,y) {\
|
||||||
InjectABS(time,EV_ABS,1,y);InjectABS(time,EV_SYN,SYN_REPORT,0);}
|
InjectABS(time,EV_ABS,ABS_X,x);\
|
||||||
|
InjectABS(time,EV_ABS,ABS_Y,y);\
|
||||||
|
InjectABS(time,EV_SYN,SYN_REPORT,0);}
|
||||||
#else
|
#else
|
||||||
#define SENDMOUSE(time,x,y) {InjectREL(time,EV_REL,0,x);\
|
#define SENDMOUSE(time,x,y) {InjectREL(time,EV_REL,0,x);\
|
||||||
InjectREL(time,EV_REL,1,y);InjectREL(time,EV_SYN,SYN_REPORT,0);}
|
InjectREL(time,EV_REL,1,y);InjectREL(time,EV_SYN,SYN_REPORT,0);}
|
||||||
@ -136,7 +138,7 @@ INT GFXInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
INT GFXGetDisplaySize(int dispid,UINT*width,UINT*height) {
|
INT GFXGetDisplaySize(int dispid,UINT*width,UINT*height) {
|
||||||
const char*env= getenv("SCREENSIZE");
|
const char*env= getenv("SCREEN_SIZE");
|
||||||
if(env==NULL) {
|
if(env==NULL) {
|
||||||
*width=1280;//dispCfg.width;
|
*width=1280;//dispCfg.width;
|
||||||
*height=720;//dispCfg.height;
|
*height=720;//dispCfg.height;
|
||||||
|
Loading…
Reference in New Issue
Block a user