Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
ea07f279
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,发现更多精彩内容 >>
未验证
提交
ea07f279
编写于
8月 14, 2018
作者:
J
Jason Simmons
提交者:
GitHub
8月 14, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Detach the resource context before shutting down the IO thread (#6009)
上级
3ac46bcf
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
46 addition
and
5 deletion
+46
-5
shell/common/platform_view.cc
shell/common/platform_view.cc
+2
-0
shell/common/platform_view.h
shell/common/platform_view.h
+4
-0
shell/common/shell.cc
shell/common/shell.cc
+9
-5
shell/platform/android/android_surface.h
shell/platform/android/android_surface.h
+2
-0
shell/platform/android/android_surface_gl.cc
shell/platform/android/android_surface_gl.cc
+5
-0
shell/platform/android/android_surface_gl.h
shell/platform/android/android_surface_gl.h
+3
-0
shell/platform/android/android_surface_software.cc
shell/platform/android/android_surface_software.cc
+4
-0
shell/platform/android/android_surface_software.h
shell/platform/android/android_surface_software.h
+3
-0
shell/platform/android/android_surface_vulkan.cc
shell/platform/android/android_surface_vulkan.cc
+4
-0
shell/platform/android/platform_view_android.cc
shell/platform/android/platform_view_android.cc
+7
-0
shell/platform/android/platform_view_android.h
shell/platform/android/platform_view_android.h
+3
-0
未找到文件。
shell/common/platform_view.cc
浏览文件 @
ea07f279
...
...
@@ -73,6 +73,8 @@ sk_sp<GrContext> PlatformView::CreateResourceContext() const {
return
nullptr
;
}
void
PlatformView
::
ReleaseResourceContext
()
const
{}
fml
::
WeakPtr
<
PlatformView
>
PlatformView
::
GetWeakPtr
()
const
{
return
weak_factory_
.
GetWeakPtr
();
}
...
...
shell/common/platform_view.h
浏览文件 @
ea07f279
...
...
@@ -88,6 +88,10 @@ class PlatformView {
// non-platform task runner.
virtual
sk_sp
<
GrContext
>
CreateResourceContext
()
const
;
// Unlike all other methods on the platform view, this one may be called on a
// non-platform task runner.
virtual
void
ReleaseResourceContext
()
const
;
fml
::
WeakPtr
<
PlatformView
>
GetWeakPtr
()
const
;
virtual
void
UpdateSemantics
(
blink
::
SemanticsNodeUpdates
updates
,
...
...
shell/common/shell.cc
浏览文件 @
ea07f279
...
...
@@ -314,11 +314,15 @@ Shell::~Shell() {
fml
::
TaskRunner
::
RunNowOrPostTask
(
task_runners_
.
GetIOTaskRunner
(),
fml
::
MakeCopyable
(
[
io_manager
=
std
::
move
(
io_manager_
),
&
io_latch
]()
mutable
{
io_manager
.
reset
();
io_latch
.
Signal
();
}));
fml
::
MakeCopyable
([
io_manager
=
std
::
move
(
io_manager_
),
platform_view
=
platform_view_
.
get
(),
&
io_latch
]()
mutable
{
io_manager
.
reset
();
if
(
platform_view
)
{
platform_view
->
ReleaseResourceContext
();
}
io_latch
.
Signal
();
}));
io_latch
.
Wait
();
...
...
shell/platform/android/android_surface.h
浏览文件 @
ea07f279
...
...
@@ -33,6 +33,8 @@ class AndroidSurface {
virtual
bool
ResourceContextMakeCurrent
()
=
0
;
virtual
bool
ResourceContextClearCurrent
()
=
0
;
virtual
bool
SetNativeWindow
(
fml
::
RefPtr
<
AndroidNativeWindow
>
window
)
=
0
;
};
...
...
shell/platform/android/android_surface_gl.cc
浏览文件 @
ea07f279
...
...
@@ -82,6 +82,11 @@ bool AndroidSurfaceGL::ResourceContextMakeCurrent() {
return
offscreen_context_
->
MakeCurrent
();
}
bool
AndroidSurfaceGL
::
ResourceContextClearCurrent
()
{
FML_DCHECK
(
offscreen_context_
&&
offscreen_context_
->
IsValid
());
return
offscreen_context_
->
ClearCurrent
();
}
bool
AndroidSurfaceGL
::
SetNativeWindow
(
fml
::
RefPtr
<
AndroidNativeWindow
>
window
)
{
// In any case, we want to get rid of our current onscreen context.
...
...
shell/platform/android/android_surface_gl.h
浏览文件 @
ea07f279
...
...
@@ -40,6 +40,9 @@ class AndroidSurfaceGL final : public GPUSurfaceGLDelegate,
// |shell::AndroidSurface|
bool
ResourceContextMakeCurrent
()
override
;
// |shell::AndroidSurface|
bool
ResourceContextClearCurrent
()
override
;
// |shell::AndroidSurface|
bool
SetNativeWindow
(
fml
::
RefPtr
<
AndroidNativeWindow
>
window
)
override
;
...
...
shell/platform/android/android_surface_software.cc
浏览文件 @
ea07f279
...
...
@@ -52,6 +52,10 @@ bool AndroidSurfaceSoftware::ResourceContextMakeCurrent() {
return
false
;
}
bool
AndroidSurfaceSoftware
::
ResourceContextClearCurrent
()
{
return
false
;
}
std
::
unique_ptr
<
Surface
>
AndroidSurfaceSoftware
::
CreateGPUSurface
()
{
if
(
!
IsValid
())
{
return
nullptr
;
...
...
shell/platform/android/android_surface_software.h
浏览文件 @
ea07f279
...
...
@@ -26,6 +26,9 @@ class AndroidSurfaceSoftware final : public AndroidSurface,
// |shell::AndroidSurface|
bool
ResourceContextMakeCurrent
()
override
;
// |shell::AndroidSurface|
bool
ResourceContextClearCurrent
()
override
;
// |shell::AndroidSurface|
std
::
unique_ptr
<
Surface
>
CreateGPUSurface
()
override
;
...
...
shell/platform/android/android_surface_vulkan.cc
浏览文件 @
ea07f279
...
...
@@ -65,6 +65,10 @@ bool AndroidSurfaceVulkan::ResourceContextMakeCurrent() {
return
false
;
}
bool
AndroidSurfaceVulkan
::
ResourceContextClearCurrent
()
{
return
false
;
}
// |shell::AndroidSurface|
bool
AndroidSurfaceVulkan
::
SetNativeWindow
(
fml
::
RefPtr
<
AndroidNativeWindow
>
window
)
{
...
...
shell/platform/android/platform_view_android.cc
浏览文件 @
ea07f279
...
...
@@ -385,6 +385,13 @@ sk_sp<GrContext> PlatformViewAndroid::CreateResourceContext() const {
return
resource_context
;
}
// |shell::PlatformView|
void
PlatformViewAndroid
::
ReleaseResourceContext
()
const
{
if
(
android_surface_
)
{
android_surface_
->
ResourceContextClearCurrent
();
}
}
void
PlatformViewAndroid
::
InstallFirstFrameCallback
()
{
// On Platform Task Runner.
SetNextFrameCallback
(
...
...
shell/platform/android/platform_view_android.h
浏览文件 @
ea07f279
...
...
@@ -102,6 +102,9 @@ class PlatformViewAndroid final : public PlatformView {
// |shell::PlatformView|
sk_sp
<
GrContext
>
CreateResourceContext
()
const
override
;
// |shell::PlatformView|
void
ReleaseResourceContext
()
const
override
;
void
InstallFirstFrameCallback
();
void
FireFirstFrameCallback
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录