Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
8877efd4
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8877efd4
编写于
3月 04, 2016
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2460 from abarth/mozart_hit_testing
Enable Mozart hit testing
上级
34f81b18
e4168664
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
10 deletion
+7
-10
sky/shell/gpu/mojo/rasterizer_mojo.cc
sky/shell/gpu/mojo/rasterizer_mojo.cc
+7
-10
未找到文件。
sky/shell/gpu/mojo/rasterizer_mojo.cc
浏览文件 @
8877efd4
...
...
@@ -14,7 +14,6 @@ namespace shell {
const
uint32_t
kContentImageResourceId
=
1
;
const
uint32_t
kRootNodeId
=
mojo
::
gfx
::
composition
::
kSceneRootNodeId
;
const
uint32_t
kBackgroundNodeId
=
1
;
std
::
unique_ptr
<
Rasterizer
>
Rasterizer
::
Create
()
{
return
std
::
unique_ptr
<
Rasterizer
>
(
new
RasterizerMojo
());
...
...
@@ -88,18 +87,16 @@ void RasterizerMojo::Draw(uint64_t layer_tree_ptr,
update
->
clear_resources
=
true
;
update
->
clear_nodes
=
true
;
update
->
resources
.
insert
(
kContentImageResourceId
,
resource
.
Pass
());
auto
background_node
=
mojo
::
gfx
::
composition
::
Node
::
New
();
background_node
->
op
=
mojo
::
gfx
::
composition
::
NodeOp
::
New
();
background_node
->
op
->
set_image
(
mojo
::
gfx
::
composition
::
ImageNodeOp
::
New
());
background_node
->
op
->
get_image
()
->
content_rect
=
mojo
::
Rect
::
New
();
background_node
->
op
->
get_image
()
->
content_rect
->
width
=
size
.
width
;
background_node
->
op
->
get_image
()
->
content_rect
->
height
=
size
.
height
;
background_node
->
op
->
get_image
()
->
image_resource_id
=
kContentImageResourceId
;
update
->
nodes
.
insert
(
kBackgroundNodeId
,
background_node
.
Pass
());
auto
root_node
=
mojo
::
gfx
::
composition
::
Node
::
New
();
root_node
->
op
=
mojo
::
gfx
::
composition
::
NodeOp
::
New
();
root_node
->
op
->
set_image
(
mojo
::
gfx
::
composition
::
ImageNodeOp
::
New
());
root_node
->
op
->
get_image
()
->
content_rect
=
mojo
::
Rect
::
New
();
root_node
->
op
->
get_image
()
->
content_rect
->
width
=
size
.
width
;
root_node
->
op
->
get_image
()
->
content_rect
->
height
=
size
.
height
;
root_node
->
op
->
get_image
()
->
image_resource_id
=
kContentImageResourceId
;
root_node
->
hit_test_behavior
=
mojo
::
gfx
::
composition
::
HitTestBehavior
::
New
();
root_node
->
combinator
=
mojo
::
gfx
::
composition
::
Node
::
Combinator
::
PRUNE
;
root_node
->
child_node_ids
.
push_back
(
kBackgroundNodeId
);
layer_tree
->
UpdateScene
(
update
.
get
(),
root_node
.
get
());
update
->
nodes
.
insert
(
kRootNodeId
,
root_node
.
Pass
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录