浏览代码

stash changes

/zxw-3d_android
Xingwei Zhu 3 年前
当前提交
6090fab0
共有 5 个文件被更改,包括 6 次插入16 次删除
  1. 1
      engine/Build.bee.cs
  2. 3
      engine/src/shell/platform/unity/android/uiwidgets_panel.cc
  3. 12
      engine/src/shell/platform/unity/android/unity_external_texture_gl.cc
  4. 6
      engine/src/shell/platform/unity/android/unity_external_texture_gl.h

1
engine/Build.bee.cs


"src/shell/platform/unity/android/uiwidgets_system.cc",
"src/shell/platform/unity/android/android_task_runner.cc",
"src/shell/platform/unity/android/uiwidgets_panel.cc",
"src/shell/platform/unity/android/unity_external_texture_gl.cc"
};
var iosSources = new NPath[] {

3
engine/src/shell/platform/unity/android/uiwidgets_panel.cc


#include "shell/common/switches.h"
#include "shell/platform/embedder/embedder_engine.h"
#include "uiwidgets_system.h"
#include "unity_external_texture_gl.h"
#include "third_party/Unity/IUnityGraphics.h"
namespace uiwidgets

engine->GetShell().GetPlatformView()->RegisterTexture(
std::make_unique<UnityExternalTextureGL>(
texture_identifier, native_texture_ptr, surface_manager_.get()));
texture_identifier));
return texture_identifier;
}

12
engine/src/shell/platform/unity/android/unity_external_texture_gl.cc


#include "unity_external_texture_gl.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <EGL/eglext_angle.h>
#include <GLES2/gl2ext.h>
#include "flutter/fml/logging.h"
#include "include/gpu/GrBackendSurface.h"

namespace uiwidgets {
UnityExternalTextureGL::UnityExternalTextureGL(
int64_t texture_identifier, void* native_texture_ptr,
UnitySurfaceManager* unity_surface_manager)
: Texture(texture_identifier),
unity_surface_manager_(unity_surface_manager) {
int64_t texture_identifier)
: Texture(texture_identifier){
auto* graphics = UIWidgetsSystem::GetInstancePtr()
->GetUnityInterfaces()
->Get<IUnityGraphics>();

glDeleteTextures(1, &gl_texture_);
gl_texture_ = 0;
}
eglDestroyImageKHR(unity_surface_manager_->GetEGLDisplay(), egl_image_);
d3d11_texture_->Release();
}
// |flutter::Texture|

6
engine/src/shell/platform/unity/android/unity_external_texture_gl.h


class UnityExternalTextureGL : public Texture {
public:
UnityExternalTextureGL(int64_t texture_identifier, void* native_texture_ptr,
UnitySurfaceManager* unity_surface_manager);
UnityExternalTextureGL(int64_t texture_identifier);
UnitySurfaceManager* unity_surface_manager_;
bool gr_context_created_ = false;
GLuint gl_texture_;
sk_sp<SkImage> last_image_;

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存