Commit 358fd22b authored by Rasmus Thomsen's avatar Rasmus Thomsen

community/phoc: upgrade to 0.4.1

parent df397e21
......@@ -2,8 +2,8 @@
# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=phoc
pkgver=0.4.0
pkgrel=1
pkgver=0.4.1
pkgrel=0
pkgdesc="wlroots based Phone compositor for the Phosh shell"
arch="all !s390x" # no wlroots
url="https://source.puri.sm/Librem5/phoc"
......@@ -12,9 +12,7 @@ makedepends="meson ninja gobject-introspection-dev libinput-dev wayland-dev
wayland-protocols libxkbcommon-dev wlroots-dev gnome-desktop-dev"
checkdepends="xvfb-run"
options="!check" # Needs fullblown EGL
source="https://source.puri.sm/Librem5/phoc/-/archive/v$pkgver/phoc-v$pkgver.tar.gz
wlroots.patch
"
source="https://source.puri.sm/Librem5/phoc/-/archive/v$pkgver/phoc-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"
build() {
......@@ -31,5 +29,4 @@ check() {
package() {
DESTDIR="$pkgdir/" ninja -C output install
}
sha512sums="b135e70009eee1f03df8309739d50e186ed3e994a928b40ad0bb44c787097f7fb1a482182c8205f1eb13d36f447a952795cfcccda407899995869c2017fb018c phoc-v0.4.0.tar.gz
29a790c7afba89c22ff93594eceb309547d40d615c20613d12f660e6fd8281e6266f24039bc9a6e82e653219918d3824ef02c59e1429740313eb724a71b5f04b wlroots.patch"
sha512sums="189b5f6b556f8dae776cf58584fba361efe4268ecacad42e68718c39664a19cd4e4c2fcf12c04a88ef4fdfc9bf1c59890ea49f6284296d45d461570a6bc5d854 phoc-v0.4.1.tar.gz"
From c7bbf4fcf9175b90131f5b553ea6fc6cb007327c Mon Sep 17 00:00:00 2001
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Date: Sun, 24 May 2020 03:46:08 +0200
Subject: [PATCH 1/2] render: Catch up with wlroots' wlr_client_buffer
---
src/render.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/render.c b/src/render.c
index 3273fc7..b5117ce 100644
--- a/src/render.c
+++ b/src/render.c
@@ -285,9 +285,7 @@ static bool scan_out_fullscreen_view(struct roots_output *output) {
wlr_presentation_surface_sampled(output->desktop->presentation, surface);
- if (!wlr_output_attach_buffer(wlr_output, surface->buffer)) {
- return false;
- }
+ wlr_output_attach_buffer(wlr_output, &surface->buffer->base);
return wlr_output_commit(wlr_output);
}
From 8e132eb2529753001b776f0dd32402798f052ff9 Mon Sep 17 00:00:00 2001
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Date: Sun, 21 Jun 2020 20:24:20 +0200
Subject: [PATCH 2/2] render: Make the EGL context current when rendering to
texture
Recent wlroots change made the renderer unset the context when not used.
---
src/render.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/render.c b/src/render.c
index b5117ce..7f6c26b 100644
--- a/src/render.c
+++ b/src/render.c
@@ -10,6 +10,7 @@
#include <wlr/backend.h>
#include <wlr/config.h>
#include <wlr/render/wlr_renderer.h>
+#include <wlr/render/gles2.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_buffer.h>
@@ -431,8 +432,14 @@ view_render_to_buffer (struct roots_view *view, int width, int height, int strid
{
PhocServer *server = phoc_server_get_default ();
struct wlr_surface *surface = view->wlr_surface;
+ struct wlr_egl *egl = wlr_gles2_renderer_get_egl (server->renderer);
GLuint tex, fbo;
+ if (!wlr_egl_make_current (egl, EGL_NO_SURFACE, NULL)) {
+ g_warning ("egl_make_current failed!");
+ return;
+ }
+
glGenTextures (1, &tex);
glBindTexture (GL_TEXTURE_2D, tex);
glTexImage2D (GL_TEXTURE_2D, 0, GL_BGRA_EXT, width, height, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
@@ -452,6 +459,8 @@ view_render_to_buffer (struct roots_view *view, int width, int height, int strid
glDeleteFramebuffers (1, &fbo);
glDeleteTextures (1, &tex);
glBindFramebuffer (GL_FRAMEBUFFER, 0);
+
+ wlr_egl_unset_current (egl);
}
static void surface_send_frame_done_iterator(struct roots_output *output,
--
2.26.2
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment