<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 25, 2013 at 5:32 AM, Emmanuel Rodriguez <span dir="ltr"><<a href="mailto:emmanuel.rodriguez@gmail.com" target="_blank">emmanuel.rodriguez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On 24 April 2013 09:32, Jianhua Shao <span dir="ltr"><<a href="mailto:alex.sjh@gmail.com" target="_blank">alex.sjh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><br><div class="gmail_quote">
<div dir="ltr">I build webkitgtk 1.9.92 by below configuration<br>./configure --prefix=/usr --enable-accelerated-compositing --enable-fast-mobile-scrolling --enable-jit --disable-webkit2 --disable-plugin-process --disable-gtk-doc-html --with-gtk=2.0 --with-acceleration-backend=opengl<br>
<br>After that, I write a simple app to make the content of webview transparent by calling webkit_web_view_set_transparent(). But it failed. <br>I tryied version 1.11.5, it also does not work.<br>The same app source code works in a old version of gtk-webkit, AFAIK, it was about gtk-webkit 1.3.<br>
</div></div></div></div></div></blockquote><div><br></div></div><div>Can you try to build gtk-webkit 1.6.3 and see if it works?</div><div><br></div><div>I experience a similar problem in which calling webkit_web_view_draw() with a custom Cairo context would behave strangely since gtk-webkit 1.8. In my case I wanted to save a webpage as a PDF with a Cairo context that's backed by a PDF surface. Since gtk-webkit 1.8 the PDF is composed of a big rasterized image and is no longer vectorial.</div>
<div><br></div><div>From what I saw in the code base of gtk-webkit 1.8, webkit_web_view_draw() is now using a backing buffer to do all it's rendering and doesn't take the Cairo context pass in argument into account, all that it does is to copy the backing buffer into the Cairo context.</div>
<div><br></div><div>I believe that this is why you're losing the transparency in your main window and why my PDFs are no longer vectorial.</div><div><br></div><div>Maybe someone that knows more about the internals of gtk-webkit can give use more insight.</div>
</div></div></div></blockquote><div><br>Thanks for sharing your experience. <br>The version 1.6.3 does not meet my requirements. "enable-accelerated-compositing" is what I need in the newer version, from the dev document I found it is available from version 1.7.5.<br>
Seems I can give a try on version 1.7.x.<br><br>And have you read my another mail, <br><br>cairo_surface_t* surface = webkit_web_view_get_snapshot(view);<br><div dir="ltr">cairo_surface_write_to_png(surface, "/home/meego/dump.png");<br>
<br>will result a transparent png file...<br>Maybe I need to do some configuration on cario/gtk, but I am new on this subject, anyone can give me some hint?<br></div><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><font color="#888888">
<div><br></div></font></span></div><span class=""><font color="#888888">-- <br>Emmanuel Rodriguez
</font></span></div></div>
</blockquote></div><br></div></div>