summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorFelix Dick <felix.dick@web.de>2022-09-25 20:07:48 +0200
committerFelix Dick <felix.dick@web.de>2022-09-25 20:07:48 +0200
commitbf3f519eb76bfa8d5f7d71f882b7b803c699aee1 (patch)
tree77126f8d49917fc0bcd44af7859e88fb88d7bfaa /src/render
parent190229942f60ea5b8905a673ddea44c05da14de3 (diff)
Remove trailing whitespace.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Framebuffer.cpp4
-rw-r--r--src/render/OpenGL.cpp8
-rw-r--r--src/render/Renderer.cpp14
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp4
-rw-r--r--src/render/decorations/IHyprWindowDecoration.cpp4
-rw-r--r--src/render/shaders/Border.hpp4
-rw-r--r--src/render/shaders/Shadow.hpp4
-rw-r--r--src/render/shaders/Textures.hpp4
8 files changed, 23 insertions, 23 deletions
diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp
index a85b0260..67e86ae7 100644
--- a/src/render/Framebuffer.cpp
+++ b/src/render/Framebuffer.cpp
@@ -4,7 +4,7 @@
bool CFramebuffer::alloc(int w, int h) {
bool firstAlloc = false;
RASSERT((w > 1 && h > 1), "cannot alloc a FB with negative / zero size! (attempted %ix%i)", w, h);
-
+
if (m_iFb == (uint32_t)-1) {
firstAlloc = true;
glGenFramebuffers(1, &m_iFb);
@@ -78,4 +78,4 @@ void CFramebuffer::release() {
CFramebuffer::~CFramebuffer() {
release();
-} \ No newline at end of file
+}
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index ea11bbb7..2ae8d747 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -517,7 +517,7 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, wlr_box* p
pixman_region32_copy(&damage, originalDamage);
wlr_region_transform(&damage, &damage, wlr_output_transform_invert(m_RenderData.pMonitor->transform), m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y);
wlr_region_expand(&damage, &damage, pow(2, *PBLURPASSES) * *PBLURSIZE);
-
+
// helper
const auto PMIRRORFB = &m_RenderData.pCurrentMonData->mirrorFB;
const auto PMIRRORSWAPFB = &m_RenderData.pCurrentMonData->mirrorSwapFB;
@@ -581,7 +581,7 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, wlr_box* p
pixman_region32_t tempDamage;
pixman_region32_init(&tempDamage);
wlr_region_scale(&tempDamage, &damage, 1.f / 2.f); // when DOWNscaling, we make the region twice as small because it's the TARGET
-
+
drawPass(&m_RenderData.pCurrentMonData->m_shBLUR1, &tempDamage);
// and draw
@@ -663,7 +663,7 @@ void CHyprOpenGLImpl::preWindowPass() {
for (auto& w : g_pCompositor->m_vWindows) {
if (w->m_iWorkspaceID == m_RenderData.pMonitor->activeWorkspace && !w->m_bHidden && w->m_bIsMapped && !w->m_bIsFloating) {
hasWindows = true;
- break;
+ break;
}
}
@@ -1116,7 +1116,7 @@ void CHyprOpenGLImpl::renderMirrored() {
void CHyprOpenGLImpl::renderSplash(cairo_t *const CAIRO, cairo_surface_t *const CAIROSURFACE) {
cairo_select_font_face(CAIRO, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
- const auto FONTSIZE = (int)(m_RenderData.pMonitor->vecPixelSize.y / 76);
+ const auto FONTSIZE = (int)(m_RenderData.pMonitor->vecPixelSize.y / 76);
cairo_set_font_size(CAIRO, FONTSIZE);
cairo_set_source_rgba(CAIRO, 1.f, 1.f, 1.f, 0.32f);
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 95f4bb32..8f673ab3 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -16,7 +16,7 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) {
windowBox = {(int)outputX + RDATA->x + x, (int)outputY + RDATA->y + y, RDATA->w, RDATA->h};
else // here we clamp to 2, these might be some tiny specks
windowBox = {(int)outputX + RDATA->x + x, (int)outputY + RDATA->y + y, std::clamp(surface->current.width, 2, 1337420), std::clamp(surface->current.height, 2, 1337420)};
-
+
if (RDATA->squishOversized) {
if (x + windowBox.width > RDATA->w)
windowBox.width = RDATA->w - x;
@@ -26,7 +26,7 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) {
if (RDATA->pWindow)
g_pHyprRenderer->calculateUVForWindowSurface(RDATA->pWindow, surface, RDATA->squishOversized);
-
+
scaleBox(&windowBox, RDATA->output->scale);
static auto *const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue;
@@ -219,7 +219,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
g_pHyprOpenGL->renderSnapshot(&pWindow);
return;
}
-
+
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
const auto REALPOS = pWindow->m_vRealPosition.vec() + (pWindow->m_bPinned ? Vector2D{} : PWORKSPACE->m_vRenderOffset.vec());
static const auto PNOFLOATINGBORDERS = &g_pConfigManager->getConfigValuePtr("general:no_border_on_floating")->intValue;
@@ -407,7 +407,7 @@ void CHyprRenderer::renderAllClientsForMonitor(const int& ID, timespec* time) {
for (auto& w : g_pCompositor->m_vWindows) {
if (w->m_bHidden && !w->m_bIsMapped && !w->m_bFadingOut)
continue;
-
+
if (w->m_iWorkspaceID != SPECIAL_WORKSPACE_ID)
continue;
@@ -1017,7 +1017,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
float currentRefresh = 0;
bool success = false;
- //(-1,-1) indicates a preference to refreshrate over resolution, (-1,-2) preference to resolution
+ //(-1,-1) indicates a preference to refreshrate over resolution, (-1,-2) preference to resolution
if(pMonitorRule->resolution == Vector2D(-1,-1)) {
wl_list_for_each(mode, &pMonitor->output->modes, link) {
if( ( mode->width >= currentWidth && mode->height >= currentHeight && mode->refresh >= ( currentRefresh - 1000.f ) ) || mode->refresh > ( currentRefresh + 3000.f ) ) {
@@ -1048,7 +1048,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
Debug::log(LOG, "Monitor %s: REJECTED mode: %ix%i@%2f! Falling back to preferred.",
pMonitor->output->name, (int)pMonitorRule->resolution.x, (int)pMonitorRule->resolution.y, (float)pMonitorRule->refreshRate,
mode->width, mode->height, mode->refresh / 1000.f);
-
+
const auto PREFERREDMODE = wlr_output_preferred_mode(pMonitor->output);
if (!PREFERREDMODE) {
@@ -1116,7 +1116,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
Debug::log(LOG, "Setting preferred mode for %s", pMonitor->output->name);
}
}
-
+
wlr_output_set_transform(pMonitor->output, pMonitorRule->transform);
pMonitor->transform = pMonitorRule->transform;
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp
index 8c9b23a3..38de306d 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.cpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.cpp
@@ -90,7 +90,7 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
// draw the shadow
wlr_box fullBox = {m_vLastWindowPos.x - m_seExtents.topLeft.x + 2, m_vLastWindowPos.y - m_seExtents.topLeft.y + 2, m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x - 4, m_vLastWindowSize.y + m_seExtents.topLeft.y + m_seExtents.bottomRight.y - 4};
-
+
fullBox.x -= pMonitor->vecPosition.x;
fullBox.y -= pMonitor->vecPosition.y;
@@ -111,7 +111,7 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
wlr_box windowBox = {m_vLastWindowPos.x - pMonitor->vecPosition.x, m_vLastWindowPos.y - pMonitor->vecPosition.y, m_vLastWindowSize.x, m_vLastWindowSize.y};
scaleBox(&windowBox, pMonitor->scale);
-
+
if (windowBox.width < 1 || windowBox.height < 1) {
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
diff --git a/src/render/decorations/IHyprWindowDecoration.cpp b/src/render/decorations/IHyprWindowDecoration.cpp
index ada71985..5a7ccd9a 100644
--- a/src/render/decorations/IHyprWindowDecoration.cpp
+++ b/src/render/decorations/IHyprWindowDecoration.cpp
@@ -3,5 +3,5 @@
#include "../../Window.hpp"
IHyprWindowDecoration::~IHyprWindowDecoration() {
-
-} \ No newline at end of file
+
+}
diff --git a/src/render/shaders/Border.hpp b/src/render/shaders/Border.hpp
index 69f1ad5b..806fa64a 100644
--- a/src/render/shaders/Border.hpp
+++ b/src/render/shaders/Border.hpp
@@ -42,7 +42,7 @@ void main() {
vec4 pixColor = v_color;
bool done = false;
-
+
// check for edges
if (pixCoord[0] < topLeft[0]) {
if (pixCoord[1] < topLeft[1]) {
@@ -88,4 +88,4 @@ void main() {
gl_FragColor = pixColor;
}
-)#"; \ No newline at end of file
+)#";
diff --git a/src/render/shaders/Shadow.hpp b/src/render/shaders/Shadow.hpp
index dca194c0..8fd25382 100644
--- a/src/render/shaders/Shadow.hpp
+++ b/src/render/shaders/Shadow.hpp
@@ -59,7 +59,7 @@ void main() {
}
}
- if (!done) {
+ if (!done) {
// distance to all straight bb borders
float distanceT = pixCoord[1];
float distanceB = fullSize[1] - pixCoord[1];
@@ -79,4 +79,4 @@ void main() {
}
gl_FragColor = pixColor;
-})#"; \ No newline at end of file
+})#";
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp
index da02e51f..3ec099ab 100644
--- a/src/render/shaders/Textures.hpp
+++ b/src/render/shaders/Textures.hpp
@@ -267,7 +267,7 @@ void main() {
pixColor[1] = pixColor[1] * tint[1];
pixColor[2] = pixColor[2] * tint[2];
}
-
+
vec2 pixCoord = fullSize * v_texcoord;
)#" + ROUNDED_SHADER_FUNC("pixColor") +
@@ -310,7 +310,7 @@ void main() {
vec2 uv = v_texcoord / 2.0;
vec4 sum = texture2D(tex, uv + vec2(-halfpixel.x * 2.0, 0.0) * radius);
-
+
sum += texture2D(tex, uv + vec2(-halfpixel.x, halfpixel.y) * radius) * 2.0;
sum += texture2D(tex, uv + vec2(0.0, halfpixel.y * 2.0) * radius);
sum += texture2D(tex, uv + vec2(halfpixel.x, halfpixel.y) * radius) * 2.0;