Projects
home:sagiben
kodi-next
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 64
View file
kodi-next.spec
Changed
@@ -80,8 +80,8 @@ BuildRequires: fdupes BuildRequires: gawk # need gcc5 -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc7 +BuildRequires: gcc7-c++ BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(python2) @@ -310,6 +310,8 @@ %ifarch i586 -DCMAKE_C_FLAGS='-msse' \ %endif + -DCMAKE_C_COMPILER=gcc-7 \ + -DCMAKE_CXX_COMPILER=g++-7 \ -DENABLE_INTERNAL_FMT=1 \ -DFMT_URL=%{SOURCE24} \ -DENABLE_INTERNAL_RapidJSON=1 \ @@ -326,9 +328,7 @@ -DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir} # -DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi -#cmake --build . -- VERBOSE=1 %{?_smp_mflags} -make -O %{?_smp_mflags} VERBOSE=1 - +make %{?_smp_mflags} VERBOSE=1 %install cd build
View file
kodi-noX-raspberry-pi.spec
Changed
@@ -80,8 +80,8 @@ BuildRequires: fdupes BuildRequires: gawk # need gcc5 -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc7 +BuildRequires: gcc7-c++ BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(python2) @@ -310,6 +310,8 @@ %ifarch i586 -DCMAKE_C_FLAGS='-msse' \ %endif + -DCMAKE_C_COMPILER=gcc-7 \ + -DCMAKE_CXX_COMPILER=g++-7 \ -DENABLE_INTERNAL_FMT=1 \ -DFMT_URL=%{SOURCE24} \ -DENABLE_INTERNAL_RapidJSON=1 \ @@ -326,9 +328,7 @@ -DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir} # -DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi -#cmake --build . -- VERBOSE=1 %{?_smp_mflags} -make -O %{?_smp_mflags} VERBOSE=1 - +make %{?_smp_mflags} VERBOSE=1 %install cd build
View file
kodi-noX-raspberry-pi2.spec
Changed
@@ -80,8 +80,8 @@ BuildRequires: fdupes BuildRequires: gawk # need gcc5 -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc7 +BuildRequires: gcc7-c++ BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(python2) @@ -310,6 +310,8 @@ %ifarch i586 -DCMAKE_C_FLAGS='-msse' \ %endif + -DCMAKE_C_COMPILER=gcc-7 \ + -DCMAKE_CXX_COMPILER=g++-7 \ -DENABLE_INTERNAL_FMT=1 \ -DFMT_URL=%{SOURCE24} \ -DENABLE_INTERNAL_RapidJSON=1 \ @@ -326,9 +328,7 @@ -DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir} # -DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi -#cmake --build . -- VERBOSE=1 %{?_smp_mflags} -make -O %{?_smp_mflags} VERBOSE=1 - +make %{?_smp_mflags} VERBOSE=1 %install cd build
View file
kodi-noX.spec
Changed
@@ -80,8 +80,8 @@ BuildRequires: fdupes BuildRequires: gawk # need gcc5 -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc7 +BuildRequires: gcc7-c++ BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(python2) @@ -310,6 +310,8 @@ %ifarch i586 -DCMAKE_C_FLAGS='-msse' \ %endif + -DCMAKE_C_COMPILER=gcc-7 \ + -DCMAKE_CXX_COMPILER=g++-7 \ -DENABLE_INTERNAL_FMT=1 \ -DFMT_URL=%{SOURCE24} \ -DENABLE_INTERNAL_RapidJSON=1 \ @@ -326,9 +328,7 @@ -DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir} # -DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi -#cmake --build . -- VERBOSE=1 %{?_smp_mflags} -make -O %{?_smp_mflags} VERBOSE=1 - +make %{?_smp_mflags} VERBOSE=1 %install cd build
View file
kodi.spec
Changed
@@ -80,8 +80,8 @@ BuildRequires: fdupes BuildRequires: gawk # need gcc5 -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc7 +BuildRequires: gcc7-c++ BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(python2) @@ -310,6 +310,8 @@ %ifarch i586 -DCMAKE_C_FLAGS='-msse' \ %endif + -DCMAKE_C_COMPILER=gcc-7 \ + -DCMAKE_CXX_COMPILER=g++-7 \ -DENABLE_INTERNAL_FMT=1 \ -DFMT_URL=%{SOURCE24} \ -DENABLE_INTERNAL_RapidJSON=1 \ @@ -326,9 +328,7 @@ -DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir} # -DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi -#cmake --build . -- VERBOSE=1 %{?_smp_mflags} -make -O %{?_smp_mflags} VERBOSE=1 - +make %{?_smp_mflags} VERBOSE=1 %install cd build
View file
_service:download_files:master.tar.gz/xbmc/ContextMenuItem.cpp
Changed
@@ -29,6 +29,7 @@ #include "interfaces/python/ContextItemAddonInvoker.h" #include "interfaces/python/XBPython.h" #endif +#include "ServiceBroker.h" #include "utils/StringUtils.h"
View file
_service:download_files:master.tar.gz/xbmc/windowing/wayland/WinSystemWayland.cpp
Changed
@@ -242,6 +242,7 @@ m_cursorTheme = wayland::cursor_theme_t{}; m_outputsInPreparation.clear(); m_outputs.clear(); + m_frameCallback = wayland::callback_t{}; if (m_registry) { @@ -340,6 +341,10 @@ // Apply window decorations if necessary m_windowDecorator->SetState(m_configuredSize, m_scale, m_shellSurfaceState); + // Set initial opaque region and window geometry + ApplyOpaqueRegion(); + ApplyWindowGeometry(); + // Update resolution with real size as it could have changed due to configure() UpdateDesktopResolution(res, 0, m_bufferSize.Width(), m_bufferSize.Height(), res.fRefreshRate); res.bFullScreen = fullScreen; @@ -644,18 +649,14 @@ } if (update.surfaceSizeChanged) { - // Mark everything opaque so the compositor can render it faster - // Do it here so size always matches the configured egl surface - CLog::LogF(LOGDEBUG, "Setting opaque region size %dx%d", m_surfaceSize.Width(), m_surfaceSize.Height()); - wayland::region_t opaqueRegion{m_compositor.create_region()}; - opaqueRegion.add(0, 0, m_surfaceSize.Width(), m_surfaceSize.Height()); - m_surface.set_opaque_region(opaqueRegion); + // Update opaque region here so size always matches the configured egl surface + ApplyOpaqueRegion(); } if (update.configuredSizeChanged) { // Update window decoration state m_windowDecorator->SetState(m_configuredSize, m_scale, m_shellSurfaceState); - m_shellSurface->SetWindowGeometry(m_windowDecorator->GetWindowGeometry()); + ApplyWindowGeometry(); } // Set always, because of initialization order GL context has to keep track of // whether the size changed. If we skip based on update.bufferSizeChanged here, @@ -663,6 +664,20 @@ SetContextSize(m_bufferSize); } +void CWinSystemWayland::ApplyOpaqueRegion() +{ + // Mark everything opaque so the compositor can render it faster + CLog::LogF(LOGDEBUG, "Setting opaque region size %dx%d", m_surfaceSize.Width(), m_surfaceSize.Height()); + wayland::region_t opaqueRegion{m_compositor.create_region()}; + opaqueRegion.add(0, 0, m_surfaceSize.Width(), m_surfaceSize.Height()); + m_surface.set_opaque_region(opaqueRegion); +} + +void CWinSystemWayland::ApplyWindowGeometry() +{ + m_shellSurface->SetWindowGeometry(m_windowDecorator->GetWindowGeometry()); +} + void CWinSystemWayland::ProcessMessages() { if (m_waitingForApply) @@ -1342,6 +1357,43 @@ m_surfaceSubmissions.erase(iter); }; } + + // Now wait for the frame callback that tells us that it is a good time to start drawing + // + // To sum up, we: + // 1. wait until a frame() drawing hint from the compositor arrives, + // 2. request a new frame() hint for the next presentation + // 2. then commit the backbuffer to the surface and immediately + // return, i.e. drawing can start again + // This means that rendering is optimized for maximum time available for + // our repaint and reliable timing rather than latency. With weston, latency + // will usually be on the order of two frames plus a few milliseconds. + // The frame timings become irregular though when nothing is rendered because + // kodi then sleeps for a fixed time without swapping buffers. This makes us + // immediately attach the next buffer because the frame callback has already arrived when + // this function is called and step 1. above is skipped. As we render with full + // FPS during video playback anyway and the timing is otherwise not relevant, + // this should not be a problem. + if (m_frameCallback) + { + // If the window is e.g. minimized, chances are that we will *never* get frame + // callbacks from the compositor for optimization reasons. + // Still, the app should remain functional, which means that we can't + // just block forever here - if the render thread is blocked, Kodi will not + // function normally. It would also be impossible to close the application + // while it is minimized (since the wait needs to be interrupted for that). + // -> Use Wait with timeout here so we can maintain a reasonable frame rate + // even when the window is not visible and we do not get any frame callbacks. + m_frameCallbackEvent.WaitMSec(50); + m_frameCallbackEvent.Reset(); + } + + // Get frame callback event for checking in the next call to this function + m_frameCallback = m_surface.frame(); + m_frameCallback.on_done() = [this](std::uint32_t) + { + m_frameCallbackEvent.Set(); + }; } void CWinSystemWayland::FinishFramePresentation()
View file
_service:download_files:master.tar.gz/xbmc/windowing/wayland/WinSystemWayland.h
Changed
@@ -37,6 +37,7 @@ #include "Signals.h" #include "ShellSurface.h" #include "threads/CriticalSection.h" +#include "threads/Event.h" #include "utils/ActorProtocol.h" #include "WindowDecorationHandler.h" #include "windowing/WinSystem.h" @@ -174,6 +175,8 @@ void OnOutputDone(std::uint32_t name); void UpdateBufferScale(); void ApplyBufferScale(); + void ApplyOpaqueRegion(); + void ApplyWindowGeometry(); void UpdateTouchDpi(); void ApplyShellSurfaceState(IShellSurface::StateBitset state); @@ -199,6 +202,11 @@ std::unique_ptr<IShellSurface> m_shellSurface; + // Frame callback handling + // ----------------------- + wayland::callback_t m_frameCallback; + CEvent m_frameCallbackEvent; + // Seat handling // ------------- std::map<std::uint32_t, CSeat> m_seatProcessors;
View file
_service:download_files:master.tar.gz/xbmc/windowing/wayland/WinSystemWaylandEGLContext.cpp
Changed
@@ -68,7 +68,16 @@ return false; } - return m_eglContext.MakeCurrent(); + if (!m_eglContext.MakeCurrent()) + { + return false; + } + + // Never enable the vsync of the EGL implementation, we handle that ourselves + // in WinSystemWayland + m_eglContext.SetVSync(false); + + return true; } bool CWinSystemWaylandEGLContext::DestroyWindow() @@ -97,27 +106,6 @@ void CWinSystemWaylandEGLContext::PresentFrame(bool rendered) { - // We let the egl driver handle the specifics of frame synchronization/throttling. - // Currently, in eglSwapBuffers() mesa - // 1. waits until a frame() drawing hint from the compositor arrives, - // 2. then commits the backbuffer to the surface, and - // 3. finally requests a new frame() hint for the next presentation and immediately - // returns, i.e. drawing can start again - // This means that rendering is optimized for maximum time available for - // our repaint and reliable timing rather than latency. With weston, latency - // will usually be on the order of two frames plus a few milliseconds. - // - // If it turns out that other egl drivers do things differently and we don't like - // it, it's always a possibility to set eglSwapInterval(0) and handle frame - // callbacks here ourselves. - // - // The frame timings become irregular though when nothing is rendered because - // kodi then sleeps for a fixed time without swapping buffers. This makes mesa - // immediately attach the next buffer because the frame callback has already arrived when - // eglSwapBuffers() is called and step 1. above is skipped. As we render with full - // FPS during video playback anyway and the timing is otherwise not relevant, - // this should not be a problem. - PrepareFramePresentation(); if (rendered)
View file
_service:download_files:master.tar.gz/xbmc/windowing/wayland/WinSystemWaylandEGLContextGL.cpp
Changed
@@ -105,7 +105,7 @@ void CWinSystemWaylandEGLContextGL::SetVSyncImpl(bool enable) { - m_eglContext.SetVSync(enable); + // Unsupported } void CWinSystemWaylandEGLContextGL::PresentRenderImpl(bool rendered)
View file
_service:download_files:master.tar.gz/xbmc/windowing/wayland/WinSystemWaylandEGLContextGLES.cpp
Changed
@@ -88,7 +88,7 @@ void CWinSystemWaylandEGLContextGLES::SetVSyncImpl(bool enable) { - m_eglContext.SetVSync(enable); + // Unsupported } void CWinSystemWaylandEGLContextGLES::PresentRenderImpl(bool rendered)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.