Skip to content

Commit a827af6

Browse files
tboova469_comcasttboova469_comcast
authored andcommitted
Revert "RDKEMW-11256: Reviewing copliot fixes"
This reverts commit bcea3f8.
1 parent 1bbe505 commit a827af6

2 files changed

Lines changed: 21 additions & 38 deletions

File tree

rdke_splash_opengles/CMakeLists.txt

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,7 @@ find_package(ZLIB REQUIRED)
1313

1414
# Essos/Westeros are typically discovered via pkg-config in RDK/RDKE SDKs.
1515
pkg_check_modules(ESSOS REQUIRED IMPORTED_TARGET essos)
16-
17-
# Different platforms/layers use different module names for the same library.
18-
# Allow override and try common defaults.
19-
set(WESTEROS_GL_PKGCONFIG_NAME "" CACHE STRING "pkg-config module name for Westeros GL (e.g. westeros-gl or westeros_gl)")
20-
21-
if (WESTEROS_GL_PKGCONFIG_NAME)
22-
pkg_check_modules(WESTEROS_GL QUIET IMPORTED_TARGET ${WESTEROS_GL_PKGCONFIG_NAME})
23-
else()
24-
pkg_check_modules(WESTEROS_GL QUIET IMPORTED_TARGET westeros_gl)
25-
if (NOT WESTEROS_GL_FOUND)
26-
pkg_check_modules(WESTEROS_GL QUIET IMPORTED_TARGET westeros-gl)
27-
endif()
28-
if (NOT WESTEROS_GL_FOUND)
29-
pkg_check_modules(WESTEROS_GL QUIET IMPORTED_TARGET westerosgl)
30-
endif()
31-
endif()
32-
33-
if (NOT WESTEROS_GL_FOUND)
34-
# Some SDKs ship the library without a pkg-config file.
35-
find_library(WESTEROS_GL_LIBRARY NAMES westeros_gl)
36-
if (NOT WESTEROS_GL_LIBRARY)
37-
message(FATAL_ERROR "Westeros GL not found. Tried pkg-config modules: westeros_gl, westeros-gl, westerosgl (or WESTEROS_GL_PKGCONFIG_NAME override) and library libwesteros_gl")
38-
endif()
39-
endif()
16+
pkg_check_modules(WESTEROS_GL REQUIRED IMPORTED_TARGET westeros_gl)
4017

4118
# EGL/GLESv2: locate both headers and libraries (important for sysroot builds).
4219
find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h)
@@ -66,6 +43,7 @@ target_include_directories(rdke_splash PRIVATE
6643
)
6744

6845
target_link_libraries(rdke_splash PRIVATE
46+
PkgConfig::WESTEROS_GL
6947
PkgConfig::ESSOS
7048
${EGL_LIBRARY}
7149
${GLESv2_LIBRARY}
@@ -74,12 +52,6 @@ target_link_libraries(rdke_splash PRIVATE
7452
ZLIB::ZLIB
7553
)
7654

77-
if (WESTEROS_GL_FOUND)
78-
target_link_libraries(rdke_splash PRIVATE PkgConfig::WESTEROS_GL)
79-
else()
80-
target_link_libraries(rdke_splash PRIVATE ${WESTEROS_GL_LIBRARY})
81-
endif()
82-
8355
install(TARGETS rdke_splash
8456
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
8557
)

rdke_splash_opengles/src/main.cpp

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -550,13 +550,13 @@ void onEssosTerminated(void*)
550550
gShouldQuit = 1;
551551
}
552552

553-
EssTerminateListener kTermListener = []() {
553+
const EssTerminateListener kTermListener = []() {
554554
EssTerminateListener l{};
555555
l.terminated = onEssosTerminated;
556556
return l;
557557
}();
558558

559-
EssSettingsListener kSettingsListener = []() {
559+
const EssSettingsListener kSettingsListener = []() {
560560
EssSettingsListener l{};
561561
l.displaySize = onDisplaySize;
562562
return l;
@@ -637,11 +637,11 @@ int main(int argc, char** argv)
637637
}
638638
const uint64_t decodeMs = nowMs() - decodeStartMs;
639639

640-
GlProgram gl{};
641-
const uint64_t glStartMs = nowMs();
642-
if (ok)
640+
//GlProgram gl{};
641+
//const uint64_t glStartMs = nowMs();
642+
if (!ok)
643643
{
644-
auto prog = createProgramAndTexture(*image);
644+
/*auto prog = createProgramAndTexture(*image);
645645
if (!prog)
646646
{
647647
ok = false;
@@ -650,14 +650,25 @@ int main(int argc, char** argv)
650650
{
651651
gl = *prog;
652652
}
653+
*/
654+
const char* detail = EssContextGetLastErrorDetail(ctx);
655+
std::printf("Startup failed. Essos detail: %s\n", (detail ? detail : "(none)"));
656+
EssContextDestroy(ctx);
657+
return 4;
653658
}
659+
//const uint64_t glSetupMs = nowMs() - glStartMs;
660+
gl = *prog;
654661
const uint64_t glSetupMs = nowMs() - glStartMs;
655662

656-
if (!ok)
663+
//if (!ok)
664+
GlProgram gl{};
665+
const uint64_t glStartMs = nowMs();
666+
auto prog = createProgramAndTexture(*image);
667+
if (!prog)
657668
{
658669
const char* detail = EssContextGetLastErrorDetail(ctx);
659670
std::printf("Startup failed. Essos detail: %s\n", (detail ? detail : "(none)"));
660-
destroyProgramAndTexture(gl);
671+
//destroyProgramAndTexture(gl);
661672
EssContextDestroy(ctx);
662673
return 4;
663674
}

0 commit comments

Comments
 (0)