Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
6e95e005
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,发现更多精彩内容 >>
未验证
提交
6e95e005
编写于
11月 06, 2020
作者:
K
Kaushik Iska
提交者:
GitHub
11月 06, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Platform views have CreateExternalViewEmbedder (#22214)
上级
d5b4f642
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
64 addition
and
0 deletion
+64
-0
shell/common/platform_view.cc
shell/common/platform_view.cc
+7
-0
shell/common/platform_view.h
shell/common/platform_view.h
+3
-0
shell/common/shell_test_platform_view_gl.cc
shell/common/shell_test_platform_view_gl.cc
+6
-0
shell/common/shell_test_platform_view_gl.h
shell/common/shell_test_platform_view_gl.h
+3
-0
shell/common/shell_test_platform_view_vulkan.cc
shell/common/shell_test_platform_view_vulkan.cc
+6
-0
shell/common/shell_test_platform_view_vulkan.h
shell/common/shell_test_platform_view_vulkan.h
+3
-0
shell/platform/android/platform_view_android.cc
shell/platform/android/platform_view_android.cc
+6
-0
shell/platform/android/platform_view_android.h
shell/platform/android/platform_view_android.h
+3
-0
shell/platform/darwin/ios/platform_view_ios.h
shell/platform/darwin/ios/platform_view_ios.h
+3
-0
shell/platform/darwin/ios/platform_view_ios.mm
shell/platform/darwin/ios/platform_view_ios.mm
+5
-0
shell/platform/embedder/platform_view_embedder.cc
shell/platform/embedder/platform_view_embedder.cc
+6
-0
shell/platform/embedder/platform_view_embedder.h
shell/platform/embedder/platform_view_embedder.h
+3
-0
shell/platform/fuchsia/flutter/platform_view.cc
shell/platform/fuchsia/flutter/platform_view.cc
+6
-0
shell/platform/fuchsia/flutter/platform_view.h
shell/platform/fuchsia/flutter/platform_view.h
+4
-0
未找到文件。
shell/common/platform_view.cc
浏览文件 @
6e95e005
...
...
@@ -136,6 +136,13 @@ std::unique_ptr<Surface> PlatformView::CreateRenderingSurface() {
return
nullptr
;
}
std
::
shared_ptr
<
ExternalViewEmbedder
>
PlatformView
::
CreateExternalViewEmbedder
()
{
FML_DLOG
(
WARNING
)
<<
"This platform doesn't support embedding external views."
;
return
nullptr
;
}
void
PlatformView
::
SetNextFrameCallback
(
const
fml
::
closure
&
closure
)
{
if
(
!
closure
)
{
return
;
...
...
shell/common/platform_view.h
浏览文件 @
6e95e005
...
...
@@ -7,6 +7,7 @@
#include <memory>
#include "flow/embedded_views.h"
#include "flutter/common/task_runners.h"
#include "flutter/flow/surface.h"
#include "flutter/flow/texture.h"
...
...
@@ -593,6 +594,8 @@ class PlatformView {
// GPU task runner.
virtual
std
::
unique_ptr
<
Surface
>
CreateRenderingSurface
();
virtual
std
::
shared_ptr
<
ExternalViewEmbedder
>
CreateExternalViewEmbedder
();
private:
FML_DISALLOW_COPY_AND_ASSIGN
(
PlatformView
);
};
...
...
shell/common/shell_test_platform_view_gl.cc
浏览文件 @
6e95e005
...
...
@@ -37,6 +37,12 @@ std::unique_ptr<Surface> ShellTestPlatformViewGL::CreateRenderingSurface() {
return
std
::
make_unique
<
GPUSurfaceGL
>
(
this
,
true
);
}
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
ShellTestPlatformViewGL
::
CreateExternalViewEmbedder
()
{
return
shell_test_external_view_embedder_
;
}
// |PlatformView|
PointerDataDispatcherMaker
ShellTestPlatformViewGL
::
GetDispatcherMaker
()
{
return
[](
DefaultPointerDataDispatcher
::
Delegate
&
delegate
)
{
...
...
shell/common/shell_test_platform_view_gl.h
浏览文件 @
6e95e005
...
...
@@ -40,6 +40,9 @@ class ShellTestPlatformViewGL : public ShellTestPlatformView,
// |PlatformView|
std
::
unique_ptr
<
Surface
>
CreateRenderingSurface
()
override
;
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
// |PlatformView|
std
::
unique_ptr
<
VsyncWaiter
>
CreateVSyncWaiter
()
override
;
...
...
shell/common/shell_test_platform_view_vulkan.cc
浏览文件 @
6e95e005
...
...
@@ -39,6 +39,12 @@ std::unique_ptr<Surface> ShellTestPlatformViewVulkan::CreateRenderingSurface() {
shell_test_external_view_embedder_
);
}
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
ShellTestPlatformViewVulkan
::
CreateExternalViewEmbedder
()
{
return
shell_test_external_view_embedder_
;
}
// |PlatformView|
PointerDataDispatcherMaker
ShellTestPlatformViewVulkan
::
GetDispatcherMaker
()
{
return
[](
DefaultPointerDataDispatcher
::
Delegate
&
delegate
)
{
...
...
shell/common/shell_test_platform_view_vulkan.h
浏览文件 @
6e95e005
...
...
@@ -76,6 +76,9 @@ class ShellTestPlatformViewVulkan : public ShellTestPlatformView {
// |PlatformView|
std
::
unique_ptr
<
Surface
>
CreateRenderingSurface
()
override
;
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
// |PlatformView|
std
::
unique_ptr
<
VsyncWaiter
>
CreateVSyncWaiter
()
override
;
...
...
shell/platform/android/platform_view_android.cc
浏览文件 @
6e95e005
...
...
@@ -307,6 +307,12 @@ std::unique_ptr<Surface> PlatformViewAndroid::CreateRenderingSurface() {
return
android_surface_
->
CreateGPUSurface
();
}
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
PlatformViewAndroid
::
CreateExternalViewEmbedder
()
{
return
external_view_embedder_
;
}
// |PlatformView|
sk_sp
<
GrDirectContext
>
PlatformViewAndroid
::
CreateResourceContext
()
const
{
if
(
!
android_surface_
)
{
...
...
shell/platform/android/platform_view_android.h
浏览文件 @
6e95e005
...
...
@@ -127,6 +127,9 @@ class PlatformViewAndroid final : public PlatformView {
// |PlatformView|
std
::
unique_ptr
<
Surface
>
CreateRenderingSurface
()
override
;
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
// |PlatformView|
sk_sp
<
GrDirectContext
>
CreateResourceContext
()
const
override
;
...
...
shell/platform/darwin/ios/platform_view_ios.h
浏览文件 @
6e95e005
...
...
@@ -140,6 +140,9 @@ class PlatformViewIOS final : public PlatformView {
// |PlatformView|
std
::
unique_ptr
<
Surface
>
CreateRenderingSurface
()
override
;
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
// |PlatformView|
sk_sp
<
GrDirectContext
>
CreateResourceContext
()
const
override
;
...
...
shell/platform/darwin/ios/platform_view_ios.mm
浏览文件 @
6e95e005
...
...
@@ -140,6 +140,11 @@ std::unique_ptr<Surface> PlatformViewIOS::CreateRenderingSurface() {
return
ios_surface_
->
CreateGPUSurface
();
}
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
PlatformViewIOS
::
CreateExternalViewEmbedder
()
{
return
ios_surface_factory_
->
GetExternalViewEmbedder
();
}
// |PlatformView|
sk_sp
<
GrDirectContext
>
PlatformViewIOS
::
CreateResourceContext
()
const
{
return
ios_context_
->
CreateResourceContext
();
...
...
shell/platform/embedder/platform_view_embedder.cc
浏览文件 @
6e95e005
...
...
@@ -77,6 +77,12 @@ std::unique_ptr<Surface> PlatformViewEmbedder::CreateRenderingSurface() {
return
embedder_surface_
->
CreateGPUSurface
();
}
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
PlatformViewEmbedder
::
CreateExternalViewEmbedder
()
{
return
external_view_embedder_
;
}
// |PlatformView|
sk_sp
<
GrDirectContext
>
PlatformViewEmbedder
::
CreateResourceContext
()
const
{
if
(
embedder_surface_
==
nullptr
)
{
...
...
shell/platform/embedder/platform_view_embedder.h
浏览文件 @
6e95e005
...
...
@@ -82,6 +82,9 @@ class PlatformViewEmbedder final : public PlatformView {
// |PlatformView|
std
::
unique_ptr
<
Surface
>
CreateRenderingSurface
()
override
;
// |PlatformView|
std
::
shared_ptr
<
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
// |PlatformView|
sk_sp
<
GrDirectContext
>
CreateResourceContext
()
const
override
;
...
...
shell/platform/fuchsia/flutter/platform_view.cc
浏览文件 @
6e95e005
...
...
@@ -586,6 +586,12 @@ std::unique_ptr<flutter::Surface> PlatformView::CreateRenderingSurface() {
return
on_create_surface_callback_
?
on_create_surface_callback_
()
:
nullptr
;
}
// |flutter::PlatformView|
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
PlatformView
::
CreateExternalViewEmbedder
()
{
return
external_view_embedder_
;
}
// |flutter::PlatformView|
void
PlatformView
::
HandlePlatformMessage
(
fml
::
RefPtr
<
flutter
::
PlatformMessage
>
message
)
{
...
...
shell/platform/fuchsia/flutter/platform_view.h
浏览文件 @
6e95e005
...
...
@@ -121,6 +121,10 @@ class PlatformView final : public flutter::PlatformView,
// |flutter::PlatformView|
std
::
unique_ptr
<
flutter
::
Surface
>
CreateRenderingSurface
()
override
;
// |flutter::PlatformView|
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
// |flutter::PlatformView|
void
HandlePlatformMessage
(
fml
::
RefPtr
<
flutter
::
PlatformMessage
>
message
)
override
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录