ViewRootImpl和WindowManagerService笔记
2020-12-13 05:58
标签:style java for ar 代码 div window view 当surfaceChanged设置为true时,下面这段代码会调用
ViewRootImpl和WindowManagerService笔记,搜素材,soscw.com ViewRootImpl和WindowManagerService笔记 标签:style java for ar 代码 div window view 原文地址:http://blog.csdn.net/guoqifa29/article/details/383823651、每一个窗口的ViewRootImpl都有一个mWindowAttributes窗口属性,该属性在WindowManagerGlobal.updateViewLayout()->ViewRootImpl.setView()和WindowManagerGlobal.updateViewLayout->ViewRootImpl.setLayoutParams()中赋值,同时ViewRootImpl.mWindowAttributesChanged也会设为true表示窗口属性已更改,当窗口属性更改时,surfaceChanged也会设置为true
if (mWindowAttributesChanged) {
mWindowAttributesChanged = false;
surfaceChanged = true;
params = lp;
}
if (surfaceChanged) {
mSurfaceHolderCallback.surfaceChanged(mSurfaceHolder,
lp.format, mWidth, mHeight);
SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
if (callbacks != null) {
for (SurfaceHolder.Callback c : callbacks) {
c.surfaceChanged(mSurfaceHolder, lp.format,
mWidth, mHeight);
}
}
}
上一篇:vba代码阅读
文章标题:ViewRootImpl和WindowManagerService笔记
文章链接:http://soscw.com/essay/32125.html