<div dir="ltr">On Thu, Jul 3, 2014 at 9:54 PM, Robert Bragg <span dir="ltr"><<a href="mailto:robert@sixbynine.org" target="_blank">robert@sixbynine.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A nice idea that Neil had that avoids the need for the ref-counted<br>
pixmap registry could be to have a cogl_texture_pixmap_x11_new_right()<br>
that takes a CoglTexturePixmapX11 *left argument whereby you can keep<br>
a reference to the left eye and share as much or as little state from<br>
the left eye tfp as you need.<br>
<br>
As a way to make the apis pair up a bit more clearly, I was also<br>
thinking it could make sense to rename<br>
cogl_texture_pixmap_x11_new_stereo() to<br>
cogl_texture_pixmap_x11_new_left().<br>
<br>
It looks like this lets us avoid having a new texture object, lets us<br>
share resources and should be fairly straight forward too I think.<br></blockquote><div><br></div><div>Hmm, so the idea is that cogl_texture_pixmap_x11_new_right() returns a CoglTexturePixmapX11? It's a bit ugly in terms of internal detail,<br>
since a lot of the internals would be along the lines of:<br><br></div><div> if (tfp->is_right)<br>   {<br></div><div>     /* forward to tfp->left */<br></div><div>   }<br></div><div> else<br>   {<br></div><div>     /* do the normal stuff */<br>
</div><div>   }<br><br></div><div>but as long as you are OK with that sort of constrained ugliness in cogl-texture-pixmap-x11.c, it's certainly workable and probably ends up as less lines of code than the current patch because there's no need for the boilerplate for a new texture type.<br>
<br></div><div>do you imagine:<br><br> cogl_texture_pixmap_x11_update_area()<br> cogl_texture_pixmap_x11_set_damage_object()<br><br></div><div>as disallowed on the right texture, or would calling them be equivalent to calling them on the left texture?<br>
<br></div><div>- Owen <br></div></div></div></div>