Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
18e43c93
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
18e43c93
编写于
8月 10, 2016
作者:
A
Adam Barth
提交者:
GitHub
8月 10, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Get //flutter/flow building on Fuchsia (#2899)
上级
4a972e2d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
54 addition
and
10 deletion
+54
-10
BUILD.gn
BUILD.gn
+1
-1
flow/BUILD.gn
flow/BUILD.gn
+10
-2
flow/layers/child_scene_layer.cc
flow/layers/child_scene_layer.cc
+27
-3
flow/open_gl.h
flow/open_gl.h
+4
-4
skia/BUILD.gn
skia/BUILD.gn
+12
-0
未找到文件。
BUILD.gn
浏览文件 @
18e43c93
...
...
@@ -2,11 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This target will be built if no target is specified when invoking ninja.
group("flutter") {
testonly = true
deps = [
"//flutter/flow",
"//flutter/glue",
]
...
...
flow/BUILD.gn
浏览文件 @
18e43c93
...
...
@@ -47,9 +47,17 @@ source_set("flow") {
deps = [
"//flutter/glue",
"//flutter/skia",
"//lib/ftl",
"//mojo/services/gfx/composition/interfaces",
"//mojo/skia",
"//flutter/skia",
]
if (is_fuchsia) {
# TODO(abarth): In principle, we should add "//mojo/public/c/gpu" as a
# dependency, but that doesn't work currently because GPU support on Fuchsia
# is still a work in progress.
include_dirs = [
"//mojo/public/c/gpu",
]
}
}
flow/layers/child_scene_layer.cc
浏览文件 @
18e43c93
...
...
@@ -4,13 +4,37 @@
#include "flutter/flow/layers/child_scene_layer.h"
#include "mojo/skia/type_converters.h"
namespace
flow
{
namespace
{
mojo
::
TransformPtr
GetTransformFromSkMatrix
(
const
SkMatrix
&
input
)
{
// Expand 3x3 to 4x4.
auto
output
=
mojo
::
Transform
::
New
();
output
->
matrix
.
resize
(
16u
);
output
->
matrix
[
0
]
=
input
[
0
];
output
->
matrix
[
1
]
=
input
[
1
];
output
->
matrix
[
2
]
=
0.
f
;
output
->
matrix
[
3
]
=
input
[
2
];
output
->
matrix
[
4
]
=
input
[
3
];
output
->
matrix
[
5
]
=
input
[
4
];
output
->
matrix
[
6
]
=
0.
f
;
output
->
matrix
[
7
]
=
input
[
5
];
output
->
matrix
[
8
]
=
0.
f
;
output
->
matrix
[
9
]
=
0.
f
;
output
->
matrix
[
10
]
=
1.
f
;
output
->
matrix
[
11
]
=
0.
f
;
output
->
matrix
[
12
]
=
input
[
6
];
output
->
matrix
[
13
]
=
input
[
7
];
output
->
matrix
[
14
]
=
0.
f
;
output
->
matrix
[
15
]
=
input
[
8
];
return
output
.
Pass
();
}
// TODO(abarth): We need to figure out how to allocate these ids sensibly.
static
uint32_t
next_id
=
10
;
}
// namespace
ChildSceneLayer
::
ChildSceneLayer
()
:
device_pixel_ratio_
(
1.0
f
)
{}
ChildSceneLayer
::~
ChildSceneLayer
()
{}
...
...
@@ -42,7 +66,7 @@ void ChildSceneLayer::UpdateScene(mojo::gfx::composition::SceneUpdate* update,
child_node
->
content_clip
=
mojo
::
RectF
::
New
();
child_node
->
content_clip
->
width
=
physical_size_
.
width
();
child_node
->
content_clip
->
height
=
physical_size_
.
height
();
child_node
->
content_transform
=
mojo
::
Transform
::
From
(
transform_
);
child_node
->
content_transform
=
GetTransformFromSkMatrix
(
transform_
);
update
->
nodes
.
insert
(
id
,
child_node
.
Pass
());
container
->
child_node_ids
.
push_back
(
id
);
}
...
...
flow/open_gl.h
浏览文件 @
18e43c93
...
...
@@ -7,19 +7,19 @@
#include "lib/ftl/build_config.h"
#if
OS_IOS
#if
defined(OS_IOS)
#include <OpenGLES/ES2/gl.h>
#elif
OS_MACOSX
#elif
defined(OS_MACOSX)
#include <OpenGL/gl.h>
#elif
OS_ANDROID
#elif
defined(OS_ANDROID) || defined(OS_FUCHSIA)
#include <GLES2/gl2.h>
#elif
OS_LINUX
#elif
defined(OS_LINUX)
#include <GL/gl.h>
...
...
skia/BUILD.gn
浏览文件 @
18e43c93
...
...
@@ -2,6 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if (is_fuchsia) {
group("skia") {
# TODO(abarth): Switch the non-Fuchsia build over to using Skia's BUILD.gn
# files as well.
public_deps = [ "//third_party/skia" ]
}
} else {
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//testing/test.gni")
...
...
@@ -553,3 +563,5 @@ source_set("skia_opts") {
visibility = [ ":skia" ]
}
} # if (is_fuchsia)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录