当前位置:网站首页>[Wayland] Weston multi screen display
[Wayland] Weston multi screen display
2022-06-12 10:09:00 【Lindo】
Weston Multi screen display
- Weston Multi screen display is supported by default ( For example, front screen + Rear screen )

- output An object can be understood as a logical screen , about DRM, Its information is via drmModeGetResources Interface to get .
- View There are two members in the structure to Record output Information , A preservation output Object as primary output, One is used to record the current View According to the output Information .
struct weston_view {
// Omit
/* * The primary output for this view. * Used for picking the output for driving internal animations on the * view, inheriting the primary output for related views in shells, etc. */
struct weston_output *output;
/* * A more complete representation of all outputs this surface is * displayed on. */
uint32_t output_mask;
}
- weston_view_assign_output Function is responsible for view Distribute output object .
static void
weston_view_assign_output(struct weston_view *ev)
{
struct weston_compositor *ec = ev->surface->compositor;
struct weston_output *output, *new_output;
pixman_region32_t region;
uint32_t max, area, mask;
pixman_box32_t *e;
new_output = NULL;
max = 0;
mask = 0;
pixman_region32_init(®ion);
wl_list_for_each(output, &ec->output_list, link) {
if (output->destroying)
continue;
pixman_region32_intersect(®ion, &ev->transform.boundingbox,
&output->region);
e = pixman_region32_extents(®ion);
area = (e->x2 - e->x1) * (e->y2 - e->y1);
// Calculation mask
if (area > 0)
mask |= 1u << output->id;
// choice output
if (area >= max) {
new_output = output;
max = area;
}
}
pixman_region32_fini(®ion);
// Distribute output
ev->output = new_output;
// Record mask
ev->output_mask = mask;
weston_surface_assign_output(ev->surface);
}
- Process according to the above code , Select... For the largest display area output, As primary output. When there are two output( Two screens ) According to the information in the figure above ,mask The processing is as follows
- output0 Of id by 0, 1 Move left 0 position , obtain 1. Then with 0 do | operation . Final mask by 0001( Binary system )
- output1 Of id by 1,1 Move left 1 position , wait until 2. Then with 0001 do | function . Final mask by 0011( Binary system ).
- Empathy , If there are four output, that mask The value of is 1111( Binary system ).
- Processing of the composite part : About multi screen compositing , In fact, the single screen is mostly the same . Just a little more , To show output The judgment of the .
- weston_surface_schedule_repaint: Redraw operation ,surface commit and surface damage Will trigger this function .
/** * \param surface The surface to be repainted * * Marks the output(s) that the surface is shown on as needing to be * repainted. See weston_output_schedule_repaint(). */
WL_EXPORT void
weston_surface_schedule_repaint(struct weston_surface *surface)
{
struct weston_output *output;
wl_list_for_each(output, &surface->compositor->output_list, link)
// such as output->id by 0 output_mask by 0001
// Below Judge , Would pass . This triggers the selected output Conduct repaint
if (surface->output_mask & (1u << output->id))
weston_output_schedule_repaint(output);
}
边栏推荐
- UE4_以现成资源探索创建背景场景的方法
- Papaya Mobile has a comprehensive layout of cross-border e-commerce SaaS papaya orange. What are the opportunities for this new track?
- 价值投资.
- 在线电路仿真以及开源电子硬件设计介绍
- redis学习记录:字典(dict)源码分析
- There is always a negative line (upper shadow line) that will stop the advance of many armies, and there is always a positive line (lower shadow line) that will stop the rampant bombing of the air for
- PostgreSQL uses stored procedures to splice multiple tables and query data
- 2022 pole technology communication - anmou technology ushers in new opportunities for development
- The white paper "protecting our digital heritage: DNA data storage" was released
- Jetpack architecture component learning (3) -- activity results API usage
猜你喜欢

Introduction to on-line circuit simulation and open source electronic hardware design

奇葩错误 -- 轮廓检测检测到边框、膨胀腐蚀开闭运算效果颠倒
![Data processing and visualization of machine learning [iris data classification | feature attribute comparison]](/img/a3/1d181b9dd5268e13cc276a78862d1f.png)
Data processing and visualization of machine learning [iris data classification | feature attribute comparison]

Combat tactics based on CEPH object storage

Auto. JS learning notes 7: JS file calls functions and variables in another JS file to solve various problems of call failure

SAP Hana error message sys_ XSA authentication failed SQLSTATE - 28000

行业分析怎么做

In 2026, the capacity of China's software defined storage market will be close to US $4.51 billion
![[Wayland] Wayland agreement description](/img/7b/b2dc41fcd15447252f48d2b61e8d59.jpg)
[Wayland] Wayland agreement description
![[cloud native] what exactly does it mean? This article shares the answer with you](/img/82/f268adcbdbe8195a066d065eb560d7.jpg)
[cloud native] what exactly does it mean? This article shares the answer with you
随机推荐
哈希表的理论讲解
CLAHE in opencv for 16 bit image enhancement display
002: what are the characteristics of the data lake
价值投资.
FPGA基于DE2-115平台的VGA显示
Detailed explanation and use of redis data types: key and string types
[Mozilla] basic concept analysis of IPDL
UE4_以现成资源探索创建背景场景的方法
优质好书助成长 猿辅导携四大出版社推荐“暑期好书”
[cloud native] establishment of Eureka service registration
Li Yang, a scientific and technological innovator and CIO of the world's top 500 group: the success of digital transformation depends on people. Decision makers should always focus on "firewood"
SAP Hana error message sys_ XSA authentication failed SQLSTATE - 28000
High performance computing framework for image processing
Access and traversal of string class objects
June training (day 12) - linked list
原始套接字使用
行业分析怎么做
Dazzle the "library" action - award solicitation from the golden warehouse of the National People's Congress - high availability failover and recovery of kingbasees cluster
2022 pole technology communication - anmou technology ushers in new opportunities for development
Chained hash table