SurfaceFlinger事务处理

更新时间:2023-05-03 04:27:20 阅读: 评论:0

if (transactionFlags & eDisplayTransactionNeeded) {
}
if (transactionFlags & (eTraversalNeeded|eDisplayTransactionNeeded)) {
// The transform hint might have changed for some layers
// (either becau a display has changed, or becau a layer
// as changed).
//
// Walk through all the layers in currentLayers,
// and update their transform hint.
//
// If a layer is visible only on a single display, then that
/
/英语手抄报四年级上册 display is ud to calculate the hint, otherwi we u the
// default di甩蛋歌 splay.
//
// NOTE: we do this here, rather than in rebuildLayerStacks() so that
// the hint is t before we acquire a buffer from the surface texture.
//
// NOTE: layer transactions have taken place already, so we u their
// drawing state. However, SurfaceFlinger's own transaction has not
// happened yet, so we must u the current state layer list
// (soon to become the drawing state list).
//
sp<const DisplayDevice> disp;
uint32_t currentlayerStack = 0;
for (size_t i=0; i<count; i++) {
// NOTE: we rely on the fact that layers are sorted by
// layerStack first (so we don't h残疾人励志故事 ave to traver the list
// of displays for every layer).
const sp<Layer>& layer(currentLayers[i]);
//获得Layer的 layer stack
uint32_t layerStack = layer->getDrawingState().layerStack;
//通过遍历所有的Display来找到Layer所在的显⽰屏
if (i==0 || currentlayerStack != layerStack) {
currentlayerStack = layerStack;
// figure out if this layerstack is mirrored
// (more than one display) if so, pick the default display,
// if not, pick the only display it's on.
disp.clear();
for (size_t dpy=0 ; dpy<mDisplays.size() ; dpy++) {
sp<const DisplayDevice> hw(mDisplays[dpy]);
if (hw->getLayerStack() == currentlayerSt别有用心的意思 ack) {
if (dis鸡蛋饼 p == NULL) {
disp = hw;
} el {
disp = NULL;
break;
}
}
}
}
if (disp == NULL) {
// NOTE: TEMPORARY FIX ONLY. Real fix should cau layers to
// redraw after transform hint changes. See bug 8508397.
// could be null when this layer is using a layerStack
// that is not visible on any display. Also can occur at
/
/ screen off/on times.
disp = getDefaultDisplayDevice();
}
//更新Layer的旋花胶煲鸡 转⽅向,最终会体现在 BufferQueueCore中的mTransformHint变量            layer->updateTransformHint(disp);
}
}
/*
* Perform our own transaction if needed
*/
//前⾯都是执⾏的Layer相关的事务
//下⾯就是执⾏SurfaceFlinger⾃⼰的事务
const LayerVector& layers(mDrawingState.layersSortedByZ);
if (currentLayers.size() > layers.size()) {

本文发布于:2023-05-03 04:27:20,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/853306.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:相关   事务
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图