Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shell/platform/tizen/flutter_tizen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void FlutterRegisterViewFactory(
FlutterDesktopPluginRegistrarRef registrar,
const char* view_type,
std::unique_ptr<PlatformViewFactory> view_factory) {
view_factory->SetWindow(registrar->engine->renderer->GetWindowHandle());
registrar->engine->platform_view_channel->ViewFactories().insert(
std::pair<std::string, std::unique_ptr<PlatformViewFactory>>(
view_type, std::move(view_factory)));
Expand Down
12 changes: 10 additions & 2 deletions shell/platform/tizen/public/flutter_platform_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ using ByteMessage = std::vector<uint8_t>;

class PlatformView {
public:
PlatformView(flutter::PluginRegistrar* registrar, int viewId)
: registrar_(registrar),
PlatformView(flutter::PluginRegistrar* registrar, int viewId, void* win)
: win_(win),
Comment thread
swift-kim marked this conversation as resolved.
Outdated
registrar_(registrar),
viewId_(viewId),
textureId_(0),
isFocused_(false) {}
Expand Down Expand Up @@ -47,6 +48,9 @@ class PlatformView {

virtual void SetSoftwareKeyboardContext(Ecore_IMF_Context* context) = 0;

protected:
void* win_;

private:
flutter::PluginRegistrar* registrar_;
int viewId_;
Expand All @@ -69,6 +73,10 @@ class PlatformViewFactory {
double height,
const ByteMessage& createParams) = 0;
virtual void Dispose() = 0;
void SetWindow(void* win) { win_ = win; }

protected:
void* win_;

private:
flutter::PluginRegistrar* registrar_;
Expand Down
1 change: 1 addition & 0 deletions shell/platform/tizen/tizen_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class TizenRenderer {
virtual TizenWindowGeometry GetGeometry() = 0;
virtual int32_t GetDpi() = 0;
virtual uintptr_t GetWindowId() = 0;
virtual void* GetWindowHandle() = 0;

virtual void SetRotate(int angle) = 0;
virtual void ResizeWithRotation(int32_t x,
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/tizen/tizen_renderer_ecore_wl2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ uintptr_t TizenRendererEcoreWl2::GetWindowId() {
return ecore_wl2_window_id_get(ecore_wl2_window_);
}

void* TizenRendererEcoreWl2::GetWindowHandle() {
return ecore_wl2_window_;
}

bool TizenRendererEcoreWl2::InitializeRenderer() {
int32_t width, height;
if (!SetupDisplay(width, height)) {
Expand Down
1 change: 1 addition & 0 deletions shell/platform/tizen/tizen_renderer_ecore_wl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class TizenRendererEcoreWl2 : public TizenRenderer {
TizenWindowGeometry GetGeometry() override;
int32_t GetDpi() override;
uintptr_t GetWindowId() override;
void* GetWindowHandle() override;

void ResizeWithRotation(int32_t x,
int32_t y,
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/tizen/tizen_renderer_evas_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ uintptr_t TizenRendererEvasGL::GetWindowId() {
ecore_evas_ecore_evas_get(evas_object_evas_get(evas_window_)));
}

void* TizenRendererEvasGL::GetWindowHandle() {
return nullptr;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional or just unimplemented?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's half and half 😄
Evasgl version is not implemented yet.. so This is for preventing tricky issues.

}

Evas_Object* TizenRendererEvasGL::GetImageHandle() {
return graphics_adapter_;
}
Expand Down
1 change: 1 addition & 0 deletions shell/platform/tizen/tizen_renderer_evas_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class TizenRendererEvasGL : public TizenRenderer {
TizenWindowGeometry GetGeometry() override;
int32_t GetDpi() override;
uintptr_t GetWindowId() override;
void* GetWindowHandle() override;

void ResizeWithRotation(int32_t x,
int32_t y,
Expand Down