UI Framework-1: Aura Graphics Architecture
Graphics Architecture
OverviewEach Aura Window owns a corresponding compositor layer. The layer tree corresponds roughly to the window tree (though Views also supports layers, so a single Aura Window can have nested Layers created by Views within that Window).
If the Window's layer has a texture that texture is drawn by the compositor. Aura is transitioning to using the Chromium Compositor ("CC"). At time of writing CC is part of WebKit, but there is a nascent effort to extract it into its own library within Chromium.
The Compositor maintains two trees of layers, one on the UI thread and one (optionally) on the Compositor thread. This improves performance for animations and interactive events like scrolling. See CC documentation for more information. The CC library talks to the GPU process via command buffer to do the final rendered output.
Pre-Layer Tree Unification WorldAt the time of writing we have two layer trees, one for the UI and one for content from the renderer process. The renderer process uses WebLayer directly, while the UI wraps it in a class ui::Layer in ui/compositor, which provides some additional utilities useful to Aura and Views.
Once CC is extracted into a standalone library we will explore replacing ui::Layer functionality with direct use of CCLayer.
Paint Scheduling/Draw FlowThroughout these documents and in the source code you will see references to paint and draw. Paint is an operation performed mostly by the Views system to update the contents of the windows... this is a typically a software operation to update the contents of a Skia canvas. Draw is an operation performed by the compositor to draw the contents of layers' textures to the screen, including potentially compositing some of them against each other.
A draw can be triggered by two sources: the underlying native window owned by the RootWindowHost can be sent a redraw notification from the system (e.g. WM_PAINT or Expose), or an application event can trigger a redraw by calling ScheduleDraw() on any number of framework objects (Compositor, RootWindow, etc). In the latter case a task is posted that calls Draw(). Layer also supports a method SchedulePaint(), which is exposed through Window and also NativeWidgetAura and used by Views when some sub-region of the layer is to be marked invalid. The layer stores the current invalid rect which is a union of all invalid rects specified since the last validation.
When the compositor draws, it performs a depth-first walk of the layer tree, and if any of the layers it encounters has an invalid rectangle, it is asked to repaint its contents. The compositor does this via WebKit::WebContentLayerClient, implemented by ui::Layer. The layer asks its delegate to repaint via a call of OnPaintLayer() which takes a Skia canvas sized to the invalid rect. In Aura, the delegate is the Window, and the Window asks its delegate to repaint. In production this is often a NativeWidgetAura, a Views type. As mentioned earlier, Views can also have layers directly, and as such a View can also be a layer's delegate.
Once the draw is complete the invalid region is validated so no further paint notifications are sent until explicitly requested by a subsequent invalidation.
|
UI Framework-1: Aura Graphics Architecture的更多相关文章
- Hybrid UI framework shootout: Ionic vs. Famo.us vs. F7 vs. OnsenUI
1 Introduction In the past 2 years I’ve been working intensively on mobile applications, mostly hybr ...
- 00 - Vue3 UI Framework - 阅读辅助列表
阅读列表 01 - Vue3 UI Framework - 开始 02 - Vue3 UI Framework - 顶部边栏 03 - Vue3 UI Framework - 首页 04 - Vue3 ...
- [转]Ionic – Mobile UI Framework for PhoneGap/Cordova Developers
本文转自:http://devgirl.org/2014/01/20/ionic-mobile-ui-framework-for-phonegapcordova-developers/ Ionic i ...
- 关于apicloud ios自定义模块引用第三方framework not found for architecture armv7
1 .自定义模块 新建模块必须是静态库 2.使用的第三方framework 必须要把 .h文件开放出来 3.编译要用 真机模式 (上传模块以后,自定义load要编译,用生成的二维码调试) 4. 添加监 ...
- 05 - Vue3 UI Framework - Button 组件
官网基本做好了,接下来开始做核心组件 返回阅读列表点击 这里 目录准备 在项目 src 目录下创建 lib 文件夹,用来存放所有的核心组件吧.然后再在 lib 文件夹下创建 Button.vue 文件 ...
- 01 - Vue3 UI Framework - 开始
写在前面 一年多没写过博客了,工作.生活逐渐磨平了棱角. 写代码容易,写博客难,坚持写高水平的技术博客更难. 技术控决定慢慢拾起这份坚持,用作技术学习的阶段性总结. 返回阅读列表点击 这里 开始 大前 ...
- 03 - Vue3 UI Framework - 首页
顶部边栏做完了,接下来开始做官网的首页 返回阅读列表点击 这里 创建视图文件夹 让我们先新建一个 src/views 文件夹,用来存放官网的主要视图 然后在该文件夹下新建两个 vue 文件,作为我们的 ...
- 07- Vue3 UI Framework - Switch 组件
为了更好的提升用户体验,我们这里再做一个很常用的开关组件 switch 返回阅读列表点击 这里 需求分析 开始之前我们先做一个简单的需求分析 switch 组件应分为选中/未被选中,两种状态 可以通过 ...
- 08 - Vue3 UI Framework - Input 组件
接下来再做一个常用的组件 - input 组件 返回阅读列表点击 这里 需求分析 开始之前我们先做一个简单的需求分析 input 组件有两种类型,即 input 和 textarea 类型 当类型为 ...
随机推荐
- SQL Server查询数据库空间分配情况、数据库备份信息
查询数据库空间分配情况: use master go create procedure dbo.proc_getdbspaceused as begin set nocount on create t ...
- SQL SERVER 将一个数据库中的表和数据复制到另一个数据库中
第一种情况:将A数据库.dbo.A表的数据追加到B数据库.dbo.B表中 (条件:此时B数据库中已创建好了B表) insert into B数据库.dbo.B表 select * from A数据库. ...
- POJ 1852 Ants O(n)
题目: 思路:蚂蚁相碰和不相碰的情况是一样的,相当于交换位置继续走. 代码: #include <iostream> #include <cstdio> #include &l ...
- PostgreSQL 数据库性能调优的注意点
PostgreSQL提供了一些性能调优的功能.主要有如下几个方面.1.使用EXPLAIN EXPLAIN命令可以查看执行计划,这个方法是我们最主要的调试工具. 2.及时更新执行计划中使用的统计信息 ...
- HDU 3015 Disharmony Trees 【 树状数组 】
题意:给出n棵树,给出横坐标x,还有它们的高度h,先按照横坐标排序,则它们的横坐标记为xx, 再按照它们的高度排序,记为hh 两颗树的差异度为 abs(xx[i] - xx[j]) * min(hh[ ...
- 定时清理clientmqueue目录垃圾文件防止占满磁盘空间
RedHat/CentOS 5.8 默认就有sendmail,而6.4默认没有. 手动清理方法: find /var/spool/clientmqueue/ -type f|xargs rm -f ...
- RocketMQ学习笔记(3)----RocketMQ物理结构和逻辑部署结构
1. RocketMQ的物理结构 RecketMQ网络部署的特点: Name Server是一个几乎无状态特点,可集群部署,节点之间无任何信息同步的(相对于zookeeper是较为轻量级的). Bro ...
- 【BZOJ4444】国旗计划 - 决策单调性
Description A国正在开展一项伟大的计划——国旗计划.这项计划的内容是边防战士手举国旗环绕边境线奔袭一圈.这项计划需要多名边防战士以接力的形式共同完成,为此,国土安全局已经挑选了N名优秀的边 ...
- 【Educational Codeforces Round 41 (Rated for Div. 2) D】Pair Of Lines
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 如果点的个数<=3 那么直接输出有解. 否则. 假设1,2最后会在一条直线上,则把这条直线上的点都删掉. 看看剩余的点是否在同 ...
- 洛谷—— P1855 榨取kkksc03
https://www.luogu.org/problem/show?pid=1855 题目描述 洛谷2的团队功能是其他任何oj和工具难以达到的.借助洛谷强大的服务器资源,任何学校都可以在洛谷上零成本 ...