mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 13:48:02 +08:00
1.reopen gfx global alpha support,2.fix textview.setlinktextcolor
This commit is contained in:
parent
8531406741
commit
91006c3f92
@ -74,6 +74,22 @@ void LayerDrawable::ChildDrawable::applyDensityScaling(int sourceDensity, int ta
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
LayerDrawable::LayerState::LayerState(){
|
||||
#if 0
|
||||
if(attrs){
|
||||
mPaddingTop = attrs->getInt("paddingTop");
|
||||
mPaddingLeft = attrs->getInt("paddingLeft");
|
||||
mPaddingRight= attrs->getInt("paddingRight");
|
||||
mPaddingBottom=attrs->getInt("paddingBottom");
|
||||
mPaddingStart =attrs->getInt("paddingStart");
|
||||
mPaddingEnd = attrs->getInt("paddingEnd");
|
||||
mPaddingMode = attrs->getInt("paddingMode",std::map<const std::string,int>{
|
||||
{"nest",PADDING_MODE_NEST},
|
||||
{"inner",PADDING_MODE_INNER},
|
||||
{"stack",PADDING_MODE_STACK}
|
||||
},PADDING_MODE_NEST);
|
||||
mAutoMirrored= attrs->getBoolean("paddingMode");
|
||||
}else
|
||||
#endif
|
||||
mDensity = -1;
|
||||
mPaddingTop = mPaddingBottom= -1;
|
||||
mPaddingLeft = mPaddingRight = -1;
|
||||
|
@ -5,6 +5,10 @@ namespace cdroid{
|
||||
|
||||
|
||||
class LayerDrawable:public Drawable,public Drawable::Callback {
|
||||
public:
|
||||
static constexpr int PADDING_MODE_NEST=0;
|
||||
static constexpr int PADDING_MODE_INNER=1;
|
||||
static constexpr int PADDING_MODE_STACK=2;
|
||||
protected:
|
||||
class ChildDrawable{
|
||||
public:
|
||||
@ -86,10 +90,6 @@ protected:
|
||||
LayerDrawable(std::shared_ptr<LayerState>state);
|
||||
ChildDrawable* addLayer(Drawable* dr,const std::vector<int>&themeAttrs,int id,int left,int top,int right,int bottom);
|
||||
public:
|
||||
enum PaddingMode{
|
||||
PADDING_MODE_NEST=0,
|
||||
PADDING_MODE_STACK=1
|
||||
};
|
||||
LayerDrawable();
|
||||
LayerDrawable(const std::vector<Drawable*>&drawables);
|
||||
|
||||
|
@ -1691,8 +1691,7 @@ int TextView::getCurrentHintTextColor()const{
|
||||
|
||||
|
||||
void TextView::setLinkTextColor(int color){
|
||||
ColorStateList cls(color);
|
||||
setLinkTextColor(&cls);
|
||||
setLinkTextColor(ColorStateList::valueOf(color));
|
||||
}
|
||||
|
||||
void TextView::setLinkTextColor(const ColorStateList* colors){
|
||||
|
@ -141,8 +141,9 @@ int GFXInit() {
|
||||
FBSURFACE*fbs = &devSurfaces[0];
|
||||
dev->var.yoffset = (i%2)*dev->var.yres;
|
||||
MI_SYS_MemsetPa(fbs->kbuffer+displayScreenSize*(i%2?0:1),colors[i%6],(displayScreenSize));
|
||||
ioctl(dev->fb, FBIO_WAITFORVSYNC, NULL);
|
||||
ioctl(dev->fb, FBIOPAN_DISPLAY, &dev->var);
|
||||
int ret1=ioctl(dev->fb, FBIO_WAITFORVSYNC, NULL);
|
||||
int ret2=ioctl(dev->fb, FBIOPAN_DISPLAY, &dev->var);
|
||||
LOGD("ioctl ret=%d,%d",ret1,ret2);
|
||||
usleep(16000);
|
||||
}
|
||||
#endif
|
||||
@ -390,7 +391,7 @@ INT GFXBlit(HANDLE dstsurface,int dx,int dy,HANDLE srcsurface,const GFXRect*srcr
|
||||
toMIGFX(ndst,&gfxdst);
|
||||
bzero(&opt,sizeof(opt));
|
||||
|
||||
opt.u32GlobalSrcConstColor = 0xFF000000;//nsrc->alpha<<24;
|
||||
opt.u32GlobalSrcConstColor = nsrc->alpha<<24;
|
||||
opt.u32GlobalDstConstColor = 0xFF000000;
|
||||
opt.eSrcDfbBldOp = E_MI_GFX_DFB_BLD_ONE;
|
||||
opt.eDstDfbBldOp = E_MI_GFX_DFB_BLD_ZERO;
|
||||
|
Loading…
Reference in New Issue
Block a user