[weston PATCH v6 5/7] compostior:update the drm backend fullscreen paint part

juan.j.zhao at linux.intel.com juan.j.zhao at linux.intel.com
Thu Feb 16 23:26:14 PST 2012


From: Juan Zhao <juan.j.zhao at linux.intel.com>

---
 src/compositor-drm.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 623799f..d94ef5c 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -149,7 +149,7 @@ drm_output_repaint(struct weston_output *output_base)
 	struct drm_compositor *compositor =
 		(struct drm_compositor *) output->base.compositor;
 	struct weston_surface *surface;
-	uint32_t fb_id = 0;
+	uint32_t fb_id = 0, fullscreen_painted = 0;
 
 	glFramebufferRenderbuffer(GL_FRAMEBUFFER,
 				  GL_COLOR_ATTACHMENT0,
@@ -163,10 +163,21 @@ drm_output_repaint(struct weston_output *output_base)
 
 	wl_list_for_each_reverse(surface, &compositor->base.surface_list, link){
 		if(!surface->fs_support.fullscreen_output) {
-			weston_surface_draw(surface, &output->base);
+			if (fullscreen_painted){
+				weston_surface_draw(surface, &output->base);
+			}
+			else
+				continue;
 		} else {
 			glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 			weston_surface_draw(surface, &output->base);
+			fullscreen_painted = 1;
+		}
+	}
+
+	if (!fullscreen_painted){
+		wl_list_for_each_reverse(surface, &compositor->base.surface_list, link){
+				weston_surface_draw(surface, &output->base);
 		}
 	}
 
-- 
1.7.5.4



More information about the wayland-devel mailing list