<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 24, 2013 at 11:05 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 07/23/2013 08:28 AM, Alexander Monakov wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On Tue, 23 Jul 2013, Juha-Pekka Heikkilä wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Why do you need Waffle to handle symbol lookups for Apitrace?  As far as I<br>
understand, you only need the surface+context handling from Waffle, and<br>
Apitrace's own dynamic loading code should be sufficient.  Can you drop<br>
all<br>
code that references waffle_gl_api from this patch?<br>
</blockquote>
<br>
If the intention is to go Waffle way for Android why would I go<br>
sideloading with different APIs?<br>
</blockquote>
<br>
I've asked the code to be removed because the way it introduces waffle_dl_* is<br>
very inelegant and does not appear to add anything useful.  If there are<br>
reasons you want Waffle's dynamic loading be used in Apitrace, please make<br>
that a separate patch, but for retracing just the glws_waffle.cpp code should<br>
be sufficient.<br>
</blockquote>
<br></div>
I agree with Alexander here. Apitrace already has code to handle dynamic loading,<br>
and I would prefer if the Apitrace Waffle codepaths used the same dynamic loading<br>
as the other parts of Apitrace.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Can this code go into the constructor instead and the static method be<br>
removed?<br>
</blockquote>
<br>
I prefer the two stage constructor so I don't need to start throwing<br>
exceptions. All waffle functions can fail so I take them the C-ish way.<br>
</blockquote>
<br>
But you don't have any recovery code, you just immediately terminate the<br>
application with assert(0) when Waffle fails.  You can do that in the<br>
constructor as well.<br>
</blockquote>
<br></div>
Are exceptions enabled in Apitrace? That is, is Apitrace compiled with -fno-exceptions?<br>
Do other components of Apitrace throw exceptions? What is the common pattern in Apitrace<br>
for construction failure? (I'm not an Apitrace developer, so these are all open questions<br>
to me).<br></blockquote><div><br></div><div style>No, there are no exceptions. Constructors tend to be mere variable initialization, and real work done in function/methods. Though not everything follows these trend, e.g. GlxDrawable's constructor does work, but then again, it doesn't even detect errors..</div>
<div style><br></div><div style>Jose</div></div></div></div>