aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/wlr/render/egl.h20
-rw-r--r--include/wlr/render/gles2.h3
-rw-r--r--include/wlr/render/wlr_texture.h2
-rw-r--r--include/wlr/types/wlr_output_layout.h25
4 files changed, 30 insertions, 20 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 20127e38..cca77870 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -28,21 +28,22 @@ struct wlr_egl {
// TODO: Allocate and return a wlr_egl
/**
- * Initializes an egl context for the given platform and remote display.
+ * Initializes an EGL context for the given platform and remote display.
* Will attempt to load all possibly required api functions.
*/
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
EGLint *config_attribs, EGLint visual_id);
/**
- * Frees all related egl resources, makes the context not-current and
+ * Frees all related EGL resources, makes the context not-current and
* unbinds a bound wayland display.
*/
void wlr_egl_finish(struct wlr_egl *egl);
/**
- * Binds the given display to the egl instance.
- * This will allow clients to create egl surfaces from wayland ones and render to it.
+ * Binds the given display to the EGL instance.
+ * This will allow clients to create EGL surfaces from wayland ones and render
+ * to it.
*/
bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display);
@@ -53,7 +54,14 @@ bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display)
EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window);
/**
- * Creates an egl image from the given dmabuf attributes. Check usability
+ * Creates an EGL image from the given wl_drm buffer resource.
+ */
+EGLImageKHR wlr_egl_create_image_from_wl_drm(struct wlr_egl *egl,
+ struct wl_resource *data, EGLint *fmt, int *width, int *height,
+ bool *inverted_y);
+
+/**
+ * Creates an EGL image from the given dmabuf attributes. Check usability
* of the dmabuf with wlr_egl_check_import_dmabuf once first.
*/
EGLImageKHR wlr_egl_create_image_from_dmabuf(struct wlr_egl *egl,
@@ -78,7 +86,7 @@ int wlr_egl_get_dmabuf_modifiers(struct wlr_egl *egl, int format,
uint64_t **modifiers);
/**
- * Destroys an egl image created with the given wlr_egl.
+ * Destroys an EGL image created with the given wlr_egl.
*/
bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImageKHR image);
diff --git a/include/wlr/render/gles2.h b/include/wlr/render/gles2.h
index b3b43ab2..a59956bd 100644
--- a/include/wlr/render/gles2.h
+++ b/include/wlr/render/gles2.h
@@ -5,6 +5,7 @@
#include <wlr/render/wlr_renderer.h>
struct wlr_egl;
-struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend);
+
+struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl);
#endif
diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h
index ab361298..239fc51b 100644
--- a/include/wlr/render/wlr_texture.h
+++ b/include/wlr/render/wlr_texture.h
@@ -23,7 +23,7 @@ struct wlr_texture *wlr_texture_from_pixels(struct wlr_renderer *renderer,
const void *data);
/**
- * Create a new texture from a wayland DRM resource. The returned texture is
+ * Create a new texture from a wl_drm resource. The returned texture is
* immutable.
*/
struct wlr_texture *wlr_texture_from_wl_drm(struct wlr_renderer *renderer,
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h
index 4d10720e..3c150fc0 100644
--- a/include/wlr/types/wlr_output_layout.h
+++ b/include/wlr/types/wlr_output_layout.h
@@ -40,41 +40,42 @@ struct wlr_output_layout_output *wlr_output_layout_get(
struct wlr_output_layout *layout, struct wlr_output *reference);
struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout,
- double x, double y);
+ double lx, double ly);
void wlr_output_layout_add(struct wlr_output_layout *layout,
- struct wlr_output *output, int x, int y);
+ struct wlr_output *output, int lx, int ly);
void wlr_output_layout_move(struct wlr_output_layout *layout,
- struct wlr_output *output, int x, int y);
+ struct wlr_output *output, int lx, int ly);
void wlr_output_layout_remove(struct wlr_output_layout *layout,
struct wlr_output *output);
/**
- * Given x and y as pointers to global coordinates, adjusts them to local output
+ * Given x and y in layout coordinates, adjusts them to local output
* coordinates relative to the given reference output.
*/
void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
- struct wlr_output *reference, double *x, double *y);
+ struct wlr_output *reference, double *lx, double *ly);
bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
- struct wlr_output *reference, int x, int y);
+ struct wlr_output *reference, int lx, int ly);
bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
- struct wlr_output *reference, const struct wlr_box *target_box);
+ struct wlr_output *reference, const struct wlr_box *target_lbox);
/**
* Get the closest point on this layout from the given point from the reference
* output. If reference is NULL, gets the closest point from the entire layout.
*/
void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
- struct wlr_output *reference, double x, double y, double *dest_x,
- double *dest_y);
+ struct wlr_output *reference, double lx, double ly, double *dest_lx,
+ double *dest_ly);
/**
- * Get the box of the layout for the given reference output. If `reference`
- * is NULL, the box will be for the extents of the entire layout.
+ * Get the box of the layout for the given reference output in layout
+ * coordinates. If `reference` is NULL, the box will be for the extents of the
+ * entire layout.
*/
struct wlr_box *wlr_output_layout_get_box(
struct wlr_output_layout *layout, struct wlr_output *reference);
@@ -109,6 +110,6 @@ enum wlr_direction {
*/
struct wlr_output *wlr_output_layout_adjacent_output(
struct wlr_output_layout *layout, enum wlr_direction direction,
- struct wlr_output *reference, double ref_x, double ref_y);
+ struct wlr_output *reference, double ref_lx, double ref_ly);
#endif