Skip to content

Commit 80e8701

Browse files
authored
Remove external output API (#96)
1 parent 513c923 commit 80e8701

File tree

6 files changed

+11
-104
lines changed

6 files changed

+11
-104
lines changed

flutter/shell/platform/tizen/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ config("flutter_tizen_config") {
3939
"${sysroot_path}/usr/include/elementary-1",
4040
"${sysroot_path}/usr/include/emile-1",
4141
"${sysroot_path}/usr/include/eo-1",
42-
"${sysroot_path}/usr/include/eom",
4342
"${sysroot_path}/usr/include/ethumb-1",
4443
"${sysroot_path}/usr/include/ethumb-client-1",
4544
"${sysroot_path}/usr/include/evas-1",
@@ -144,7 +143,6 @@ template("embedder") {
144143
"eina",
145144
"eldbus",
146145
"elementary",
147-
"eom",
148146
"evas",
149147
"feedback",
150148
"flutter_engine",

flutter/shell/platform/tizen/flutter_tizen.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow(
204204
if (window_properties.renderer_type == FlutterDesktopRendererType::kEvasGL) {
205205
window = std::make_unique<flutter::TizenWindowElementary>(
206206
window_geometry, window_properties.transparent,
207-
window_properties.focusable, window_properties.top_level,
208-
window_properties.external_output_type);
207+
window_properties.focusable, window_properties.top_level);
209208
} else {
210209
window = std::make_unique<flutter::TizenWindowEcoreWl2>(
211210
window_geometry, window_properties.transparent,

flutter/shell/platform/tizen/public/flutter_tizen.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ typedef struct {
6363
bool top_level;
6464
// The renderer type of the engine.
6565
FlutterDesktopRendererType renderer_type;
66-
// The external output type of the window.
67-
FlutterDesktopExternalOutputType external_output_type;
6866
// The user-defined pixel ratio.
6967
double user_pixel_ratio;
7068
// The precreated window handle.

flutter/shell/platform/tizen/tizen_window_elementary.cc

Lines changed: 9 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "tizen_window_elementary.h"
66

77
#include <efl_extension.h>
8-
#include <eom.h>
98
#include <ui/efl_util.h>
109

1110
#include "flutter/shell/platform/embedder/embedder.h"
@@ -56,20 +55,11 @@ uint32_t EvasModifierToEcoreEventModifiers(const Evas_Modifier* evas_modifier) {
5655

5756
} // namespace
5857

59-
TizenWindowElementary::TizenWindowElementary(
60-
TizenGeometry geometry,
61-
bool transparent,
62-
bool focusable,
63-
bool top_level,
64-
FlutterDesktopExternalOutputType external_output_type)
65-
: TizenWindow(geometry, transparent, focusable, top_level),
66-
external_output_type_(external_output_type) {
67-
if (external_output_type_ != FlutterDesktopExternalOutputType::kNone &&
68-
!InitializeExternalOutputManager()) {
69-
FT_LOG(Error) << "Failed to initialize the External Output Manager.";
70-
return;
71-
}
72-
58+
TizenWindowElementary::TizenWindowElementary(TizenGeometry geometry,
59+
bool transparent,
60+
bool focusable,
61+
bool top_level)
62+
: TizenWindow(geometry, transparent, focusable, top_level) {
7363
if (!CreateWindow()) {
7464
FT_LOG(Error) << "Failed to create a platform window.";
7565
return;
@@ -82,9 +72,6 @@ TizenWindowElementary::TizenWindowElementary(
8272
}
8373

8474
TizenWindowElementary::~TizenWindowElementary() {
85-
if (external_output_type_ != FlutterDesktopExternalOutputType::kNone) {
86-
DestroyExternalOutputManager();
87-
}
8875
UnregisterEventHandlers();
8976
DestroyWindow();
9077
}
@@ -101,14 +88,10 @@ bool TizenWindowElementary::CreateWindow() {
10188
elm_win_aux_hint_add(elm_win_, "wm.policy.win.user.geometry", "1");
10289

10390
int32_t width = 0, height = 0;
104-
if (external_output_type_ != FlutterDesktopExternalOutputType::kNone) {
105-
eom_get_output_resolution(external_output_id_, &width, &height);
106-
} else {
107-
Ecore_Evas* ecore_evas =
108-
ecore_evas_ecore_evas_get(evas_object_evas_get(elm_win_));
109-
ecore_evas_screen_geometry_get(ecore_evas, nullptr, nullptr, &width,
110-
&height);
111-
}
91+
Ecore_Evas* ecore_evas =
92+
ecore_evas_ecore_evas_get(evas_object_evas_get(elm_win_));
93+
ecore_evas_screen_geometry_get(ecore_evas, nullptr, nullptr, &width, &height);
94+
11295
if (width == 0 || height == 0) {
11396
FT_LOG(Error) << "Invalid screen size: " << width << " x " << height;
11497
return false;
@@ -134,14 +117,6 @@ bool TizenWindowElementary::CreateWindow() {
134117
evas_object_image_alpha_set(image_, EINA_TRUE);
135118
elm_win_resize_object_add(elm_win_, image_);
136119

137-
if (external_output_type_ != FlutterDesktopExternalOutputType::kNone) {
138-
if (eom_set_output_window(external_output_id_, elm_win_) !=
139-
EOM_ERROR_NONE) {
140-
FT_LOG(Error) << "eom_set_output_window() failed.";
141-
return false;
142-
}
143-
}
144-
145120
return elm_win_ && image_;
146121
}
147122

@@ -450,54 +425,4 @@ void TizenWindowElementary::PrepareInputMethod() {
450425
[this](std::string str) { view_delegate_->OnCommit(str); });
451426
}
452427

453-
int32_t TizenWindowElementary::GetExternalOutputId() {
454-
int32_t num_ids = 0;
455-
eom_output_id* output_ids = eom_get_eom_output_ids(&num_ids);
456-
if (!output_ids || num_ids == 0) {
457-
FT_LOG(Error) << "No external output found.";
458-
return 0;
459-
}
460-
461-
eom_output_id output_id = 0;
462-
for (int32_t i = 0; i < num_ids; i++) {
463-
eom_output_type_e output_type = EOM_OUTPUT_TYPE_UNKNOWN;
464-
eom_get_output_type(output_ids[i], &output_type);
465-
466-
if (external_output_type_ == FlutterDesktopExternalOutputType::kHDMI &&
467-
(output_type == EOM_OUTPUT_TYPE_HDMIA ||
468-
output_type == EOM_OUTPUT_TYPE_HDMIB)) {
469-
output_id = output_ids[i];
470-
break;
471-
}
472-
}
473-
free(output_ids);
474-
return output_id;
475-
}
476-
477-
bool TizenWindowElementary::InitializeExternalOutputManager() {
478-
if (eom_init()) {
479-
FT_LOG(Error) << "eom_init() failed.";
480-
return false;
481-
}
482-
483-
external_output_id_ = GetExternalOutputId();
484-
if (external_output_id_ == 0) {
485-
FT_LOG(Error) << "Invalid external output ID.";
486-
return false;
487-
}
488-
489-
int ret = eom_set_output_attribute(external_output_id_,
490-
EOM_OUTPUT_ATTRIBUTE_NORMAL);
491-
if (ret != EOM_ERROR_NONE) {
492-
FT_LOG(Error)
493-
<< "eom_set_output_attribute() failed. Cannot use external output.";
494-
return false;
495-
}
496-
return true;
497-
}
498-
499-
void TizenWindowElementary::DestroyExternalOutputManager() {
500-
eom_deinit();
501-
}
502-
503428
} // namespace flutter

flutter/shell/platform/tizen/tizen_window_elementary.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ class TizenWindowElementary : public TizenWindow {
2222
TizenWindowElementary(TizenGeometry geometry,
2323
bool transparent,
2424
bool focusable,
25-
bool top_level,
26-
FlutterDesktopExternalOutputType external_output_type);
25+
bool top_level);
2726

2827
~TizenWindowElementary();
2928

@@ -56,12 +55,6 @@ class TizenWindowElementary : public TizenWindow {
5655
void UpdateFlutterCursor(const std::string& kind) override;
5756

5857
private:
59-
bool InitializeExternalOutputManager();
60-
61-
void DestroyExternalOutputManager();
62-
63-
int GetExternalOutputId();
64-
6558
bool CreateWindow();
6659

6760
void DestroyWindow();
@@ -80,10 +73,6 @@ class TizenWindowElementary : public TizenWindow {
8073
Evas_Smart_Cb rotation_changed_callback_ = nullptr;
8174
std::unordered_map<Evas_Callback_Type, Evas_Object_Event_Cb>
8275
evas_object_callbacks_;
83-
84-
int32_t external_output_id_;
85-
FlutterDesktopExternalOutputType external_output_type_ =
86-
FlutterDesktopExternalOutputType::kNone;
8776
};
8877

8978
} // namespace flutter

tools/generate_sysroot.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@
8585
'jsoncpp-devel',
8686
'libatk',
8787
'libatk-bridge-2_0-0',
88-
'libeom',
89-
'libeom-devel',
9088
'libfeedback',
9189
'libfeedback-devel',
9290
'libdlog',

0 commit comments

Comments
 (0)