[cogl] offscreen: allocate texture before querying slicing
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] offscreen: allocate texture before querying slicing
- Date: Wed, 1 Jan 2014 17:48:29 +0000 (UTC)
commit b742638a1ce581f5a2c9f15907361c3b0c1b178c
Author: Robert Bragg <robert linux intel com>
Date: Thu Jun 27 03:11:47 2013 +0100
offscreen: allocate texture before querying slicing
Since we are planning on deferring more texture allocation work this
makes sure we don't query whether a texture is sliced until we know it
has been allocated.
Reviewed-by: Neil Roberts <neil linux intel com>
cogl/cogl-framebuffer.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 9ce2725..24004f7 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -678,6 +678,11 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
return FALSE;
}
+ if (!cogl_texture_allocate (offscreen->texture, error))
+ return FALSE;
+
+ /* NB: it's only after allocating the texture that we will
+ * determine whether a texture needs slicing... */
if (cogl_texture_is_sliced (offscreen->texture))
{
_cogl_set_error (error, COGL_SYSTEM_ERROR,
@@ -687,9 +692,6 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
return FALSE;
}
- if (!cogl_texture_allocate (offscreen->texture, error))
- return FALSE;
-
/* Forward the texture format as the internal format of the
* framebuffer */
framebuffer->internal_format =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]