<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 07/02/2014 09:46 AM, Miha wrote:<br>
    </div>
    <blockquote cite="mid:53B3B8C5.3090505@visionect.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Hi<br>
      <br>
      I am developing an eInk paper based application. I have the server
      that runs webkit2gtk based applications and eInk devices that are
      connected to server via WiFi. Basically server renders image
      changes and sends them to device. User can use devices touchscreen
      to send click events to server.&nbsp; <br>
      <br>
      The thing I want to do, but I don't know if it is possible, is to
      get viewport changes from draw signal.<br>
      I want to get changed regions and image pixels from those regions
      because don't want to do full screen refreshes eInk display if it
      is not necessary.<br>
      <br>
      As I understand I could do something like this, but I do not know
      how to do it exactly.<br>
      <a moz-do-not-send="true" class="moz-txt-link-freetext"
        href="http://pastebin.com/1L8cNFfJ">http://pastebin.com/1L8cNFfJ</a>&nbsp;
      (my test application)<br>
      <br>
      1. Something is changed and need to be drawn.<br>
      Breakpoint 2, WebKit::PageClientImpl::setViewNeedsDisplay
      (this=0x78c670, rect=...)<br>
      &nbsp;&nbsp;&nbsp; at ../Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp:77<br>
      77&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gtk_widget_queue_draw_area(m_viewWidget, rect.x(),
      rect.y(), rect.width(), rect.height());<br>
      <br>
      2. WebKit Ui process draws changes to WebKitWebView widget cairo
      context.<br>
      Breakpoint 1, webkitWebViewBaseDraw (widget=0x782490, cr=0x7d3d80)<br>
      &nbsp;&nbsp;&nbsp; at
      ../Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:409<br>
      <br>
      3. Custom "draw" signal handler is triggered in application. I get
      cairo context as parameter. Can I render changes from 1. here? Is
      it possible? How to do it?<br>
      2014-07-01T11:54:51.499118Z web_view draw 1 {X: 150.000000, Y:
      80.000000, W: 450.000000, H:225.000000}
      0x0-d41d8cd98f00b204e9800998ecf8427e <br>
      2014-07-01T11:54:51.499175Z window draw 1 {X: 150.000000, Y:
      80.000000, W: 450.000000, H:225.000000}
      0x0-d41d8cd98f00b204e9800998ecf8427e <br>
      <br>
      Breakpoint 1, webkitWebViewBaseDraw (widget=0x782490, cr=0x7d3d80)<br>
      &nbsp;&nbsp;&nbsp; at
      ../Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:409<br>
      409&nbsp;&nbsp;&nbsp; {<br>
      (gdb) c<br>
      Continuing.<br>
      2014-07-01T11:54:51.899118Z web_view draw 1 {X: 150.000000, Y:
      80.000000, W: 450.000000, H:225.000000}
      0x0-d41d8cd98f00b204e9800998ecf8427e <br>
      <br>
      <br>
      <br>
      <br>
      I am curious , why are there two web_view draw events for each
      change? What trigers the second call to webkitWebViewBaseDraw and
      sends the second web_view "draw" signal in point 3?<br>
      I there way to avoid this? Maybe I can use window "draw" as it is
      triggered only once?<br>
      <br>
      Thank you for answer.<br>
      Best<br>
      <br>
      Miha<br>
      <br>
      <br>
      <br>
      &nbsp;<br>
    </blockquote>
    Hi<br>
    <br>
    I would relay appreciate, if somebody would help me clear out
    details. Please.<br>
    <br>
    Best<br>
    Miha<br>
  </body>
</html>