<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Robert,<div><br><blockquote type="cite"><div><div><blockquote type="cite">I just tested the new Version on OSX 1.6.8 64Bit and found the folowing<br></blockquote><blockquote type="cite">issues:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1.) CLUTTER 1.9.2 with COGL 1.9.4<br></blockquote><blockquote type="cite">- clutter 1.9.2 compiled with cogl 1.9.2 &nbsp;, just updated to&nbsp;cogl 1.9.4:<br></blockquote><blockquote type="cite">Clutter Text shows no text rendering anymore.<br></blockquote><blockquote type="cite"><br></blockquote>Can you please try running with CLUTTER_DISABLE_MIPMAPPED_TEXT=1 there<br>seems to be a recurring problem on OSX with mipmapped text which we<br>haven't yet managed to get to the bottom of.<br></div></div></blockquote>Well that worked!. Before I used&nbsp;<span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#c0c0c0;">  </span></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">clutter_set_font_flags</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#c0c0c0;"> </span></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#000000;">(</span></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#800080;">CLUTTER_FONT_HINTING</span></span><span class="Apple-style-span" style="white-space: pre; "><span style="font-family: monospace; color: rgb(0, 0, 0); ">)</span><font class="Apple-style-span" face="'Helvetica Neue'">,</font></span><div><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="'Helvetica Neue'">but it seems to have not the desired effect anymore!</font></span><div><br></div><blockquote type="cite"><div><div><br><blockquote type="cite">- Then I tried to recompile clutter 1.9.2 and got:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In file included from ./osx/clutter-backend-osx.c:34:<br></blockquote><blockquote type="cite">./clutter-private.h:252: error: expected specifier-qualifier-list before<br></blockquote><blockquote type="cite">'CoglVector3'<br></blockquote><blockquote type="cite">make[3]: *** [clutter-backend-osx.lo] Error 1<br></blockquote><blockquote type="cite">make[2]: *** [all] Error 2<br></blockquote><blockquote type="cite">make[1]: *** [all-recursive] Error 1<br></blockquote><blockquote type="cite">make: *** [all] Error 2<br></blockquote><br>You need to build with Clutter master until clutter next makes a release.<br>Clutter internally uses Cogl's experimental APIs which are subject to change<br>during a development cycle and we recently removed the CoglVector3 type from<br>Cogl. Alternatively I've also attached a patch that was used to update Clutter<br>that you might be able to apply against 1.9.2 if you don't want to use clutter<br>master.<br></div></div></blockquote>I did not try the last version yet. Will give you an update if it causes problems.<br><blockquote type="cite"><div><div><br><blockquote type="cite"><br></blockquote><blockquote type="cite">2.) Also I noticed that the quartz image option in cogl configure seems not<br></blockquote><blockquote type="cite">to have any effect.<br></blockquote><br>Have you explicitly disabled the gdk-pixbuf backend, using --disable-gdk-pixbuf<br>I wonder? Taking a look at the configure.ac code I think the gdk-pixbuf backend<br>will take precedence if that's found. &nbsp;Maybe we should change that so the<br>quartz backend has higher precedence if enabled.<br></div></div></blockquote><div><br></div>You are right, if I disable gtk-pixbuf, quartz image gets active!&nbsp;<br><div><br></div><br><blockquote type="cite"><div><div><blockquote type="cite"><br></blockquote><blockquote type="cite">3.) Would it be possible to add an update function like<br></blockquote><blockquote type="cite">cogl_texture_update_from_buffer smilar to&nbsp;cogl_texture_new_from_buffer ?<br></blockquote><blockquote type="cite">I would like to have it because like this I think I could update a video<br></blockquote><blockquote type="cite">stream<br></blockquote><blockquote type="cite">through Buffer map/unmap to a texture with not so much overhead.<br></blockquote><br>If you're using the buffer to replace the whole texture then I would recommend<br>simply creating a new texture object for each update. The cost of allocating<br>the CoglTexture struct that describes the texture should be trivial compared to<br>the cost of uploading the data so I don't think we'd see a measurable<br>performance benefit from a cogl_texture_update_from_buffer(). If you have<br>some profiling data though that suggests it really would be worthwhile then<br>I'd be happy to take a look at that.<br><br>I think one of the bigger challenges with optimizing video streaming is avoiding<br>buffer copies and that's sometimes tricky to do without knowing exactly what the<br>driver is doing under the hood. If you're not lucky then the driver will end<br>up making copies behind the scenes. Modifying textures mid-scene is one thing<br>in particular that can upset some drivers which is another reason I'd be weary of<br>adding an _update_from_buffer() function if it might lead developers unwittingly<br>into bad performance.<br><br>If you aren't updating the whole buffer for each update, then something else to<br>be weary of is modifying a PixelBuffer that you created a texture from. If the<br>driver managed to make your texture without copying the pixel buffer then the<br>driver might not later allow you to modify that buffer (via map/unmap) without<br>first forcing an internal copy-on-write. For this reason it can be worth<br>experimenting with double/tripple buffering your pixel buffers and deleting old<br>textures so you can avoid modifying a buffer that is currently tied to a<br>texture.<br><br>Maybe a bit more of a brain dump than you were asking for, but my feeling is<br>that you may have much more significant issues with regards to avoiding buffer<br>copies that can impact performance than needing to worry about avoiding<br>allocating CoglTexture objects.<br><br></div></div></blockquote><div>&nbsp;I played around with various streaming methods:</div><div><font class="Apple-style-span" face="'Helvetica Neue'">1.) The most simple is to use&nbsp;<span class="Apple-style-span" style="white-space: pre; ">cogl_texture_set_region</span><span class="Apple-style-span" style="white-space: pre; "> .&nbsp;</span></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><span class="Apple-style-span" style="white-space: pre; ">    Performance is average.</span></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><span class="Apple-style-span" style="white-space: pre; ">2.) Then I tried a sequence of</span></font></div><div><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="'Helvetica Neue'"><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" face="'Helvetica Neue'"><span class="Apple-tab-span" style="white-space:pre">        </span>cogl_buffer_set_data<span style="color: rgb(192, 192, 192); "> ,</span></font></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" face="'Helvetica Neue'"><span style=" color:#c0c0c0;">    <span class="Apple-tab-span" style="white-space:pre">        </span></span>cogl_bitmap_new_from_buffer<span style=" color:#c0c0c0;"> </span></font></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" face="'Helvetica Neue'"><span style=" color:#c0c0c0;">    <span class="Apple-tab-span" style="white-space:pre">        </span></span>cogl_texture_set_region_from_bitmap</font></pre></font></span><span class="Apple-style-span" style="font-family: 'Helvetica Neue'; white-space: pre; ">  </span><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="white-space: pre; "> &nbsp;</span><span class="Apple-style-span" style="white-space: pre; ">Performance is average as well.</span></font></div><div><span class="Apple-style-span" style="white-space: pre; "><div><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="Arial">3.) Finally I used</font></span></div><div><span class="Apple-style-span" style="white-space: pre; "><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span class="Apple-tab-span" style="font-family: Arial; white-space: pre; ">        </span><font class="Apple-style-span" face="'Helvetica Neue'">cogl_buffer_map/unmap<span class="Apple-tab-span" style="white-space: pre; ">                </span> (to get the data from user space  into the graphics memory)</font></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><pre style="font-family: Arial; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><!--StartFragment--><span class="Apple-tab-span" style="white-space:pre">        </span>cogl_bitmap_new_from_buffer<!--EndFragment--></pre></pre></span></div></span><span class="Apple-style-span" style="font-family: Arial; white-space: pre; "><span class="Apple-tab-span" style="white-space:pre">        </span>cogl_texture_set_region_from_bitmap</span><div style="white-space: pre; "><font class="Apple-style-span" face="Arial">   &nbsp;</font><span class="Apple-style-span" style="font-family: Arial; white-space: pre; ">Performance is the best so far. I just wonder if  replacing the last 2 calls&nbsp;</span></div><div style="white-space: pre; "><span class="Apple-style-span" style="font-family: Arial; white-space: pre; ">    by a new </span><span class="Apple-style-span" style="white-space: normal; ">cogl_texture_update_from_buffer &nbsp;function even could increase performance.</span></div><div style="white-space: pre; "><font class="Apple-style-span" face="Arial">4.) Your  advise to use&nbsp;</font></div><div style="white-space: pre; "><span class="Apple-style-span" style="font-family: 'Helvetica Neue'; "><span class="Apple-tab-span" style="white-space:pre">        </span>cogl_buffer_map/unmap</span></div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>cogl_texture_new_from_buffer</div><div>showed the worst performance off all.</div></div></div><div><br></div><div><br></div><div>I have also another question: In&nbsp;<span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">cogl_pop_framebuffer</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#c0c0c0;"> </span></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#000000;">(</span></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#808000;">void</span></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><span style=" color:#000000;">) </span></span><span class="Apple-style-span" style="font-family: 'Helvetica Neue'; white-space: pre; ">I found the comment:</span></div><div>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">....</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">{</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">      </span><span style=" color:#008000;">/*</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">XXX:</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">eventually</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">we</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">want</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">to</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">remove</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">this</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">implicit</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">journal</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">flush</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">       </span><span style=" color:#008000;">*</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">so</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">we</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">can</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">log</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">into</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">journal</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">beyond</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">framebuffer</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">changes</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">to</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">       </span><span style=" color:#008000;">*</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">support</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">batching</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">scenes</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">that</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">depend</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">on</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">results</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">of</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">       </span><span style=" color:#008000;">*</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">mid-scene</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">renders</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">to</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">textures.</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">*/</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">      </span>_cogl_framebuffer_flush_journal<span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#000000;">to_pop</span><span style=" color:#000000;">-&gt;</span><span style=" color:#800000;">draw_buffer</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">      </span>_cogl_framebuffer_flush_journal<span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#000000;">to_pop</span><span style=" color:#000000;">-&gt;</span><span style=" color:#800000;">read_buffer</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">      </span>notify_buffers_changed<span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#000000;">to_pop</span><span style=" color:#000000;">-&gt;</span><span style=" color:#800000;">draw_buffer</span><span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                              </span><span style=" color:#000000;">to_restore</span><span style=" color:#000000;">-&gt;</span><span style=" color:#800000;">draw_buffer</span><span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                              </span><span style=" color:#000000;">to_pop</span><span style=" color:#000000;">-&gt;</span><span style=" color:#800000;">read_buffer</span><span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                              </span><span style=" color:#000000;">to_restore</span><span style=" color:#000000;">-&gt;</span><span style=" color:#800000;">read_buffer</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">}</span><!--EndFragment--></pre><div>......</div></div><div><br></div><div><div>Do you have any idea if and when this batching scenes support could be realized?</div></div><div><br></div><div><br></div><div><br></div><div>Thx,</div><div>Roland</div><div><br></div><div><br></div><div><br></div></div></body></html>