|
KiCad PCB EDA Suite
|
#include <rhi/render_thread.h>#include <rhi/rhi_device.h>#include <rhi/rhi_glyph_atlas.h>#include <rhi/rhi_vertex.h>#include <rhi/rhi_buffer.h>#include <rhi/rhi_present_mode.h>#include <rhi/rhi_supersample.h>#include <rhi/layer_draw_plan.h>#include <rhi/rhi_cull_runs.h>#include <advanced_config.h>#include <core/profile.h>#include <kiplatform/app.h>#include <trace_helpers.h>#include <wx/image.h>#include <wx/log.h>#include <algorithm>#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include <future>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | MARGIN_PLAN |
Namespaces | |
| namespace | KIGFX |
| The Cairo implementation of the graphics abstraction layer. | |
Functions | |
| static long long | WindowStateAgeMs (KIGFX::WINDOW_STATE::Clock::time_point aThen, KIGFX::WINDOW_STATE::Clock::time_point aNow) |
| static double | WindowStateDurationMs (KIGFX::WINDOW_STATE::Clock::time_point aStart, KIGFX::WINDOW_STATE::Clock::time_point aEnd) |
| static RHI_FRAMEBUFFER_DESC | layerFramebufferDesc (const KIGFX::WINDOW_STATE &aWS) |
| static void | destroyDiffCopies (RHI_DEVICE &aDevice, KIGFX::WINDOW_STATE &aWS) |
| static uint32_t | staticMarginFor (const KIGFX::WINDOW_STATE &aWS, uint32_t aMaxTextureSize) |
| static uint32_t | fitSupersampleFactor (uint32_t aRequested, const KIGFX::WINDOW_STATE &aWS, uint32_t aMaxTextureSize) |
| static MARGIN_PLAN | planMarginTarget (const KIGFX::WINDOW_STATE::RENDERED_CONTENT &aDrawn, uint64_t aEpoch, const KIGFX::FRAME_DRAW_DESC &aNow, uint32_t aMargin, bool aDrawsGrid) |
| static COMPOSITOR_LAYER | marginLayer (const KIGFX::WINDOW_STATE &aWS, RHI_FramebufferHandle aFBO, const KIGFX::RHI_VIEW_SHIFT &aShift) |
| static RHI_FRAMEBUFFER_DESC | marginFramebufferDesc (const KIGFX::WINDOW_STATE &aWS) |
| static bool | ShouldRetrySwapchainCreate (const KIGFX::WINDOW_STATE &aWS, KIGFX::WINDOW_STATE::Clock::time_point aNow, std::chrono::milliseconds aBackoff=std::chrono::milliseconds(250)) |
|
static |
Definition at line 97 of file render_thread.cpp.
References KIGFX::WINDOW_STATE::diffBelowFBO, RHI_DEVICE::Release(), and KIGFX::WINDOW_STATE::staticDiffBelowFBO.
Referenced by KIGFX::RENDER_THREAD::DestroyWindowFBOs(), and KIGFX::RENDER_THREAD::RenderWindow().
|
static |
Definition at line 121 of file render_thread.cpp.
References KIGFX::WINDOW_STATE::backingHeight, and KIGFX::WINDOW_STATE::backingWidth.
Referenced by KIGFX::RENDER_THREAD::CreateWindowFBOs(), and KIGFX::RENDER_THREAD::ProcessActiveWindows().
|
static |
Definition at line 86 of file render_thread.cpp.
References RHI_FRAMEBUFFER_DESC::colorFormats, RHI_FRAMEBUFFER_DESC::hasDepthStencil, RHI_FRAMEBUFFER_DESC::height, KIGFX::WINDOW_STATE::RenderHeight(), KIGFX::WINDOW_STATE::RenderWidth(), RGBA8, and RHI_FRAMEBUFFER_DESC::width.
Referenced by KIGFX::RENDER_THREAD::CreateWindowFBOs(), marginFramebufferDesc(), KIGFX::RENDER_THREAD::RenderGeometryInto(), and KIGFX::RENDER_THREAD::RenderWindow().
|
static |
Definition at line 194 of file render_thread.cpp.
References RHI_FRAMEBUFFER_DESC::height, layerFramebufferDesc(), KIGFX::WINDOW_STATE::StaticHeight(), KIGFX::WINDOW_STATE::StaticWidth(), and RHI_FRAMEBUFFER_DESC::width.
Referenced by KIGFX::RENDER_THREAD::CreateWindowFBOs(), and KIGFX::RENDER_THREAD::RenderWindow().
|
static |
Definition at line 173 of file render_thread.cpp.
References KIGFX::WINDOW_STATE::RenderHeight(), KIGFX::WINDOW_STATE::RenderWidth(), KIGFX::WINDOW_STATE::StaticHeight(), KIGFX::WINDOW_STATE::staticMargin, KIGFX::WINDOW_STATE::StaticWidth(), KIGFX::WINDOW_STATE::supersampleFactor, KIGFX::RHI_VIEW_SHIFT::x, and KIGFX::RHI_VIEW_SHIFT::y.
Referenced by KIGFX::RENDER_THREAD::ReadbackWindowPixels(), and KIGFX::RENDER_THREAD::RenderWindow().
|
static |
Definition at line 142 of file render_thread.cpp.
References std::abs(), KIGFX::FRAME_DRAW_DESC::drawGrid, KIGFX::WINDOW_STATE::RENDERED_CONTENT::drawGrid, KIGFX::WINDOW_STATE::RENDERED_CONTENT::epoch, KIGFX::FRAME_DRAW_DESC::frameUBO, KIGFX::WINDOW_STATE::RENDERED_CONTENT::frameUBO, KIGFX::FRAME_DRAW_DESC::gridUBO, KIGFX::WINDOW_STATE::RENDERED_CONTENT::gridUBO, KIGFX::WINDOW_STATE::RENDERED_CONTENT::margin, plan(), KIGFX::RhiGridMovedOnly(), KIGFX::RhiViewMovedOnly(), KIGFX::RhiViewShift(), and KIGFX::WINDOW_STATE::RENDERED_CONTENT::valid.
Referenced by KIGFX::RENDER_THREAD::RenderWindow().
|
static |
Definition at line 203 of file render_thread.cpp.
References KIGFX::WINDOW_STATE::lastSwapchainCreateAttemptTime.
Referenced by KIGFX::RENDER_THREAD::EnsureSwapchain().
|
static |
Definition at line 104 of file render_thread.cpp.
References KIGFX::WINDOW_STATE::backingHeight, KIGFX::WINDOW_STATE::backingWidth, KIGFX::WINDOW_STATE::RenderHeight(), KIGFX::WINDOW_STATE::RenderWidth(), and KIGFX::WINDOW_STATE::supersampleFactor.
Referenced by KIGFX::RENDER_THREAD::CreateWindowFBOs().
|
static |
Definition at line 64 of file render_thread.cpp.
Referenced by KIGFX::RENDER_THREAD::ProcessActiveWindows(), and KIGFX::RENDER_THREAD::RenderWindow().
|
static |
Definition at line 75 of file render_thread.cpp.
Referenced by KIGFX::RENDER_THREAD::RenderWindow().