[mutter] MetaCursorRendererNative: Fall back to texture when there is no gbm
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaCursorRendererNative: Fall back to texture when there is no gbm
- Date: Thu, 17 Nov 2016 16:07:51 +0000 (UTC)
commit 68d690225a44ff0a593e6decab28360f3bcb3a43
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue Sep 27 13:39:45 2016 +0800
MetaCursorRendererNative: Fall back to texture when there is no gbm
For when there is no gbm available, for example when using
EGLDevice/EGLStream's, just fall back to the OpenGL texture based
cursor rendering path.
https://bugzilla.gnome.org/show_bug.cgi?id=773629
src/backends/native/meta-cursor-renderer-native.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-cursor-renderer-native.c
b/src/backends/native/meta-cursor-renderer-native.c
index 2105d61..e9bbbed 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -527,6 +527,9 @@ meta_cursor_renderer_native_realize_cursor_from_wl_buffer (MetaCursorRenderer *r
CoglTexture *texture;
uint width, height;
+ if (!priv->gbm)
+ return;
+
/* Destroy any previous pending cursor buffer; we'll always either fail (which
* should unset, or succeed, which will set new buffer.
*/
@@ -614,6 +617,11 @@ meta_cursor_renderer_native_realize_cursor_from_xcursor (MetaCursorRenderer *ren
XcursorImage *xc_image)
{
MetaCursorRendererNative *native = META_CURSOR_RENDERER_NATIVE (renderer);
+ MetaCursorRendererNativePrivate *priv =
+ meta_cursor_renderer_native_get_instance_private (native);
+
+ if (!priv->gbm)
+ return;
invalidate_pending_cursor_sprite_gbm_bo (cursor_sprite);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]