Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
9b752790
E
engine
项目概览
qq_34031325
/
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,发现更多精彩内容 >>
未验证
提交
9b752790
编写于
10月 16, 2020
作者:
R
Ren You
提交者:
GitHub
10月 16, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "[fuchsia] External view embedder will be shared with platform view (#21850)" (#21924)
This reverts commit
1bc025d6
.
上级
787b9c53
变更
32
显示空白变更内容
内联
并排
Showing
32 changed file
with
107 addition
and
146 deletion
+107
-146
flow/layers/child_scene_layer.cc
flow/layers/child_scene_layer.cc
+2
-2
flow/layers/child_scene_layer.h
flow/layers/child_scene_layer.h
+1
-1
flow/layers/clip_path_layer.cc
flow/layers/clip_path_layer.cc
+1
-1
flow/layers/clip_path_layer.h
flow/layers/clip_path_layer.h
+1
-1
flow/layers/clip_rect_layer.cc
flow/layers/clip_rect_layer.cc
+1
-1
flow/layers/clip_rect_layer.h
flow/layers/clip_rect_layer.h
+1
-1
flow/layers/clip_rrect_layer.cc
flow/layers/clip_rrect_layer.cc
+1
-1
flow/layers/clip_rrect_layer.h
flow/layers/clip_rrect_layer.h
+1
-1
flow/layers/container_layer.cc
flow/layers/container_layer.cc
+3
-4
flow/layers/container_layer.h
flow/layers/container_layer.h
+2
-2
flow/layers/fuchsia_layer_unittests.cc
flow/layers/fuchsia_layer_unittests.cc
+6
-6
flow/layers/layer.cc
flow/layers/layer.cc
+2
-2
flow/layers/layer.h
flow/layers/layer.h
+1
-1
flow/layers/layer_tree.cc
flow/layers/layer_tree.cc
+3
-3
flow/layers/layer_tree.h
flow/layers/layer_tree.h
+1
-1
flow/layers/opacity_layer.cc
flow/layers/opacity_layer.cc
+4
-4
flow/layers/opacity_layer.h
flow/layers/opacity_layer.h
+1
-1
flow/layers/platform_view_layer.cc
flow/layers/platform_view_layer.cc
+2
-3
flow/layers/platform_view_layer.h
flow/layers/platform_view_layer.h
+1
-1
flow/layers/transform_layer.cc
flow/layers/transform_layer.cc
+1
-1
flow/layers/transform_layer.h
flow/layers/transform_layer.h
+1
-1
flow/scene_update_context.cc
flow/scene_update_context.cc
+34
-36
flow/scene_update_context.h
flow/scene_update_context.h
+7
-9
shell/platform/fuchsia/flutter/compositor_context.cc
shell/platform/fuchsia/flutter/compositor_context.cc
+4
-4
shell/platform/fuchsia/flutter/compositor_context.h
shell/platform/fuchsia/flutter/compositor_context.h
+4
-5
shell/platform/fuchsia/flutter/engine.cc
shell/platform/fuchsia/flutter/engine.cc
+12
-24
shell/platform/fuchsia/flutter/engine.h
shell/platform/fuchsia/flutter/engine.h
+2
-4
shell/platform/fuchsia/flutter/platform_view.cc
shell/platform/fuchsia/flutter/platform_view.cc
+0
-3
shell/platform/fuchsia/flutter/platform_view.h
shell/platform/fuchsia/flutter/platform_view.h
+0
-4
shell/platform/fuchsia/flutter/platform_view_unittest.cc
shell/platform/fuchsia/flutter/platform_view_unittest.cc
+3
-14
shell/platform/fuchsia/flutter/surface.cc
shell/platform/fuchsia/flutter/surface.cc
+2
-2
shell/platform/fuchsia/flutter/surface.h
shell/platform/fuchsia/flutter/surface.h
+2
-2
未找到文件。
flow/layers/child_scene_layer.cc
浏览文件 @
9b752790
...
...
@@ -26,10 +26,10 @@ void ChildSceneLayer::Paint(PaintContext& context) const {
FML_NOTREACHED
();
}
void
ChildSceneLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
ChildSceneLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"ChildSceneLayer::UpdateScene"
);
FML_DCHECK
(
needs_system_composite
());
context
->
UpdateView
(
layer_id_
,
offset_
,
size_
,
hit_testable_
);
context
.
UpdateView
(
layer_id_
,
offset_
,
size_
,
hit_testable_
);
}
}
// namespace flutter
flow/layers/child_scene_layer.h
浏览文件 @
9b752790
...
...
@@ -26,7 +26,7 @@ class ChildSceneLayer : public Layer {
void
Paint
(
PaintContext
&
context
)
const
override
;
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
private:
zx_koid_t
layer_id_
=
ZX_KOID_INVALID
;
...
...
flow/layers/clip_path_layer.cc
浏览文件 @
9b752790
...
...
@@ -41,7 +41,7 @@ void ClipPathLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
ClipPathLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
ClipPathLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"ClipPathLayer::UpdateScene"
);
FML_DCHECK
(
needs_system_composite
());
...
...
flow/layers/clip_path_layer.h
浏览文件 @
9b752790
...
...
@@ -22,7 +22,7 @@ class ClipPathLayer : public ContainerLayer {
}
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
private:
...
...
flow/layers/clip_rect_layer.cc
浏览文件 @
9b752790
...
...
@@ -36,7 +36,7 @@ void ClipRectLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
ClipRectLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
ClipRectLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"ClipRectLayer::UpdateScene"
);
FML_DCHECK
(
needs_system_composite
());
...
...
flow/layers/clip_rect_layer.h
浏览文件 @
9b752790
...
...
@@ -21,7 +21,7 @@ class ClipRectLayer : public ContainerLayer {
}
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
private:
...
...
flow/layers/clip_rrect_layer.cc
浏览文件 @
9b752790
...
...
@@ -37,7 +37,7 @@ void ClipRRectLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
ClipRRectLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
ClipRRectLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"ClipRRectLayer::UpdateScene"
);
FML_DCHECK
(
needs_system_composite
());
...
...
flow/layers/clip_rrect_layer.h
浏览文件 @
9b752790
...
...
@@ -22,7 +22,7 @@ class ClipRRectLayer : public ContainerLayer {
}
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
private:
...
...
flow/layers/container_layer.cc
浏览文件 @
9b752790
...
...
@@ -98,19 +98,18 @@ void ContainerLayer::CheckForChildLayerBelow(PrerollContext* context) {
// All ContainerLayers make the check in PrerollChildren.
}
void
ContainerLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
ContainerLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
UpdateSceneChildren
(
context
);
}
void
ContainerLayer
::
UpdateSceneChildren
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
ContainerLayer
::
UpdateSceneChildren
(
SceneUpdateContext
&
context
)
{
FML_DCHECK
(
needs_system_composite
());
std
::
optional
<
SceneUpdateContext
::
Frame
>
frame
;
if
(
child_layer_exists_below_
)
{
frame
.
emplace
(
context
,
SkRRect
::
MakeRect
(
paint_bounds
()),
SK_ColorTRANSPARENT
,
SkScalarRoundToInt
(
context
->
alphaf
()
*
255
),
"flutter::ContainerLayer"
);
SkScalarRoundToInt
(
context
.
alphaf
()
*
255
),
"flutter::ContainerLayer"
);
frame
->
AddPaintLayer
(
this
);
}
...
...
flow/layers/container_layer.h
浏览文件 @
9b752790
...
...
@@ -21,7 +21,7 @@ class ContainerLayer : public Layer {
void
Paint
(
PaintContext
&
context
)
const
override
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
CheckForChildLayerBelow
(
PrerollContext
*
context
)
override
;
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
const
std
::
vector
<
std
::
shared_ptr
<
Layer
>>&
layers
()
const
{
return
layers_
;
}
...
...
@@ -33,7 +33,7 @@ class ContainerLayer : public Layer {
void
PaintChildren
(
PaintContext
&
context
)
const
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateSceneChildren
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
);
void
UpdateSceneChildren
(
SceneUpdateContext
&
context
);
#endif
// Try to prepare the raster cache for a given layer.
...
...
flow/layers/fuchsia_layer_unittests.cc
浏览文件 @
9b752790
...
...
@@ -261,7 +261,7 @@ struct TestContext {
std
::
unique_ptr
<
MockSessionWrapper
>
mock_session_wrapper
;
// SceneUpdateContext.
std
::
shared
_ptr
<
SceneUpdateContext
>
scene_update_context
;
std
::
unique
_ptr
<
SceneUpdateContext
>
scene_update_context
;
// PrerollContext.
MutatorsStack
unused_stack
;
...
...
@@ -286,7 +286,7 @@ std::unique_ptr<TestContext> InitTest() {
std
::
make_unique
<
MockSessionWrapper
>
(
std
::
move
(
session_ptr
));
// Init SceneUpdateContext.
context
->
scene_update_context
=
std
::
make_
shared
<
SceneUpdateContext
>
(
context
->
scene_update_context
=
std
::
make_
unique
<
SceneUpdateContext
>
(
"fuchsia_layer_unittest"
,
fuchsia
::
ui
::
views
::
ViewToken
(),
scenic
::
ViewRefPair
::
New
(),
*
(
context
->
mock_session_wrapper
));
...
...
@@ -410,7 +410,7 @@ TEST_F(FuchsiaLayerTest, DISABLED_PhysicalShapeLayersAndChildSceneLayers) {
// Create another frame to be the "real" root. Required because
// UpdateScene() traversal expects there to already be a top node.
SceneUpdateContext
::
Frame
frame
(
test_context
->
scene_update_context
,
SceneUpdateContext
::
Frame
frame
(
*
(
test_context
->
scene_update_context
)
,
SkRRect
::
MakeRect
(
SkRect
::
MakeWH
(
100
,
100
)),
SK_ColorTRANSPARENT
,
SK_AlphaOPAQUE
,
"fuchsia test root"
);
...
...
@@ -555,7 +555,7 @@ TEST_F(FuchsiaLayerTest, DISABLED_PhysicalShapeLayersAndChildSceneLayers) {
// Finally, UpdateScene(). The MockSession will check the emitted commands
// against the list above.
root
->
UpdateScene
(
test_context
->
scene_update_context
);
root
->
UpdateScene
(
*
(
test_context
->
scene_update_context
)
);
test_context
->
mock_session_wrapper
->
Present
();
...
...
@@ -626,7 +626,7 @@ TEST_F(FuchsiaLayerTest, DISABLED_OpacityAndTransformLayer) {
// Create another frame to be the "real" root. Required because
// UpdateScene() traversal expects there to already be a top node.
SceneUpdateContext
::
Frame
frame
(
test_context
->
scene_update_context
,
SceneUpdateContext
::
Frame
frame
(
*
(
test_context
->
scene_update_context
)
,
SkRRect
::
MakeRect
(
SkRect
::
MakeWH
(
100
,
100
)),
SK_ColorTRANSPARENT
,
SK_AlphaOPAQUE
,
"fuchsia test root"
);
...
...
@@ -737,7 +737,7 @@ TEST_F(FuchsiaLayerTest, DISABLED_OpacityAndTransformLayer) {
// Finally, UpdateScene(). The MockSession will check the emitted
// commands against the list above.
root
->
UpdateScene
(
test_context
->
scene_update_context
);
root
->
UpdateScene
(
*
(
test_context
->
scene_update_context
)
);
test_context
->
mock_session_wrapper
->
Present
();
...
...
flow/layers/layer.cc
浏览文件 @
9b752790
...
...
@@ -67,13 +67,13 @@ void Layer::CheckForChildLayerBelow(PrerollContext* context) {
}
}
void
Layer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
Layer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
FML_DCHECK
(
needs_system_composite
());
FML_DCHECK
(
child_layer_exists_below_
);
SceneUpdateContext
::
Frame
frame
(
context
,
SkRRect
::
MakeRect
(
paint_bounds
()),
SK_ColorTRANSPARENT
,
SkScalarRoundToInt
(
context
->
alphaf
()
*
255
),
"flutter::Layer"
);
SkScalarRoundToInt
(
context
.
alphaf
()
*
255
),
"flutter::Layer"
);
frame
.
AddPaintLayer
(
this
);
}
...
...
flow/layers/layer.h
浏览文件 @
9b752790
...
...
@@ -154,7 +154,7 @@ class Layer {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
// Updates the system composited scene.
virtual
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
);
virtual
void
UpdateScene
(
SceneUpdateContext
&
context
);
virtual
void
CheckForChildLayerBelow
(
PrerollContext
*
context
);
#endif
...
...
flow/layers/layer_tree.cc
浏览文件 @
9b752790
...
...
@@ -62,11 +62,11 @@ bool LayerTree::Preroll(CompositorContext::ScopedFrame& frame,
}
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
LayerTree
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
LayerTree
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"LayerTree::UpdateScene"
);
// Reset for a new Scene.
context
->
Reset
();
context
.
Reset
();
const
float
inv_dpr
=
1.0
f
/
device_pixel_ratio_
;
SceneUpdateContext
::
Transform
transform
(
context
,
inv_dpr
,
inv_dpr
,
1.0
f
);
...
...
@@ -82,7 +82,7 @@ void LayerTree::UpdateScene(std::shared_ptr<SceneUpdateContext> context) {
if
(
root_layer_
->
needs_painting
())
{
frame
.
AddPaintLayer
(
root_layer_
.
get
());
}
context
->
root_node
().
AddChild
(
transform
.
entity_node
());
context
.
root_node
().
AddChild
(
transform
.
entity_node
());
}
#endif
...
...
flow/layers/layer_tree.h
浏览文件 @
9b752790
...
...
@@ -32,7 +32,7 @@ class LayerTree {
bool
ignore_raster_cache
=
false
);
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
);
void
UpdateScene
(
SceneUpdateContext
&
context
);
#endif
void
Paint
(
CompositorContext
::
ScopedFrame
&
frame
,
...
...
flow/layers/opacity_layer.cc
浏览文件 @
9b752790
...
...
@@ -85,11 +85,11 @@ void OpacityLayer::Paint(PaintContext& context) const {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
OpacityLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
float
saved_alpha
=
context
->
alphaf
();
context
->
set_alphaf
(
context
->
alphaf
()
*
(
alpha_
/
255.
f
));
void
OpacityLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
float
saved_alpha
=
context
.
alphaf
();
context
.
set_alphaf
(
context
.
alphaf
()
*
(
alpha_
/
255.
f
));
ContainerLayer
::
UpdateScene
(
context
);
context
->
set_alphaf
(
saved_alpha
);
context
.
set_alphaf
(
saved_alpha
);
}
#endif
...
...
flow/layers/opacity_layer.h
浏览文件 @
9b752790
...
...
@@ -32,7 +32,7 @@ class OpacityLayer : public MergedContainerLayer {
void
Paint
(
PaintContext
&
context
)
const
override
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
private:
...
...
flow/layers/platform_view_layer.cc
浏览文件 @
9b752790
...
...
@@ -47,11 +47,10 @@ void PlatformViewLayer::Paint(PaintContext& context) const {
}
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
PlatformViewLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
PlatformViewLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"PlatformViewLayer::UpdateScene"
);
FML_DCHECK
(
needs_system_composite
());
context
->
UpdateView
(
view_id_
,
offset_
,
size_
);
context
.
UpdateView
(
view_id_
,
offset_
,
size_
);
}
#endif
...
...
flow/layers/platform_view_layer.h
浏览文件 @
9b752790
...
...
@@ -19,7 +19,7 @@ class PlatformViewLayer : public Layer {
void
Paint
(
PaintContext
&
context
)
const
override
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
// Updates the system composited scene.
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
private:
...
...
flow/layers/transform_layer.cc
浏览文件 @
9b752790
...
...
@@ -54,7 +54,7 @@ void TransformLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
TransformLayer
::
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
{
void
TransformLayer
::
UpdateScene
(
SceneUpdateContext
&
context
)
{
TRACE_EVENT0
(
"flutter"
,
"TransformLayer::UpdateScene"
);
FML_DCHECK
(
needs_system_composite
());
...
...
flow/layers/transform_layer.h
浏览文件 @
9b752790
...
...
@@ -20,7 +20,7 @@ class TransformLayer : public ContainerLayer {
void
Paint
(
PaintContext
&
context
)
const
override
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
void
UpdateScene
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
override
;
void
UpdateScene
(
SceneUpdateContext
&
context
)
override
;
#endif
private:
...
...
flow/scene_update_context.cc
浏览文件 @
9b752790
...
...
@@ -215,30 +215,29 @@ void SceneUpdateContext::DestroyView(int64_t view_id) {
ViewHolder
::
Destroy
(
view_id
);
}
SceneUpdateContext
::
Entity
::
Entity
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
)
SceneUpdateContext
::
Entity
::
Entity
(
SceneUpdateContext
&
context
)
:
context_
(
context
),
previous_entity_
(
context
->
top_entity_
),
entity_node_
(
context
->
session_
.
get
())
{
context
->
top_entity_
=
this
;
previous_entity_
(
context
.
top_entity_
),
entity_node_
(
context
.
session_
.
get
())
{
context
.
top_entity_
=
this
;
}
SceneUpdateContext
::
Entity
::~
Entity
()
{
if
(
previous_entity_
)
{
previous_entity_
->
embedder_node
().
AddChild
(
entity_node_
);
}
else
{
context_
->
root_node_
.
AddChild
(
entity_node_
);
context_
.
root_node_
.
AddChild
(
entity_node_
);
}
FML_DCHECK
(
context_
->
top_entity_
==
this
);
context_
->
top_entity_
=
previous_entity_
;
FML_DCHECK
(
context_
.
top_entity_
==
this
);
context_
.
top_entity_
=
previous_entity_
;
}
SceneUpdateContext
::
Transform
::
Transform
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
SceneUpdateContext
::
Transform
::
Transform
(
SceneUpdateContext
&
context
,
const
SkMatrix
&
transform
)
:
Entity
(
context
),
previous_scale_x_
(
context
->
top_scale_x_
),
previous_scale_y_
(
context
->
top_scale_y_
)
{
previous_scale_x_
(
context
.
top_scale_x_
),
previous_scale_y_
(
context
.
top_scale_y_
)
{
entity_node
().
SetLabel
(
"flutter::Transform"
);
if
(
!
transform
.
isIdentity
())
{
// TODO(SCN-192): The perspective and shear components in the matrix
...
...
@@ -256,8 +255,8 @@ SceneUpdateContext::Transform::Transform(
decomposition
.
scale
().
y
,
//
1.
f
//
);
context
->
top_scale_x_
*=
decomposition
.
scale
().
x
;
context
->
top_scale_y_
*=
decomposition
.
scale
().
y
;
context
.
top_scale_x_
*=
decomposition
.
scale
().
x
;
context
.
top_scale_y_
*=
decomposition
.
scale
().
y
;
entity_node
().
SetRotation
(
decomposition
.
rotation
().
x
,
//
decomposition
.
rotation
().
y
,
//
...
...
@@ -268,46 +267,45 @@ SceneUpdateContext::Transform::Transform(
}
}
SceneUpdateContext
::
Transform
::
Transform
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
SceneUpdateContext
::
Transform
::
Transform
(
SceneUpdateContext
&
context
,
float
scale_x
,
float
scale_y
,
float
scale_z
)
:
Entity
(
context
),
previous_scale_x_
(
context
->
top_scale_x_
),
previous_scale_y_
(
context
->
top_scale_y_
)
{
previous_scale_x_
(
context
.
top_scale_x_
),
previous_scale_y_
(
context
.
top_scale_y_
)
{
entity_node
().
SetLabel
(
"flutter::Transform"
);
if
(
scale_x
!=
1.
f
||
scale_y
!=
1.
f
||
scale_z
!=
1.
f
)
{
entity_node
().
SetScale
(
scale_x
,
scale_y
,
scale_z
);
context
->
top_scale_x_
*=
scale_x
;
context
->
top_scale_y_
*=
scale_y
;
context
.
top_scale_x_
*=
scale_x
;
context
.
top_scale_y_
*=
scale_y
;
}
}
SceneUpdateContext
::
Transform
::~
Transform
()
{
context
()
->
top_scale_x_
=
previous_scale_x_
;
context
()
->
top_scale_y_
=
previous_scale_y_
;
context
()
.
top_scale_x_
=
previous_scale_x_
;
context
()
.
top_scale_y_
=
previous_scale_y_
;
}
SceneUpdateContext
::
Frame
::
Frame
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
SceneUpdateContext
::
Frame
::
Frame
(
SceneUpdateContext
&
context
,
const
SkRRect
&
rrect
,
SkColor
color
,
SkAlpha
opacity
,
std
::
string
label
)
:
Entity
(
context
),
previous_elevation_
(
context
->
top_elevation_
),
previous_elevation_
(
context
.
top_elevation_
),
rrect_
(
rrect
),
color_
(
color
),
opacity_
(
opacity
),
opacity_node_
(
context
->
session_
.
get
()),
opacity_node_
(
context
.
session_
.
get
()),
paint_bounds_
(
SkRect
::
MakeEmpty
())
{
// Increment elevation trackers before calculating any local elevation.
// |UpdateView| can modify context
->
next_elevation_, which is why it is
// |UpdateView| can modify context
.
next_elevation_, which is why it is
// neccesary to track this addtional state.
context
->
top_elevation_
+=
kScenicZElevationBetweenLayers
;
context
->
next_elevation_
+=
kScenicZElevationBetweenLayers
;
context
.
top_elevation_
+=
kScenicZElevationBetweenLayers
;
context
.
next_elevation_
+=
kScenicZElevationBetweenLayers
;
float
local_elevation
=
context
->
next_elevation_
-
previous_elevation_
;
float
local_elevation
=
context
.
next_elevation_
-
previous_elevation_
;
entity_node
().
SetTranslation
(
0.
f
,
0.
f
,
-
local_elevation
);
entity_node
().
SetLabel
(
label
);
entity_node
().
AddChild
(
opacity_node_
);
...
...
@@ -320,10 +318,10 @@ SceneUpdateContext::Frame::Frame(std::shared_ptr<SceneUpdateContext> context,
}
SceneUpdateContext
::
Frame
::~
Frame
()
{
context
()
->
top_elevation_
=
previous_elevation_
;
context
()
.
top_elevation_
=
previous_elevation_
;
// Add a part which represents the frame's geometry for clipping purposes
context
()
->
CreateFrame
(
entity_node
(),
rrect_
,
color_
,
opacity_
,
paint_bounds_
,
context
()
.
CreateFrame
(
entity_node
(),
rrect_
,
color_
,
opacity_
,
paint_bounds_
,
std
::
move
(
paint_layers_
));
}
...
...
@@ -333,7 +331,7 @@ void SceneUpdateContext::Frame::AddPaintLayer(Layer* layer) {
paint_bounds_
.
join
(
layer
->
paint_bounds
());
}
SceneUpdateContext
::
Clip
::
Clip
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
SceneUpdateContext
::
Clip
::
Clip
(
SceneUpdateContext
&
context
,
const
SkRect
&
shape_bounds
)
:
Entity
(
context
)
{
entity_node
().
SetLabel
(
"flutter::Clip"
);
...
...
flow/scene_update_context.h
浏览文件 @
9b752790
...
...
@@ -46,15 +46,15 @@ class SceneUpdateContext : public flutter::ExternalViewEmbedder {
public:
class
Entity
{
public:
Entity
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
);
Entity
(
SceneUpdateContext
&
context
);
virtual
~
Entity
();
std
::
shared_ptr
<
SceneUpdateContext
>
context
()
{
return
context_
;
}
SceneUpdateContext
&
context
()
{
return
context_
;
}
scenic
::
EntityNode
&
entity_node
()
{
return
entity_node_
;
}
virtual
scenic
::
ContainerNode
&
embedder_node
()
{
return
entity_node_
;
}
private:
std
::
shared_ptr
<
SceneUpdateContext
>
context_
;
SceneUpdateContext
&
context_
;
Entity
*
const
previous_entity_
;
scenic
::
EntityNode
entity_node_
;
...
...
@@ -62,9 +62,8 @@ class SceneUpdateContext : public flutter::ExternalViewEmbedder {
class
Transform
:
public
Entity
{
public:
Transform
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
const
SkMatrix
&
transform
);
Transform
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
Transform
(
SceneUpdateContext
&
context
,
const
SkMatrix
&
transform
);
Transform
(
SceneUpdateContext
&
context
,
float
scale_x
,
float
scale_y
,
float
scale_z
);
...
...
@@ -80,7 +79,7 @@ class SceneUpdateContext : public flutter::ExternalViewEmbedder {
// When layer is not nullptr, the frame is associated with a layer subtree
// rooted with that layer. The frame may then create a surface that will be
// retained for that layer.
Frame
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
Frame
(
SceneUpdateContext
&
context
,
const
SkRRect
&
rrect
,
SkColor
color
,
SkAlpha
opacity
,
...
...
@@ -105,8 +104,7 @@ class SceneUpdateContext : public flutter::ExternalViewEmbedder {
class
Clip
:
public
Entity
{
public:
Clip
(
std
::
shared_ptr
<
SceneUpdateContext
>
context
,
const
SkRect
&
shape_bounds
);
Clip
(
SceneUpdateContext
&
context
,
const
SkRect
&
shape_bounds
);
~
Clip
()
=
default
;
};
...
...
shell/platform/fuchsia/flutter/compositor_context.cc
浏览文件 @
9b752790
...
...
@@ -23,7 +23,7 @@ class ScopedFrame final : public flutter::CompositorContext::ScopedFrame {
fml
::
RefPtr
<
fml
::
RasterThreadMerger
>
raster_thread_merger
,
SessionConnection
&
session_connection
,
VulkanSurfaceProducer
&
surface_producer
,
std
::
shared_ptr
<
flutter
::
SceneUpdateContext
>
scene_update_context
)
flutter
::
SceneUpdateContext
&
scene_update_context
)
:
flutter
::
CompositorContext
::
ScopedFrame
(
context
,
surface_producer
.
gr_context
(),
canvas
,
...
...
@@ -39,7 +39,7 @@ class ScopedFrame final : public flutter::CompositorContext::ScopedFrame {
private:
SessionConnection
&
session_connection_
;
VulkanSurfaceProducer
&
surface_producer_
;
std
::
shared_ptr
<
flutter
::
SceneUpdateContext
>
scene_update_context_
;
flutter
::
SceneUpdateContext
&
scene_update_context_
;
flutter
::
RasterStatus
Raster
(
flutter
::
LayerTree
&
layer_tree
,
bool
ignore_raster_cache
)
override
{
...
...
@@ -64,7 +64,7 @@ class ScopedFrame final : public flutter::CompositorContext::ScopedFrame {
// Flush all pending session ops: create surfaces and enqueue session
// Image ops for the frame's paint tasks, then Present.
TRACE_EVENT0
(
"flutter"
,
"SessionPresent"
);
frame_paint_tasks
=
scene_update_context_
->
GetPaintTasks
();
frame_paint_tasks
=
scene_update_context_
.
GetPaintTasks
();
for
(
auto
&
task
:
frame_paint_tasks
)
{
SkISize
physical_size
=
SkISize
::
Make
(
layer_tree
.
device_pixel_ratio
()
*
task
.
scale_x
*
...
...
@@ -142,7 +142,7 @@ class ScopedFrame final : public flutter::CompositorContext::ScopedFrame {
CompositorContext
::
CompositorContext
(
SessionConnection
&
session_connection
,
VulkanSurfaceProducer
&
surface_producer
,
std
::
shared_ptr
<
flutter
::
SceneUpdateContext
>
scene_update_context
)
flutter
::
SceneUpdateContext
&
scene_update_context
)
:
session_connection_
(
session_connection
),
surface_producer_
(
surface_producer
),
scene_update_context_
(
scene_update_context
)
{}
...
...
shell/platform/fuchsia/flutter/compositor_context.h
浏览文件 @
9b752790
...
...
@@ -21,17 +21,16 @@ namespace flutter_runner {
// Fuchsia.
class
CompositorContext
final
:
public
flutter
::
CompositorContext
{
public:
CompositorContext
(
SessionConnection
&
session_connection
,
CompositorContext
(
SessionConnection
&
session_connection
,
VulkanSurfaceProducer
&
surface_producer
,
std
::
shared_ptr
<
flutter
::
SceneUpdateContext
>
scene_update_context
);
flutter
::
SceneUpdateContext
&
scene_update_context
);
~
CompositorContext
()
override
;
private:
SessionConnection
&
session_connection_
;
VulkanSurfaceProducer
&
surface_producer_
;
std
::
shared_ptr
<
flutter
::
SceneUpdateContext
>
scene_update_context_
;
flutter
::
SceneUpdateContext
&
scene_update_context_
;
// |flutter::CompositorContext|
std
::
unique_ptr
<
ScopedFrame
>
AcquireFrame
(
...
...
shell/platform/fuchsia/flutter/engine.cc
浏览文件 @
9b752790
...
...
@@ -9,7 +9,6 @@
#include <zircon/status.h>
#include "../runtime/dart/utils/files.h"
#include "flow/embedded_views.h"
#include "flutter/common/task_runners.h"
#include "flutter/fml/make_copyable.h"
#include "flutter/fml/synchronization/waitable_event.h"
...
...
@@ -139,18 +138,15 @@ Engine::Engine(Delegate& delegate,
surface_producer_
.
emplace
(
session_connection_
->
get
());
#if defined(LEGACY_FUCHSIA_EMBEDDER)
if
(
use_legacy_renderer_
)
{
legacy_external_view_embedder_
=
std
::
make_shared
<
flutter
::
SceneUpdateContext
>
(
thread_label_
,
std
::
move
(
view_token
),
std
::
move
(
view_ref_pair
),
session_connection_
.
value
());
legacy_external_view_embedder_
.
emplace
(
thread_label_
,
std
::
move
(
view_token
),
std
::
move
(
view_ref_pair
),
session_connection_
.
value
());
}
else
#endif
{
external_view_embedder_
=
std
::
make_shared
<
FuchsiaExternalViewEmbedder
>
(
thread_label_
,
std
::
move
(
view_token
),
std
::
move
(
view_ref_pair
),
session_connection_
.
value
(),
surface_producer_
.
value
());
external_view_embedder_
.
emplace
(
thread_label_
,
std
::
move
(
view_token
),
std
::
move
(
view_ref_pair
),
session_connection_
.
value
(),
surface_producer_
.
value
());
}
}));
...
...
@@ -210,7 +206,6 @@ Engine::Engine(Delegate& delegate,
on_update_view_callback
=
std
::
move
(
on_update_view_callback
),
on_destroy_view_callback
=
std
::
move
(
on_destroy_view_callback
),
on_create_surface_callback
=
std
::
move
(
on_create_surface_callback
),
external_view_embedder
=
GetExternalViewEmbedder
(),
vsync_offset
=
product_config
.
get_vsync_offset
(),
vsync_handle
=
vsync_event_
.
get
()](
flutter
::
Shell
&
shell
)
mutable
{
return
std
::
make_unique
<
flutter_runner
::
PlatformView
>
(
...
...
@@ -228,7 +223,6 @@ Engine::Engine(Delegate& delegate,
std
::
move
(
on_update_view_callback
),
std
::
move
(
on_destroy_view_callback
),
std
::
move
(
on_create_surface_callback
),
external_view_embedder
,
// external view embedder
std
::
move
(
vsync_offset
),
// vsync offset
vsync_handle
);
});
...
...
@@ -245,7 +239,7 @@ Engine::Engine(Delegate& delegate,
auto
compositor_context
=
std
::
make_unique
<
flutter_runner
::
CompositorContext
>
(
session_connection_
.
value
(),
surface_producer_
.
value
(),
legacy_external_view_embedder_
);
legacy_external_view_embedder_
.
value
()
);
return
std
::
make_unique
<
flutter
::
Rasterizer
>
(
shell
,
std
::
move
(
compositor_context
));
}
else
{
...
...
@@ -584,28 +578,22 @@ void Engine::DestroyView(int64_t view_id) {
}
std
::
unique_ptr
<
flutter
::
Surface
>
Engine
::
CreateSurface
()
{
return
std
::
make_unique
<
Surface
>
(
thread_label_
,
GetExternalViewEmbedder
(),
surface_producer_
->
gr_context
());
}
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
Engine
::
GetExternalViewEmbedder
()
{
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
external_view_embedder
=
nullptr
;
flutter
::
ExternalViewEmbedder
*
external_view_embedder
=
nullptr
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
if
(
use_legacy_renderer_
)
{
FML_CHECK
(
legacy_external_view_embedder_
);
external_view_embedder
=
legacy_external_view_embedder_
;
external_view_embedder
=
&
legacy_external_view_embedder_
.
value
()
;
}
else
#endif
{
FML_CHECK
(
external_view_embedder_
);
external_view_embedder
=
external_view_embedder_
;
external_view_embedder
=
&
external_view_embedder_
.
value
()
;
}
FML_CHECK
(
external_view_embedder
);
return
external_view_embedder
;
return
std
::
make_unique
<
Surface
>
(
thread_label_
,
external_view_embedder
,
surface_producer_
->
gr_context
());
}
#if !defined(DART_PRODUCT)
...
...
shell/platform/fuchsia/flutter/engine.h
浏览文件 @
9b752790
...
...
@@ -16,7 +16,6 @@
#include <lib/ui/scenic/cpp/view_ref_pair.h>
#include <lib/zx/event.h>
#include "flow/embedded_views.h"
#include "flutter/flow/surface.h"
#include "flutter/fml/macros.h"
#include "flutter/shell/common/shell.h"
...
...
@@ -72,9 +71,9 @@ class Engine final {
std
::
optional
<
SessionConnection
>
session_connection_
;
std
::
optional
<
VulkanSurfaceProducer
>
surface_producer_
;
std
::
shared_ptr
<
FuchsiaExternalViewEmbedder
>
external_view_embedder_
;
std
::
optional
<
FuchsiaExternalViewEmbedder
>
external_view_embedder_
;
#if defined(LEGACY_FUCHSIA_EMBEDDER)
std
::
shared_ptr
<
flutter
::
SceneUpdateContext
>
legacy_external_view_embedder_
;
std
::
optional
<
flutter
::
SceneUpdateContext
>
legacy_external_view_embedder_
;
#endif
std
::
unique_ptr
<
IsolateConfigurator
>
isolate_configurator_
;
...
...
@@ -100,7 +99,6 @@ class Engine final {
void
CreateView
(
int64_t
view_id
,
bool
hit_testable
,
bool
focusable
);
void
UpdateView
(
int64_t
view_id
,
bool
hit_testable
,
bool
focusable
);
void
DestroyView
(
int64_t
view_id
);
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
GetExternalViewEmbedder
();
std
::
unique_ptr
<
flutter
::
Surface
>
CreateSurface
();
...
...
shell/platform/fuchsia/flutter/platform_view.cc
浏览文件 @
9b752790
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flow/embedded_views.h"
#define RAPIDJSON_HAS_STDSTRING 1
#include "platform_view.h"
...
...
@@ -67,7 +66,6 @@ PlatformView::PlatformView(
OnUpdateView
on_update_view_callback
,
OnDestroyView
on_destroy_view_callback
,
OnCreateSurface
on_create_surface_callback
,
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
external_view_embedder
,
fml
::
TimeDelta
vsync_offset
,
zx_handle_t
vsync_event_handle
)
:
flutter
::
PlatformView
(
delegate
,
std
::
move
(
task_runners
)),
...
...
@@ -82,7 +80,6 @@ PlatformView::PlatformView(
on_update_view_callback_
(
std
::
move
(
on_update_view_callback
)),
on_destroy_view_callback_
(
std
::
move
(
on_destroy_view_callback
)),
on_create_surface_callback_
(
std
::
move
(
on_create_surface_callback
)),
external_view_embedder_
(
external_view_embedder
),
ime_client_
(
this
),
vsync_offset_
(
std
::
move
(
vsync_offset
)),
vsync_event_handle_
(
vsync_event_handle
)
{
...
...
shell/platform/fuchsia/flutter/platform_view.h
浏览文件 @
9b752790
...
...
@@ -14,13 +14,11 @@
#include <map>
#include <set>
#include "flow/embedded_views.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/time/time_delta.h"
#include "flutter/shell/common/platform_view.h"
#include "accessibility_bridge.h"
#include "shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.h"
namespace
flutter_runner
{
...
...
@@ -63,7 +61,6 @@ class PlatformView final : public flutter::PlatformView,
OnUpdateView
on_update_view_callback
,
OnDestroyView
on_destroy_view_callback
,
OnCreateSurface
on_create_surface_callback
,
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
view_embedder
,
fml
::
TimeDelta
vsync_offset
,
zx_handle_t
vsync_event_handle
);
...
...
@@ -172,7 +169,6 @@ class PlatformView final : public flutter::PlatformView,
OnUpdateView
on_update_view_callback_
;
OnDestroyView
on_destroy_view_callback_
;
OnCreateSurface
on_create_surface_callback_
;
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
external_view_embedder_
;
int
current_text_input_client_
=
0
;
fidl
::
Binding
<
fuchsia
::
ui
::
input
::
InputMethodEditorClient
>
ime_client_
;
...
...
shell/platform/fuchsia/flutter/platform_view_unittest.cc
浏览文件 @
9b752790
...
...
@@ -184,11 +184,10 @@ TEST_F(PlatformViewTests, CreateSurfaceTest) {
// Test create surface callback function.
sk_sp
<
GrDirectContext
>
gr_context
=
GrDirectContext
::
MakeMock
(
nullptr
,
GrContextOptions
());
std
::
shared_ptr
<
MockExternalViewEmbedder
>
view_embedder
=
std
::
make_shared
<
MockExternalViewEmbedder
>
();
MockExternalViewEmbedder
view_embedder
;
auto
CreateSurfaceCallback
=
[
&
view_embedder
,
gr_context
]()
{
return
std
::
make_unique
<
flutter_runner
::
Surface
>
(
"PlatformViewTest"
,
view_embedder
,
gr_context
.
get
());
"PlatformViewTest"
,
&
view_embedder
,
gr_context
.
get
());
};
auto
platform_view
=
flutter_runner
::
PlatformView
(
...
...
@@ -206,7 +205,6 @@ TEST_F(PlatformViewTests, CreateSurfaceTest) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
CreateSurfaceCallback
,
// on_create_surface_callback,
view_embedder
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -215,7 +213,7 @@ TEST_F(PlatformViewTests, CreateSurfaceTest) {
RunLoopUntilIdle
();
EXPECT_EQ
(
gr_context
.
get
(),
delegate
.
surface
()
->
GetContext
());
EXPECT_EQ
(
view_embedder
.
get
()
,
delegate
.
surface
()
->
GetExternalViewEmbedder
());
EXPECT_EQ
(
&
view_embedder
,
delegate
.
surface
()
->
GetExternalViewEmbedder
());
}
// This test makes sure that the PlatformView correctly registers Scenic
...
...
@@ -250,7 +248,6 @@ TEST_F(PlatformViewTests, SetViewportMetrics) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -383,7 +380,6 @@ TEST_F(PlatformViewTests, ChangesAccessibilitySettings) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -434,7 +430,6 @@ TEST_F(PlatformViewTests, EnableWireframeTest) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -496,7 +491,6 @@ TEST_F(PlatformViewTests, CreateViewTest) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -560,7 +554,6 @@ TEST_F(PlatformViewTests, UpdateViewTest) {
UpdateViewCallback
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -624,7 +617,6 @@ TEST_F(PlatformViewTests, DestroyViewTest) {
nullptr
,
// on_update_view_callback,
DestroyViewCallback
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -685,7 +677,6 @@ TEST_F(PlatformViewTests, ViewEventsTest) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -768,7 +759,6 @@ TEST_F(PlatformViewTests, RequestFocusTest) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
@@ -845,7 +835,6 @@ TEST_F(PlatformViewTests, RequestFocusFailTest) {
nullptr
,
// on_update_view_callback,
nullptr
,
// on_destroy_view_callback,
nullptr
,
// on_create_surface_callback,
nullptr
,
// external_view_embedder,
fml
::
TimeDelta
::
Zero
(),
// vsync_offset
ZX_HANDLE_INVALID
// vsync_event_handle
);
...
...
shell/platform/fuchsia/flutter/surface.cc
浏览文件 @
9b752790
...
...
@@ -14,7 +14,7 @@
namespace
flutter_runner
{
Surface
::
Surface
(
std
::
string
debug_label
,
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
view_embedder
,
flutter
::
ExternalViewEmbedder
*
view_embedder
,
GrDirectContext
*
gr_context
)
:
debug_label_
(
std
::
move
(
debug_label
)),
view_embedder_
(
view_embedder
),
...
...
@@ -53,7 +53,7 @@ SkMatrix Surface::GetRootTransformation() const {
// |flutter::GetViewEmbedder|
flutter
::
ExternalViewEmbedder
*
Surface
::
GetExternalViewEmbedder
()
{
return
view_embedder_
.
get
()
;
return
view_embedder_
;
}
}
// namespace flutter_runner
shell/platform/fuchsia/flutter/surface.h
浏览文件 @
9b752790
...
...
@@ -16,14 +16,14 @@ namespace flutter_runner {
class
Surface
final
:
public
flutter
::
Surface
{
public:
Surface
(
std
::
string
debug_label
,
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
view_embedder
,
flutter
::
ExternalViewEmbedder
*
view_embedder
,
GrDirectContext
*
gr_context
);
~
Surface
()
override
;
private:
const
std
::
string
debug_label_
;
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
view_embedder_
;
flutter
::
ExternalViewEmbedder
*
view_embedder_
;
GrDirectContext
*
gr_context_
;
// |flutter::Surface|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录