[cogl/cogl-1.8] texture: Flush the dependent journals on get_data



commit 852c335a06b2bb0269d7b6e6e664be4dc2d1bc57
Author: Neil Roberts <neil linux intel com>
Date:   Sat Jan 28 13:44:39 2012 +0000

    texture: Flush the dependent journals on get_data
    
    When calling cogl_texture_get_data we need to ensure that any
    framebuffers rendering to the texture have flushed their journals.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668913
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit 43bc0a4b0de72743c4eedd3cd6175c8b8c6cc658)

 cogl/cogl-texture.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index 3551a9d..4904fea 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -1438,6 +1438,11 @@ cogl_texture_get_data (CoglHandle       handle,
     }
   tg_data.success = TRUE;
 
+  /* If there are any dependent framebuffers on the texture then we
+     need to flush their journals so the texture contents will be
+     up-to-date */
+  _cogl_texture_flush_journal_rendering (handle);
+
   /* Iterating through the subtextures allows piecing together
    * the data for a sliced texture, and allows us to do the
    * read-from-framebuffer logic here in a simple fashion rather than



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]