设为首页 加入收藏

TOP

Android的surface类源码深度剖析(二)
2014-11-24 13:00:14 来源: 作者: 【 】 浏览:3
Tags:Android surface 源码 深度 剖析
n, 0);
}


public native void setLayer(int zorder);
public native void setPosition(int x, int y);
public native void setSize(int w, int h);


public native void hide();
public native void show();
public native void setTransparentRegionHint(Region region);
public native void setAlpha(float alpha);
public native void setMatrix(float dsdx, float dtdx,
float dsdy, float dtdy);


public native void freeze();
public native void unfreeze();


public native void setFreezeTint(int tint);


public native void setFlags(int flags, int mask);


@Override
public String toString() {
return "Surface(native-token=" + mSurface + ")";
}


private Surface(Parcel source) throws OutOfResourcesException {
init(source);
}

public int describeContents() {
return 0;
}


public native void readFromParcel(Parcel source);
public native void writeToParcel(Parcel dest, int flags);


public static final Parcelable.Creator CREATOR
= new Parcelable.Creator()
{
public Surface createFromParcel(Parcel source) {
try {
return new Surface(source);
} catch (Exception e) {
Log.e(LOG_TAG, "Exception creating surface from parcel", e);
}
return null;
}


public Surface[] newArray(int size) {
return new Surface[size];
}
};


/* no user serviceable parts here ... */
@Override
protected void finalize() throws Throwable {
clear();
}

private native void init(SurfaceSession s,
int pid, int display, int w, int h, int format, int flags)
throws OutOfResourcesException;


private native void init(Parcel source);
}


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android提供语音搜索功能 下一篇Android中的surface原理

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·哈希表 - 菜鸟教程 (2025-12-24 20:18:55)
·MySQL存储引擎InnoDB (2025-12-24 20:18:53)
·索引堆及其优化 - 菜 (2025-12-24 20:18:50)
·Shell 中各种括号的 (2025-12-24 19:50:39)
·Shell 变量 - 菜鸟教 (2025-12-24 19:50:37)