Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
5419f70f
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,发现更多精彩内容 >>
未验证
提交
5419f70f
编写于
11月 11, 2020
作者:
K
Kaushik Iska
提交者:
GitHub
11月 11, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove GetExternalViewEmbedder from surface (#22272)
This decouples surfaces from view embedders.
上级
f95df42e
变更
46
隐藏空白更改
内联
并排
Showing
46 changed file
with
19 addition
and
220 deletion
+19
-220
ci/licenses_golden/licenses_flutter
ci/licenses_golden/licenses_flutter
+0
-1
flow/surface.cc
flow/surface.cc
+0
-4
flow/surface.h
flow/surface.h
+0
-2
shell/common/shell_test_platform_view_gl.cc
shell/common/shell_test_platform_view_gl.cc
+0
-5
shell/common/shell_test_platform_view_gl.h
shell/common/shell_test_platform_view_gl.h
+0
-3
shell/common/shell_test_platform_view_vulkan.cc
shell/common/shell_test_platform_view_vulkan.cc
+0
-5
shell/common/shell_test_platform_view_vulkan.h
shell/common/shell_test_platform_view_vulkan.h
+0
-2
shell/gpu/BUILD.gn
shell/gpu/BUILD.gn
+0
-4
shell/gpu/gpu_surface_delegate.h
shell/gpu/gpu_surface_delegate.h
+0
-28
shell/gpu/gpu_surface_gl.cc
shell/gpu/gpu_surface_gl.cc
+0
-5
shell/gpu/gpu_surface_gl.h
shell/gpu/gpu_surface_gl.h
+0
-3
shell/gpu/gpu_surface_gl_delegate.cc
shell/gpu/gpu_surface_gl_delegate.cc
+0
-4
shell/gpu/gpu_surface_gl_delegate.h
shell/gpu/gpu_surface_gl_delegate.h
+2
-6
shell/gpu/gpu_surface_metal.h
shell/gpu/gpu_surface_metal.h
+2
-8
shell/gpu/gpu_surface_metal.mm
shell/gpu/gpu_surface_metal.mm
+2
-9
shell/gpu/gpu_surface_software.cc
shell/gpu/gpu_surface_software.cc
+0
-5
shell/gpu/gpu_surface_software.h
shell/gpu/gpu_surface_software.h
+0
-3
shell/gpu/gpu_surface_software_delegate.cc
shell/gpu/gpu_surface_software_delegate.cc
+0
-4
shell/gpu/gpu_surface_software_delegate.h
shell/gpu/gpu_surface_software_delegate.h
+2
-6
shell/gpu/gpu_surface_vulkan.cc
shell/gpu/gpu_surface_vulkan.cc
+0
-5
shell/gpu/gpu_surface_vulkan.h
shell/gpu/gpu_surface_vulkan.h
+0
-4
shell/gpu/gpu_surface_vulkan_delegate.cc
shell/gpu/gpu_surface_vulkan_delegate.cc
+0
-4
shell/gpu/gpu_surface_vulkan_delegate.h
shell/gpu/gpu_surface_vulkan_delegate.h
+2
-6
shell/platform/android/android_surface_gl.cc
shell/platform/android/android_surface_gl.cc
+0
-5
shell/platform/android/android_surface_gl.h
shell/platform/android/android_surface_gl.h
+0
-3
shell/platform/android/android_surface_software.cc
shell/platform/android/android_surface_software.cc
+0
-5
shell/platform/android/android_surface_software.h
shell/platform/android/android_surface_software.h
+0
-3
shell/platform/android/android_surface_vulkan.cc
shell/platform/android/android_surface_vulkan.cc
+0
-4
shell/platform/android/android_surface_vulkan.h
shell/platform/android/android_surface_vulkan.h
+0
-3
shell/platform/android/external_view_embedder/external_view_embedder_unittests.cc
...xternal_view_embedder/external_view_embedder_unittests.cc
+0
-5
shell/platform/android/surface/android_surface_mock.cc
shell/platform/android/surface/android_surface_mock.cc
+0
-4
shell/platform/android/surface/android_surface_mock.h
shell/platform/android/surface/android_surface_mock.h
+0
-3
shell/platform/darwin/ios/ios_surface_gl.h
shell/platform/darwin/ios/ios_surface_gl.h
+0
-3
shell/platform/darwin/ios/ios_surface_gl.mm
shell/platform/darwin/ios/ios_surface_gl.mm
+0
-5
shell/platform/darwin/ios/ios_surface_metal.h
shell/platform/darwin/ios/ios_surface_metal.h
+2
-7
shell/platform/darwin/ios/ios_surface_metal.mm
shell/platform/darwin/ios/ios_surface_metal.mm
+1
-7
shell/platform/darwin/ios/ios_surface_software.h
shell/platform/darwin/ios/ios_surface_software.h
+0
-3
shell/platform/darwin/ios/ios_surface_software.mm
shell/platform/darwin/ios/ios_surface_software.mm
+0
-5
shell/platform/embedder/embedder_surface_gl.cc
shell/platform/embedder/embedder_surface_gl.cc
+0
-5
shell/platform/embedder/embedder_surface_gl.h
shell/platform/embedder/embedder_surface_gl.h
+0
-3
shell/platform/embedder/embedder_surface_software.cc
shell/platform/embedder/embedder_surface_software.cc
+0
-5
shell/platform/embedder/embedder_surface_software.h
shell/platform/embedder/embedder_surface_software.h
+0
-3
shell/platform/fuchsia/flutter/platform_view.h
shell/platform/fuchsia/flutter/platform_view.h
+4
-4
shell/platform/fuchsia/flutter/platform_view_unittest.cc
shell/platform/fuchsia/flutter/platform_view_unittest.cc
+2
-1
shell/platform/fuchsia/flutter/surface.cc
shell/platform/fuchsia/flutter/surface.cc
+0
-5
shell/platform/fuchsia/flutter/surface.h
shell/platform/fuchsia/flutter/surface.h
+0
-3
未找到文件。
ci/licenses_golden/licenses_flutter
浏览文件 @
5419f70f
...
...
@@ -667,7 +667,6 @@ FILE: ../../../flutter/shell/common/vsync_waiter_fallback.cc
FILE: ../../../flutter/shell/common/vsync_waiter_fallback.h
FILE: ../../../flutter/shell/common/vsync_waiters_test.cc
FILE: ../../../flutter/shell/common/vsync_waiters_test.h
FILE: ../../../flutter/shell/gpu/gpu_surface_delegate.h
FILE: ../../../flutter/shell/gpu/gpu_surface_gl.cc
FILE: ../../../flutter/shell/gpu/gpu_surface_gl.h
FILE: ../../../flutter/shell/gpu/gpu_surface_gl_delegate.cc
...
...
flow/surface.cc
浏览文件 @
5419f70f
...
...
@@ -10,10 +10,6 @@ Surface::Surface() = default;
Surface
::~
Surface
()
=
default
;
flutter
::
ExternalViewEmbedder
*
Surface
::
GetExternalViewEmbedder
()
{
return
nullptr
;
}
std
::
unique_ptr
<
GLContextResult
>
Surface
::
MakeRenderContextCurrent
()
{
return
std
::
make_unique
<
GLContextDefaultResult
>
(
true
);
}
...
...
flow/surface.h
浏览文件 @
5419f70f
...
...
@@ -29,8 +29,6 @@ class Surface {
virtual
GrDirectContext
*
GetContext
()
=
0
;
virtual
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
();
virtual
std
::
unique_ptr
<
GLContextResult
>
MakeRenderContextCurrent
();
virtual
bool
ClearRenderContext
();
...
...
shell/common/shell_test_platform_view_gl.cc
浏览文件 @
5419f70f
...
...
@@ -79,10 +79,5 @@ ShellTestPlatformViewGL::GetGLProcResolver() const {
};
}
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
ShellTestPlatformViewGL
::
GetExternalViewEmbedder
()
{
return
shell_test_external_view_embedder_
.
get
();
}
}
// namespace testing
}
// namespace flutter
shell/common/shell_test_platform_view_gl.h
浏览文件 @
5419f70f
...
...
@@ -64,9 +64,6 @@ class ShellTestPlatformViewGL : public ShellTestPlatformView,
// |GPUSurfaceGLDelegate|
GLProcResolver
GetGLProcResolver
()
const
override
;
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
FML_DISALLOW_COPY_AND_ASSIGN
(
ShellTestPlatformViewGL
);
};
...
...
shell/common/shell_test_platform_view_vulkan.cc
浏览文件 @
5419f70f
...
...
@@ -198,10 +198,5 @@ SkMatrix ShellTestPlatformViewVulkan::OffScreenSurface::GetRootTransformation()
return
matrix
;
}
flutter
::
ExternalViewEmbedder
*
ShellTestPlatformViewVulkan
::
OffScreenSurface
::
GetExternalViewEmbedder
()
{
return
shell_test_external_view_embedder_
.
get
();
}
}
// namespace testing
}
// namespace flutter
shell/common/shell_test_platform_view_vulkan.h
浏览文件 @
5419f70f
...
...
@@ -47,8 +47,6 @@ class ShellTestPlatformViewVulkan : public ShellTestPlatformView {
// |Surface|
GrDirectContext
*
GetContext
()
override
;
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
private:
bool
valid_
;
fml
::
RefPtr
<
vulkan
::
VulkanProcTable
>
vk_
;
...
...
shell/gpu/BUILD.gn
浏览文件 @
5419f70f
...
...
@@ -16,7 +16,6 @@ gpu_common_deps = [
source_set("gpu_surface_software") {
sources = [
"gpu_surface_delegate.h",
"gpu_surface_software.cc",
"gpu_surface_software.h",
"gpu_surface_software_delegate.cc",
...
...
@@ -28,7 +27,6 @@ source_set("gpu_surface_software") {
source_set("gpu_surface_gl") {
sources = [
"gpu_surface_delegate.h",
"gpu_surface_gl.cc",
"gpu_surface_gl.h",
"gpu_surface_gl_delegate.cc",
...
...
@@ -40,7 +38,6 @@ source_set("gpu_surface_gl") {
source_set("gpu_surface_vulkan") {
sources = [
"gpu_surface_delegate.h",
"gpu_surface_vulkan.cc",
"gpu_surface_vulkan.h",
"gpu_surface_vulkan_delegate.cc",
...
...
@@ -52,7 +49,6 @@ source_set("gpu_surface_vulkan") {
source_set("gpu_surface_metal") {
sources = [
"gpu_surface_delegate.h",
"gpu_surface_metal.h",
"gpu_surface_metal.mm",
]
...
...
shell/gpu/gpu_surface_delegate.h
已删除
100644 → 0
浏览文件 @
f95df42e
#ifndef FLUTTER_SHELL_GPU_GPU_SURFACE_DELEGATE_H_
#define FLUTTER_SHELL_GPU_GPU_SURFACE_DELEGATE_H_
#include "flutter/flow/embedded_views.h"
namespace
flutter
{
class
GPUSurfaceDelegate
{
public:
virtual
~
GPUSurfaceDelegate
()
{}
//----------------------------------------------------------------------------
/// @brief Gets the view embedder that controls how the Flutter layer
/// hierarchy split into multiple chunks should be composited back
/// on-screen. This field is optional and the Flutter rasterizer
/// will render into a single on-screen surface if this call
/// returns a null external view embedder. This happens on the GPU
/// thread.
///
/// @return The external view embedder, or, null if Flutter is rendering
/// into a single on-screen surface.
///
virtual
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
=
0
;
};
}
// namespace flutter
#endif // FLUTTER_SHELL_GPU_GPU_SURFACE_DELEGATE_H_
shell/gpu/gpu_surface_gl.cc
浏览文件 @
5419f70f
...
...
@@ -333,11 +333,6 @@ GrDirectContext* GPUSurfaceGL::GetContext() {
return
context_
.
get
();
}
// |Surface|
flutter
::
ExternalViewEmbedder
*
GPUSurfaceGL
::
GetExternalViewEmbedder
()
{
return
delegate_
->
GetExternalViewEmbedder
();
}
// |Surface|
std
::
unique_ptr
<
GLContextResult
>
GPUSurfaceGL
::
MakeRenderContextCurrent
()
{
return
delegate_
->
GLContextMakeCurrent
();
...
...
shell/gpu/gpu_surface_gl.h
浏览文件 @
5419f70f
...
...
@@ -42,9 +42,6 @@ class GPUSurfaceGL : public Surface {
// |Surface|
GrDirectContext
*
GetContext
()
override
;
// |Surface|
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
// |Surface|
std
::
unique_ptr
<
GLContextResult
>
MakeRenderContextCurrent
()
override
;
...
...
shell/gpu/gpu_surface_gl_delegate.cc
浏览文件 @
5419f70f
...
...
@@ -99,8 +99,4 @@ GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface() {
return
CreateGLInterface
(
nullptr
);
}
ExternalViewEmbedder
*
GPUSurfaceGLDelegate
::
GetExternalViewEmbedder
()
{
return
nullptr
;
}
}
// namespace flutter
shell/gpu/gpu_surface_gl_delegate.h
浏览文件 @
5419f70f
...
...
@@ -8,7 +8,6 @@
#include "flutter/common/graphics/gl_context_switch.h"
#include "flutter/flow/embedded_views.h"
#include "flutter/fml/macros.h"
#include "flutter/shell/gpu/gpu_surface_delegate.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
...
...
@@ -21,12 +20,9 @@ struct GLFrameInfo {
uint32_t
height
;
};
class
GPUSurfaceGLDelegate
:
public
GPUSurfaceDelegate
{
class
GPUSurfaceGLDelegate
{
public:
~
GPUSurfaceGLDelegate
()
override
;
// |GPUSurfaceDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
~
GPUSurfaceGLDelegate
();
// Called to make the main GL context current on the current thread.
virtual
std
::
unique_ptr
<
GLContextResult
>
GLContextMakeCurrent
()
=
0
;
...
...
shell/gpu/gpu_surface_metal.h
浏览文件 @
5419f70f
...
...
@@ -10,7 +10,6 @@
#include "flutter/flow/surface.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/platform/darwin/scoped_nsobject.h"
#include "flutter/shell/gpu/gpu_surface_delegate.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "third_party/skia/include/gpu/mtl/GrMtlTypes.h"
...
...
@@ -20,16 +19,14 @@ namespace flutter {
class
SK_API_AVAILABLE_CA_METAL_LAYER
GPUSurfaceMetal
:
public
Surface
{
public:
GPUSurfaceMetal
(
GPUSurfaceDelegate
*
delegate
,
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer
,
GPUSurfaceMetal
(
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer
,
sk_sp
<
GrDirectContext
>
context
,
fml
::
scoped_nsprotocol
<
id
<
MTLCommandQueue
>>
command_queue
);
// |Surface|
~
GPUSurfaceMetal
()
override
;
~
GPUSurfaceMetal
();
private:
GPUSurfaceDelegate
*
delegate_
;
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer_
;
sk_sp
<
GrDirectContext
>
context_
;
fml
::
scoped_nsprotocol
<
id
<
MTLCommandQueue
>>
command_queue_
;
...
...
@@ -47,9 +44,6 @@ class SK_API_AVAILABLE_CA_METAL_LAYER GPUSurfaceMetal : public Surface {
// |Surface|
GrDirectContext
*
GetContext
()
override
;
// |Surface|
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
// |Surface|
std
::
unique_ptr
<
GLContextResult
>
MakeRenderContextCurrent
()
override
;
...
...
shell/gpu/gpu_surface_metal.mm
浏览文件 @
5419f70f
...
...
@@ -15,12 +15,10 @@ static_assert(!__has_feature(objc_arc), "ARC must be disabled.");
namespace
flutter
{
GPUSurfaceMetal
::
GPUSurfaceMetal
(
GPUSurfaceDelegate
*
delegate
,
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer
,
GPUSurfaceMetal
::
GPUSurfaceMetal
(
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer
,
sk_sp
<
GrDirectContext
>
context
,
fml
::
scoped_nsprotocol
<
id
<
MTLCommandQueue
>>
command_queue
)
:
delegate_
(
delegate
),
layer_
(
std
::
move
(
layer
)),
:
layer_
(
std
::
move
(
layer
)),
context_
(
std
::
move
(
context
)),
command_queue_
(
std
::
move
(
command_queue
))
{
layer_
.
get
().
pixelFormat
=
MTLPixelFormatBGRA8Unorm
;
...
...
@@ -121,11 +119,6 @@ GrDirectContext* GPUSurfaceMetal::GetContext() {
return
context_
.
get
();
}
// |Surface|
flutter
::
ExternalViewEmbedder
*
GPUSurfaceMetal
::
GetExternalViewEmbedder
()
{
return
delegate_
->
GetExternalViewEmbedder
();
}
// |Surface|
std
::
unique_ptr
<
GLContextResult
>
GPUSurfaceMetal
::
MakeRenderContextCurrent
()
{
// This backend has no such concept.
...
...
shell/gpu/gpu_surface_software.cc
浏览文件 @
5419f70f
...
...
@@ -87,9 +87,4 @@ GrDirectContext* GPUSurfaceSoftware::GetContext() {
return
nullptr
;
}
// |Surface|
flutter
::
ExternalViewEmbedder
*
GPUSurfaceSoftware
::
GetExternalViewEmbedder
()
{
return
delegate_
->
GetExternalViewEmbedder
();
}
}
// namespace flutter
shell/gpu/gpu_surface_software.h
浏览文件 @
5419f70f
...
...
@@ -31,9 +31,6 @@ class GPUSurfaceSoftware : public Surface {
// |Surface|
GrDirectContext
*
GetContext
()
override
;
// |Surface|
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
private:
GPUSurfaceSoftwareDelegate
*
delegate_
;
// TODO(38466): Refactor GPU surface APIs take into account the fact that an
...
...
shell/gpu/gpu_surface_software_delegate.cc
浏览文件 @
5419f70f
...
...
@@ -8,8 +8,4 @@ namespace flutter {
GPUSurfaceSoftwareDelegate
::~
GPUSurfaceSoftwareDelegate
()
=
default
;
ExternalViewEmbedder
*
GPUSurfaceSoftwareDelegate
::
GetExternalViewEmbedder
()
{
return
nullptr
;
}
}
// namespace flutter
shell/gpu/gpu_surface_software_delegate.h
浏览文件 @
5419f70f
...
...
@@ -7,7 +7,6 @@
#include "flutter/flow/embedded_views.h"
#include "flutter/fml/macros.h"
#include "flutter/shell/gpu/gpu_surface_delegate.h"
#include "third_party/skia/include/core/SkSurface.h"
namespace
flutter
{
...
...
@@ -25,12 +24,9 @@ namespace flutter {
/// @see |IOSurfaceSoftware|, |AndroidSurfaceSoftware|,
/// |EmbedderSurfaceSoftware|.
///
class
GPUSurfaceSoftwareDelegate
:
public
GPUSurfaceDelegate
{
class
GPUSurfaceSoftwareDelegate
{
public:
~
GPUSurfaceSoftwareDelegate
()
override
;
// |GPUSurfaceDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
~
GPUSurfaceSoftwareDelegate
();
//----------------------------------------------------------------------------
/// @brief Called when the GPU surface needs a new buffer to render a new
...
...
shell/gpu/gpu_surface_vulkan.cc
浏览文件 @
5419f70f
...
...
@@ -13,7 +13,6 @@ GPUSurfaceVulkan::GPUSurfaceVulkan(
std
::
unique_ptr
<
vulkan
::
VulkanNativeSurface
>
native_surface
,
bool
render_to_surface
)
:
window_
(
delegate
->
vk
(),
std
::
move
(
native_surface
),
render_to_surface
),
delegate_
(
delegate
),
render_to_surface_
(
render_to_surface
),
weak_factory_
(
this
)
{}
...
...
@@ -67,8 +66,4 @@ GrDirectContext* GPUSurfaceVulkan::GetContext() {
return
window_
.
GetSkiaGrContext
();
}
flutter
::
ExternalViewEmbedder
*
GPUSurfaceVulkan
::
GetExternalViewEmbedder
()
{
return
delegate_
->
GetExternalViewEmbedder
();
}
}
// namespace flutter
shell/gpu/gpu_surface_vulkan.h
浏览文件 @
5419f70f
...
...
@@ -36,12 +36,8 @@ class GPUSurfaceVulkan : public Surface {
// |Surface|
GrDirectContext
*
GetContext
()
override
;
// |Surface|
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
private:
vulkan
::
VulkanWindow
window_
;
GPUSurfaceVulkanDelegate
*
delegate_
;
const
bool
render_to_surface_
;
fml
::
WeakPtrFactory
<
GPUSurfaceVulkan
>
weak_factory_
;
...
...
shell/gpu/gpu_surface_vulkan_delegate.cc
浏览文件 @
5419f70f
...
...
@@ -8,8 +8,4 @@ namespace flutter {
GPUSurfaceVulkanDelegate
::~
GPUSurfaceVulkanDelegate
()
=
default
;
ExternalViewEmbedder
*
GPUSurfaceVulkanDelegate
::
GetExternalViewEmbedder
()
{
return
nullptr
;
}
}
// namespace flutter
shell/gpu/gpu_surface_vulkan_delegate.h
浏览文件 @
5419f70f
...
...
@@ -6,17 +6,13 @@
#define FLUTTER_SHELL_GPU_GPU_SURFACE_VULKAN_DELEGATE_H_
#include "flutter/fml/memory/ref_ptr.h"
#include "flutter/shell/gpu/gpu_surface_delegate.h"
#include "flutter/vulkan/vulkan_proc_table.h"
namespace
flutter
{
class
GPUSurfaceVulkanDelegate
:
public
GPUSurfaceDelegate
{
class
GPUSurfaceVulkanDelegate
{
public:
~
GPUSurfaceVulkanDelegate
()
override
;
// |GPUSurfaceDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
~
GPUSurfaceVulkanDelegate
();
// Obtain a reference to the Vulkan implementation's proc table.
virtual
fml
::
RefPtr
<
vulkan
::
VulkanProcTable
>
vk
()
=
0
;
...
...
shell/platform/android/android_surface_gl.cc
浏览文件 @
5419f70f
...
...
@@ -132,11 +132,6 @@ intptr_t AndroidSurfaceGL::GLContextFBO(GLFrameInfo frame_info) const {
return
0
;
}
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
AndroidSurfaceGL
::
GetExternalViewEmbedder
()
{
return
external_view_embedder_
.
get
();
}
// |GPUSurfaceGLDelegate|
sk_sp
<
const
GrGLInterface
>
AndroidSurfaceGL
::
GetGLInterface
()
const
{
// This is a workaround for a bug in the Android emulator EGL/GLES
...
...
shell/platform/android/android_surface_gl.h
浏览文件 @
5419f70f
...
...
@@ -63,9 +63,6 @@ class AndroidSurfaceGL final : public GPUSurfaceGLDelegate,
// |GPUSurfaceGLDelegate|
intptr_t
GLContextFBO
(
GLFrameInfo
frame_info
)
const
override
;
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
// |GPUSurfaceGLDelegate|
sk_sp
<
const
GrGLInterface
>
GetGLInterface
()
const
override
;
...
...
shell/platform/android/android_surface_software.cc
浏览文件 @
5419f70f
...
...
@@ -141,11 +141,6 @@ bool AndroidSurfaceSoftware::PresentBackingStore(
return
true
;
}
// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder
*
AndroidSurfaceSoftware
::
GetExternalViewEmbedder
()
{
return
external_view_embedder_
.
get
();
}
void
AndroidSurfaceSoftware
::
TeardownOnScreenContext
()
{}
bool
AndroidSurfaceSoftware
::
OnScreenSurfaceResize
(
const
SkISize
&
size
)
{
...
...
shell/platform/android/android_surface_software.h
浏览文件 @
5419f70f
...
...
@@ -53,9 +53,6 @@ class AndroidSurfaceSoftware final : public AndroidSurface,
// |GPUSurfaceSoftwareDelegate|
bool
PresentBackingStore
(
sk_sp
<
SkSurface
>
backing_store
)
override
;
// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
private:
const
std
::
shared_ptr
<
AndroidExternalViewEmbedder
>
external_view_embedder_
;
...
...
shell/platform/android/android_surface_vulkan.cc
浏览文件 @
5419f70f
...
...
@@ -77,10 +77,6 @@ bool AndroidSurfaceVulkan::SetNativeWindow(
return
native_window_
&&
native_window_
->
IsValid
();
}
ExternalViewEmbedder
*
AndroidSurfaceVulkan
::
GetExternalViewEmbedder
()
{
return
external_view_embedder_
.
get
();
}
fml
::
RefPtr
<
vulkan
::
VulkanProcTable
>
AndroidSurfaceVulkan
::
vk
()
{
return
proc_table_
;
}
...
...
shell/platform/android/android_surface_vulkan.h
浏览文件 @
5419f70f
...
...
@@ -50,9 +50,6 @@ class AndroidSurfaceVulkan : public AndroidSurface,
// |AndroidSurface|
bool
SetNativeWindow
(
fml
::
RefPtr
<
AndroidNativeWindow
>
window
)
override
;
// |GPUSurfaceVulkanDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
// |GPUSurfaceVulkanDelegate|
fml
::
RefPtr
<
vulkan
::
VulkanProcTable
>
vk
()
override
;
...
...
shell/platform/android/external_view_embedder/external_view_embedder_unittests.cc
浏览文件 @
5419f70f
...
...
@@ -52,11 +52,6 @@ class SurfaceMock : public Surface {
MOCK_METHOD
(
GrDirectContext
*
,
GetContext
,
(),
(
override
));
MOCK_METHOD
(
flutter
::
ExternalViewEmbedder
*
,
GetExternalViewEmbedder
,
(),
(
override
));
MOCK_METHOD
(
std
::
unique_ptr
<
GLContextResult
>
,
MakeRenderContextCurrent
,
(),
...
...
shell/platform/android/surface/android_surface_mock.cc
浏览文件 @
5419f70f
...
...
@@ -22,8 +22,4 @@ intptr_t AndroidSurfaceMock::GLContextFBO(GLFrameInfo frame_info) const {
return
0
;
}
ExternalViewEmbedder
*
AndroidSurfaceMock
::
GetExternalViewEmbedder
()
{
return
nullptr
;
}
}
// namespace flutter
shell/platform/android/surface/android_surface_mock.h
浏览文件 @
5419f70f
...
...
@@ -49,9 +49,6 @@ class AndroidSurfaceMock final : public GPUSurfaceGLDelegate,
// |GPUSurfaceGLDelegate|
intptr_t
GLContextFBO
(
GLFrameInfo
frame_info
)
const
override
;
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
};
}
// namespace flutter
...
...
shell/platform/darwin/ios/ios_surface_gl.h
浏览文件 @
5419f70f
...
...
@@ -48,9 +48,6 @@ class IOSSurfaceGL final : public IOSSurface, public GPUSurfaceGLDelegate {
// |GPUSurfaceGLDelegate|
bool
SurfaceSupportsReadback
()
const
override
;
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
private:
std
::
unique_ptr
<
IOSRenderTargetGL
>
render_target_
;
...
...
shell/platform/darwin/ios/ios_surface_gl.mm
浏览文件 @
5419f70f
...
...
@@ -82,9 +82,4 @@ bool IOSSurfaceGL::GLContextPresent(uint32_t fbo_id) {
return
IsValid
()
&&
render_target_
->
PresentRenderBuffer
();
}
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
IOSSurfaceGL
::
GetExternalViewEmbedder
()
{
return
GetSurfaceExternalViewEmbedder
().
get
();
}
}
// namespace flutter
shell/platform/darwin/ios/ios_surface_metal.h
浏览文件 @
5419f70f
...
...
@@ -6,7 +6,6 @@
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_H_
#include "flutter/fml/macros.h"
#include "flutter/shell/gpu/gpu_surface_delegate.h"
#import "flutter/shell/platform/darwin/ios/ios_surface.h"
#include "third_party/skia/include/gpu/mtl/GrMtlTypes.h"
...
...
@@ -14,15 +13,14 @@
namespace
flutter
{
class
SK_API_AVAILABLE_CA_METAL_LAYER
IOSSurfaceMetal
final
:
public
IOSSurface
,
public
GPUSurfaceDelegate
{
class
SK_API_AVAILABLE_CA_METAL_LAYER
IOSSurfaceMetal
final
:
public
IOSSurface
{
public:
IOSSurfaceMetal
(
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer
,
std
::
shared_ptr
<
IOSContext
>
context
,
const
std
::
shared_ptr
<
IOSExternalViewEmbedder
>&
external_view_embedder
);
// |IOSSurface|
~
IOSSurfaceMetal
()
override
;
~
IOSSurfaceMetal
();
private:
fml
::
scoped_nsobject
<
CAMetalLayer
>
layer_
;
...
...
@@ -37,9 +35,6 @@ class SK_API_AVAILABLE_CA_METAL_LAYER IOSSurfaceMetal final : public IOSSurface,
// |IOSSurface|
std
::
unique_ptr
<
Surface
>
CreateGPUSurface
(
GrDirectContext
*
gr_context
)
override
;
// |GPUSurfaceDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
FML_DISALLOW_COPY_AND_ASSIGN
(
IOSSurfaceMetal
);
};
...
...
shell/platform/darwin/ios/ios_surface_metal.mm
浏览文件 @
5419f70f
...
...
@@ -47,16 +47,10 @@ void IOSSurfaceMetal::UpdateStorageSizeIfNecessary() {
std
::
unique_ptr
<
Surface
>
IOSSurfaceMetal
::
CreateGPUSurface
(
GrDirectContext
*
/* unused */
)
{
auto
metal_context
=
CastToMetalContext
(
GetContext
());
return
std
::
make_unique
<
GPUSurfaceMetal
>
(
this
,
// Metal surface delegate
layer_
,
// layer
return
std
::
make_unique
<
GPUSurfaceMetal
>
(
layer_
,
// layer
metal_context
->
GetMainContext
(),
// context
metal_context
->
GetMainCommandQueue
()
// command queue
);
}
// |GPUSurfaceDelegate|
ExternalViewEmbedder
*
IOSSurfaceMetal
::
GetExternalViewEmbedder
()
{
return
GetSurfaceExternalViewEmbedder
().
get
();
}
}
// namespace flutter
shell/platform/darwin/ios/ios_surface_software.h
浏览文件 @
5419f70f
...
...
@@ -39,9 +39,6 @@ class IOSSurfaceSoftware final : public IOSSurface, public GPUSurfaceSoftwareDel
// |GPUSurfaceSoftwareDelegate|
bool
PresentBackingStore
(
sk_sp
<
SkSurface
>
backing_store
)
override
;
// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
private:
fml
::
scoped_nsobject
<
CALayer
>
layer_
;
sk_sp
<
SkSurface
>
sk_surface_
;
...
...
shell/platform/darwin/ios/ios_surface_software.mm
浏览文件 @
5419f70f
...
...
@@ -123,9 +123,4 @@ bool IOSSurfaceSoftware::PresentBackingStore(sk_sp<SkSurface> backing_store) {
return
true
;
}
// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder
*
IOSSurfaceSoftware
::
GetExternalViewEmbedder
()
{
return
GetSurfaceExternalViewEmbedder
().
get
();
}
}
// namespace flutter
shell/platform/embedder/embedder_surface_gl.cc
浏览文件 @
5419f70f
...
...
@@ -70,11 +70,6 @@ SkMatrix EmbedderSurfaceGL::GLContextSurfaceTransformation() const {
return
callback
();
}
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
EmbedderSurfaceGL
::
GetExternalViewEmbedder
()
{
return
external_view_embedder_
.
get
();
}
// |GPUSurfaceGLDelegate|
EmbedderSurfaceGL
::
GLProcResolver
EmbedderSurfaceGL
::
GetGLProcResolver
()
const
{
return
gl_dispatch_table_
.
gl_proc_resolver
;
...
...
shell/platform/embedder/embedder_surface_gl.h
浏览文件 @
5419f70f
...
...
@@ -67,9 +67,6 @@ class EmbedderSurfaceGL final : public EmbedderSurface,
// |GPUSurfaceGLDelegate|
SkMatrix
GLContextSurfaceTransformation
()
const
override
;
// |GPUSurfaceGLDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
// |GPUSurfaceGLDelegate|
GLProcResolver
GetGLProcResolver
()
const
override
;
...
...
shell/platform/embedder/embedder_surface_software.cc
浏览文件 @
5419f70f
...
...
@@ -106,9 +106,4 @@ bool EmbedderSurfaceSoftware::PresentBackingStore(
);
}
// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder
*
EmbedderSurfaceSoftware
::
GetExternalViewEmbedder
()
{
return
external_view_embedder_
.
get
();
}
}
// namespace flutter
shell/platform/embedder/embedder_surface_software.h
浏览文件 @
5419f70f
...
...
@@ -47,9 +47,6 @@ class EmbedderSurfaceSoftware final : public EmbedderSurface,
// |GPUSurfaceSoftwareDelegate|
bool
PresentBackingStore
(
sk_sp
<
SkSurface
>
backing_store
)
override
;
// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
FML_DISALLOW_COPY_AND_ASSIGN
(
EmbedderSurfaceSoftware
);
};
...
...
shell/platform/fuchsia/flutter/platform_view.h
浏览文件 @
5419f70f
...
...
@@ -80,6 +80,10 @@ class PlatformView final : public flutter::PlatformView,
// |PlatformView|
flutter
::
PointerDataDispatcherMaker
GetDispatcherMaker
()
override
;
// |flutter::PlatformView|
std
::
shared_ptr
<
flutter
::
ExternalViewEmbedder
>
CreateExternalViewEmbedder
()
override
;
private:
void
RegisterPlatformMessageHandlers
();
...
...
@@ -121,10 +125,6 @@ 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
;
...
...
shell/platform/fuchsia/flutter/platform_view_unittest.cc
浏览文件 @
5419f70f
...
...
@@ -215,7 +215,8 @@ 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
.
get
(),
platform_view
.
CreateExternalViewEmbedder
().
get
());
}
// This test makes sure that the PlatformView correctly registers Scenic
...
...
shell/platform/fuchsia/flutter/surface.cc
浏览文件 @
5419f70f
...
...
@@ -51,9 +51,4 @@ SkMatrix Surface::GetRootTransformation() const {
return
matrix
;
}
// |flutter::GetViewEmbedder|
flutter
::
ExternalViewEmbedder
*
Surface
::
GetExternalViewEmbedder
()
{
return
view_embedder_
.
get
();
}
}
// namespace flutter_runner
shell/platform/fuchsia/flutter/surface.h
浏览文件 @
5419f70f
...
...
@@ -39,9 +39,6 @@ class Surface final : public flutter::Surface {
// |flutter::Surface|
SkMatrix
GetRootTransformation
()
const
override
;
// |flutter::Surface|
flutter
::
ExternalViewEmbedder
*
GetExternalViewEmbedder
()
override
;
FML_DISALLOW_COPY_AND_ASSIGN
(
Surface
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录