[weston,v2,1/5] gl-renderer: Rename gl_renderer_create to gl_renderer_display_create

Submitted by Miguel Angel Vico on May 18, 2016, 3:41 p.m.

Details

Message ID 1463586067-28161-1-git-send-email-mvicomoya@nvidia.com
State Accepted
Delegated to: Pekka Paalanen
Headers show
Series "Series without cover letter" ( rev: 15 14 13 12 11 10 9 8 7 ) in Wayland

Not browsing as part of any series.

Commit Message

Miguel Angel Vico May 18, 2016, 3:41 p.m.
No functional change. This patch only renames gl_renderer_create() to
gl_renderer_display_create(), which is something more descriptive of
what the function does.

Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
---
 src/compositor-drm.c     | 12 ++++++------
 src/compositor-fbdev.c   |  8 ++++----
 src/compositor-wayland.c | 12 ++++++------
 src/compositor-x11.c     |  5 +++--
 src/gl-renderer.c        |  4 ++--
 src/gl-renderer.h        | 12 ++++++------
 6 files changed, 27 insertions(+), 26 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 893877d..90e0e7b 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1577,12 +1577,12 @@  drm_backend_create_gl_renderer(struct drm_backend *b)
 
 	if (format[1])
 		n_formats = 3;
-	if (gl_renderer->create(b->compositor,
-				EGL_PLATFORM_GBM_KHR,
-				(void *)b->gbm,
-				gl_renderer->opaque_attribs,
-				format,
-				n_formats) < 0) {
+	if (gl_renderer->display_create(b->compositor,
+					EGL_PLATFORM_GBM_KHR,
+					(void *)b->gbm,
+					gl_renderer->opaque_attribs,
+					format,
+					n_formats) < 0) {
 		return -1;
 	}
 
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index ee762e3..f97fcb3 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -785,10 +785,10 @@  fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
 			goto out_launcher;
 		}
 
-		if (gl_renderer->create(compositor, NO_EGL_PLATFORM,
-					EGL_DEFAULT_DISPLAY,
-					gl_renderer->opaque_attribs,
-					NULL, 0) < 0) {
+		if (gl_renderer->display_create(compositor, NO_EGL_PLATFORM,
+						EGL_DEFAULT_DISPLAY,
+						gl_renderer->opaque_attribs,
+						NULL, 0) < 0) {
 			weston_log("gl_renderer_create failed.\n");
 			goto out_launcher;
 		}
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index fe8b082..682fa27 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -2208,12 +2208,12 @@  wayland_backend_create(struct weston_compositor *compositor,
 	}
 
 	if (!b->use_pixman) {
-		if (gl_renderer->create(compositor,
-					EGL_PLATFORM_WAYLAND_KHR,
-					b->parent.wl_display,
-					gl_renderer->alpha_attribs,
-					NULL,
-					0) < 0) {
+		if (gl_renderer->display_create(compositor,
+						EGL_PLATFORM_WAYLAND_KHR,
+						b->parent.wl_display,
+						gl_renderer->alpha_attribs,
+						NULL,
+						0) < 0) {
 			weston_log("Failed to initialize the GL renderer; "
 				   "falling back to pixman.\n");
 			b->use_pixman = 1;
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 629b5f3..097a5ce 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1557,8 +1557,9 @@  init_gl_renderer(struct x11_backend *b)
 	if (!gl_renderer)
 		return -1;
 
-	ret = gl_renderer->create(b->compositor, EGL_PLATFORM_X11_KHR, (void *) b->dpy,
-				  gl_renderer->opaque_attribs, NULL, 0);
+	ret = gl_renderer->display_create(b->compositor, EGL_PLATFORM_X11_KHR,
+					  (void *) b->dpy,
+					  gl_renderer->opaque_attribs, NULL, 0);
 
 	return ret;
 }
diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 23c0cd7..197e5c2 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -2873,7 +2873,7 @@  platform_to_extension(EGLenum platform)
 }
 
 static int
-gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
+gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
 	void *native_window, const EGLint *attribs,
 	const EGLint *visual_id, int n_ids)
 {
@@ -3147,7 +3147,7 @@  WL_EXPORT struct gl_renderer_interface gl_renderer_interface = {
 	.opaque_attribs = gl_renderer_opaque_attribs,
 	.alpha_attribs = gl_renderer_alpha_attribs,
 
-	.create = gl_renderer_create,
+	.display_create = gl_renderer_display_create,
 	.display = gl_renderer_display,
 	.output_create = gl_renderer_output_create,
 	.output_destroy = gl_renderer_output_destroy,
diff --git a/src/gl-renderer.h b/src/gl-renderer.h
index 71f6b46..69ed77e 100644
--- a/src/gl-renderer.h
+++ b/src/gl-renderer.h
@@ -75,12 +75,12 @@  struct gl_renderer_interface {
 	const EGLint *opaque_attribs;
 	const EGLint *alpha_attribs;
 
-	int (*create)(struct weston_compositor *ec,
-		      EGLenum platform,
-		      void *native_window,
-		      const EGLint *attribs,
-		      const EGLint *visual_id,
-		      const int n_ids);
+	int (*display_create)(struct weston_compositor *ec,
+			      EGLenum platform,
+			      void *native_window,
+			      const EGLint *attribs,
+			      const EGLint *visual_id,
+			      const int n_ids);
 
 	EGLDisplay (*display)(struct weston_compositor *ec);