<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>26379</bug_id>
          
          <creation_ts>2009-06-13 18:08:28 -0700</creation_ts>
          <short_desc>Reconsider image decoding architecture/APIs</short_desc>
          <delta_ts>2009-06-18 10:30:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>26467</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Kasting">pkasting</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>brettw</cc>
    
    <cc>emacemac7</cc>
    
    <cc>eric</cc>
    
    <cc>hyatt</cc>
    
    <cc>kevino</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>xan.lopez</cc>
    
    <cc>zecke</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>125702</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-13 18:08:28 -0700</bug_when>
    <thetext>Several good questions came up while I worked on bug 25709, including:
* Why isn&apos;t RGBA32Buffer called FrameBuffer?
* Why doesn&apos;t it use WebKit types like IntSize instead of &quot;int width, int height&quot;?
* How is it different than ImageBuffer?  Can the two be combined?
* Or maybe should it become more private to ImageDecoder and have all the decoders go through the ImageDecoder object?
* Can all the #if PLATFORM(...) stuff in it move to implementation-specific files, maybe by using subclasses or PIMPL or something?
* Can all the people using the cross-platform decoders use a common ImageSource?
* Should ImageSource and ImageDecoder merge?

I&apos;m sure I&apos;m missing some, too.

This bug is a good place to discuss or post idea patches.  I don&apos;t feel like I fully understand all the image decoder classes so for the time being I&apos;ll probably stick with cleanup like the first bullet or two at the top.

CCing some people who might have input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125705</commentid>
    <comment_count>1</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-13 18:46:03 -0700</bug_when>
    <thetext>Some more:

* Where is the difference between ImageBuffer and RGBA32Buffer now?
* Why should RGBA32Buffer ever know how to construct a native image? I opt for a method/function that takes a RGBA32 and gives you a NativeImagePtr. Skia code can still use secrets of the RGBA32Buffer to convert that...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125712</commentid>
    <comment_count>2</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-13 19:27:09 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; * Where is the difference between ImageBuffer and RGBA32Buffer now?

Yes, this was asked in comment 0.

&gt; * Why should RGBA32Buffer ever know how to construct a native image? I opt for
&gt; a method/function that takes a RGBA32 and gives you a NativeImagePtr. Skia code
&gt; can still use secrets of the RGBA32Buffer to convert that...

If you can whip up a patch I&apos;d be happy to look at it, even though I can&apos;t r+.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125762</commentid>
    <comment_count>3</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:26:59 -0700</bug_when>
    <thetext>Okay, let me start with patches to make the code cross-platform again. It was cross-platform in a sense that the decoded image buffer could be simply consumed (e.g. uploaded to the graphics server). There is no reason to not support this default case, it is useful to Qt (external patches), Torchmobile, the EFL port...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125763</commentid>
    <comment_count>4</comment_count>
      <attachid>31258</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:40:47 -0700</bug_when>
    <thetext>Created attachment 31258
Restore cross platform behavior

Restore the old behavior of RGBA32Buffer this includes only special casing Skia to have something else as buffer. This is restoring the capability to just consume the decoded image without undoing the Skia part.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125764</commentid>
    <comment_count>5</comment_count>
      <attachid>31259</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:42:16 -0700</bug_when>
    <thetext>Created attachment 31259
Make ImageDecoder.cpp cross-platform

There is no need to force every port to have the exact same implementation of RGBA32Buffer, the only symbol that is platform depended is the conversion to a NativeImage and that does not belong into the buffer class anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125765</commentid>
    <comment_count>6</comment_count>
      <attachid>31260</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:43:40 -0700</bug_when>
    <thetext>Created attachment 31260
Move the secret how to create a cairo_surface_t back to ImageSourceCairo.cpp

This makes ImageDecoder.cpp truly cross-platform again (without any #ifdef).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125766</commentid>
    <comment_count>7</comment_count>
      <attachid>31261</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:45:04 -0700</bug_when>
    <thetext>Created attachment 31261
Unfork the WX, no need to have an exact copy of the RGBA32Buffer... use the common code

Move the WX code back to ImageSourceWX.cpp and attempt to update the buildsystem. The whitespace is left there on purpose as this is mostly moving stuff around and not intended as a cleanup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125767</commentid>
    <comment_count>8</comment_count>
      <attachid>31262</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:46:14 -0700</bug_when>
    <thetext>Created attachment 31262
Call the thing by its name and rename ImageDecoder.cpp to RGBA32Buffer.cpp

The only symbols in this file are RGBA32Buffer symbols, rename the file to match the reality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125768</commentid>
    <comment_count>9</comment_count>
      <attachid>31263</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:47:23 -0700</bug_when>
    <thetext>Created attachment 31263
Unfork the various ImageSource*.cpp copies

Unfork the three copies of ImageSource.cpp and have a common copy, the only symbol that is platform specific is to convert the RGBA32Buffer into a native image pointer....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125769</commentid>
    <comment_count>10</comment_count>
      <attachid>31264</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 06:51:11 -0700</bug_when>
    <thetext>Created attachment 31264
Take out asNativeImagePtr

Proposal to take out the asNativeImagePtr from RGBA32Buffer and move it to skia specific files.

The name &quot;RGBA32Buffer&quot; indicates that the secret of the class is to hold a buffer for RGBA8888 pixel manipulation, I don&apos;t think the class should know how to construct a image, someone else should know how to turn the buffer into a NativeImage...

The only #ifdef&apos;s left in the code are for Skia header files and members and there is nothing at this point we can do to avoid that. So I will stop here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125771</commentid>
    <comment_count>11</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 09:02:30 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Restore the old behavior of RGBA32Buffer this includes only special casing Skia
&gt; to have something else as buffer. This is restoring the capability to just
&gt; consume the decoded image without undoing the Skia part.

I don&apos;t think this patch should be landed.  The Cairo and wx ports are about to move away from using Vector&lt;unsigned&gt; to store their data, which this patch prevents.  And no one else is actually using this.  Anyone who did would be better served by using their platform-specific storage type in the backend.

I don&apos;t think you grasp what a perf difference it makes not to use Vector&lt;unsigned&gt;.  This is necessary for anyone who wants to ship a performant renderer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125772</commentid>
    <comment_count>12</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 09:03:33 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; There is no need to force every port to have the exact same implementation of
&gt; RGBA32Buffer, the only symbol that is platform depended is the conversion to a
&gt; NativeImage and that does not belong into the buffer class anyway.

Again, this should not be landed.  This hinders the backends using appropriate per-platform storage classes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125774</commentid>
    <comment_count>13</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 09:07:01 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; Created an attachment (id=31263) [review]
&gt; Unfork the various ImageSource*.cpp copies

This is the only patch in this series I support.  I think this is fine, and in fact if we leave asNewNativeImage() (which I think is important to do) we can collapse the files entirely and not partially.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125775</commentid>
    <comment_count>14</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 09:11:33 -0700</bug_when>
    <thetext>I haven&apos;t given explicit &quot;no&quot; replies to every single patch, but that&apos;s because I think all but the ImageSource collapsing are really a single patch that simply undoes all of the ImageDecoder unforking.  You have never stated how you intend these ports to obtain acceptable performance or what concrete benefits this has.  I have worked with the image decoders for several years and know enough to say that this is a damaging set of patches that we should not land.  I think your only motivation is a mistaken sense of some sort of &quot;cross-platform&quot; idealism that fails to account for the real constraints here.

The original decoders weren&apos;t written the way they were because it was better.  They were written for one port as a quick experiment to get something onscreen.  Since then a few other ports have done the minimal amount of work to get images onscreen, but Chromium is the only one that has actively worked to make this code production-ready.  Don&apos;t undo this work when you don&apos;t have the background on why it was done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125777</commentid>
    <comment_count>15</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 10:16:02 -0700</bug_when>
    <thetext>I feel like this bug is being hijacked to flip things back to the &quot;bad&quot; old way, rather than being a useful conversation about how to make the whole image decoder better.

When Apple abandoned these decoders in favor of the CoreGraphics routines, they effectively headed down a road that provided superior performance through internal use of CGImageRef types (which abstract the various image types).  Peter&apos;s patches brought the image-decoder classes more in line with this philosophy.

It seems to me that the Qt port&apos;s objection is addressed entirely in the current sources, with the one small nit that there are now some #ifdefs in the header.


Perhaps we can figure out how to remove the #ifdef code from the header through PIMPL or some other technique.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125780</commentid>
    <comment_count>16</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 10:29:52 -0700</bug_when>
    <thetext>Another point in all this work is that the benefit of unforking Chromium&apos;s code is a huge benefit to the WebKit project, especially ports like GTK+/Windows Cairo that do not have access to the same development resources as Qt or Apple.  Prior to Peter&apos;s modifications, all the Cairo ports were unable to view XBM/ICO/BMP files, and with virtually no effort on our parts we now have these features.  I look forward to receiving other great new functionality and bug fixes as Google moves forward updating these now-shared image decoders as their team finds bugs, fixes performance issues, and so forth.

I am frankly dismayed by the poor attitude displayed in IRC and these bugs towards this work.  Google did not receive any benefit from doing this work, but the Linux and redistributable Windows ports gained significant useful functionality.  And the fact that as far as I can tell the majority of the objection boils down to a tirade over the presence of #ifdef guards in the header (perhaps temporarily) seems like a major overreaction.

It&apos;s nice that various embedded projects use the Qt environment and perhaps use the ImageDecoder stuff (which as far as I can tell is unimpeded by these changes).  But there are also cell phone companies, Windows API-compatible embedded projects, the Titanium project, and people that wish to have a redistributable WebKit on Windows that use the Windows Cairo port, as well as the myriad of Linux-based teams that use the GTK+ port, that will greatly benefit from these changes.

Backing Peter&apos;s changes out now will adversely affect all of these projects.

Now, can we please discuss how to make the image decoders *better*, rather than trying to undo history?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125814</commentid>
    <comment_count>17</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 14:14:30 -0700</bug_when>
    <thetext>(Adding Kevin Ollivier since he might have perspective on the wx side of things.)

Thanks for the comments, Brent.  For background, a chief reason to go the direction I have so far with RGBA32Buffer is to allow platforms to write directly into a native buffer that they can then avoid copying.  If you consider a single 1024 x 768 JPEG, storing the data in a Vector&lt;unsigned&gt; and then copying it to a native storage location costs 3 MB and the cpu time to copy.  Animated GIFs can be far worse than this since they have many frames, although the decoders go to some effort to scavenge memory for large GIFs.  And finally pages can have many images.  If you start paying 1 - 100 MB of extra memory, plus the time to memcpy it, on a page, you will quickly understand why the current design is useful.  And for backends that don&apos;t want to take the time to use this model yet, it still accommodates the Vector&lt;unsigned&gt; implementation quite well.

Now, since I read Holger&apos;s main concern as the existence of #ifdefs in ImageDecoder.h, I think there are ways to avoid them.  I&apos;m thinking of pulling RGBA32Buffer out into a separate header that can live in graphics/ instead of image-decoders/, which I hope would make Holger a bit more comfortable.  Given the little I have heard about ImageBuffer, I think its goals are probably similar enough to RGBA32Buffer that the two can be combined into a single class that represents a single native frame with per-pixel write access.  An Image can then be one or more of these frames and an ImageDecoder can write into an image or its frame(s).  The exact details will take some care to avoid memory corruption; over the lifetime of the Chromium port we&apos;ve managed to subtlely break image memory management several times, because it&apos;s quite tricky to get right.  I will also need to better understand the image caching system.

I don&apos;t know whether ImageSource in its current state has much utility or should be folded into another class, but I certainly like Holger&apos;s idea of collapsing all the separate implementaions into one for starters.  Another piece of work I know needs to be done is to make the BMP decoder decode on demand rather than when setData() is called; I wrote that decoder a couple years ago before I fully understood the ImageDecoder class, so it works but can waste CPU/memory.  Luckily BMP and ICO are not too common on the web so this doesn&apos;t turn out to be a huge headache.

I hope the suggestions above not only provide concrete ideas to move forward but go at least some way towards satisfying Holger&apos;s concerns.  While I don&apos;t think his patches on this bug are valid, I do think we can avoid #ifdefs in ImageDecoder if that&apos;s a real sticking point for any ports.  In the meantime, please let me know if the current system actively hinders any ports; comment 3 seems to imply that it is a problem for a number of people but I haven&apos;t heard specific feedback from any of them.  By contrast, the GTK and wx folks were very helpful last night on IRC in pointing out exactly what was and wasn&apos;t working, so I was able to work with them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125834</commentid>
    <comment_count>18</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 15:26:54 -0700</bug_when>
    <thetext>Unforking Chromium meant breaking Gtk+, WX, EFL, Torchmobile Windows CE. The cost of you &quot;unforking&quot; is that _now_ every port needs to copy and paste (fork) +115 lines of code. It is not a fair trade.... there is no reason to create this mess.

Performance: As with every thing it depends. For Skia and even the current Cairo usage I agree that the additional malloc, memcpy, free create problems in terms of memory copying and memory fragmentation and still in some cases this doesn&apos;t matter... E.g. you might have a memory strategy where you keep the compressed image in memory and move the uncompressed image to another process/system (e.g. GL, or Xserver memory) or you have API that can operate on the allocated memory without a memcpy.

And I strongly discourage forcing every port to copy and paste the exact +115 lines of RGBA32Buffer.cpp for absolutely no gain about the status quo of yesterday. It is no acceptable solution to force this duplication on ports.


Your changes have so many conceptually weaknesses that you make every other port suffer and this needs to change. I see you have a hardtime admitting that there is _no_ improvement for cairo, wx, EFL, yet. Instead you talk about a mystique future improvement... Copy and Pasting RGBA32Buffer is not the future. You should evaluate how to adjust the ImageBuffer interface and make ImageDecoder truly corss-platform again bringing your improvement to everyone with client side image memory.

Until then I strongly urge to unbreak the damage that was done to RGBA32Buffer.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125837</commentid>
    <comment_count>19</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 15:35:56 -0700</bug_when>
    <thetext>(In reply to comment #14)
&gt; I haven&apos;t given explicit &quot;no&quot; replies to every single patch, but that&apos;s because
&gt; I think all but the ImageSource collapsing are really a single patch that
&gt; simply undoes all of the ImageDecoder unforking.  You have never stated how you
&gt; intend these ports to obtain acceptable performance or what concrete benefits
&gt; this has.  I have worked with the image decoders for several years and know
&gt; enough to say that this is a damaging set of patches that we should not land. 
&gt; I think your only motivation is a mistaken sense of some sort of
&gt; &quot;cross-platform&quot; idealism that fails to account for the real constraints here.

You impose a big penalty on other ports for _no_ performance gain at all. You force to copy and paste code just to unfork Skia. You could nuke RGBA32Buffer completely in favor for extending ImageBuffer.

For your performance statement... let me cite the cairo documentation for me.

 * @data: a pointer to a buffer supplied by the application in which
 *     to write contents. This pointer must be suitably aligned for any
 *     kind of variable, (for example, a pointer returned by malloc).
 *
 * Creates an image surface for the provided pixel data. The output
 * buffer must be kept around until the #cairo_surface_t is destroyed
 * or cairo_surface_finish() is called on the surface.  The initial
 * contents of @buffer will be used as the initial image contents; you
 * must explicitly clear the buffer, using, for example,
 * cairo_rectangle() and cairo_fill() if you want it cleared.

so even for Cairo no _more_ changes than using a Vector&lt;char&gt; are needed (unless I&apos;m mistaken). So for no gain at all we have to live with a copy and paste of RGBA32Buffer... it is no gain at all... the only gain for you is to have unforked Chromium at the cost of forcing everyone else to copy and paste.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125843</commentid>
    <comment_count>20</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 16:38:35 -0700</bug_when>
    <thetext>(In reply to comment #18)
&gt; Unforking Chromium meant breaking Gtk+, WX, EFL, Torchmobile Windows CE. The
&gt; cost of you &quot;unforking&quot; is that _now_ every port needs to copy and paste (fork)
&gt; +115 lines of code. It is not a fair trade.... there is no reason to create
&gt; this mess.

Can we please tone down the hyperbole?  Let&apos;s review the actual events:
1.   Unforking only broke GTK+ very temporarily.  By the end of the day (PST) Friday the Windows Cairo and GTK+ code was in great shape and working better than ever.
2.  Once Kevin Ollivier was available on-line, Peter was able to get the wxWidgets port working properly and I believe things are fine there as well.
3.  As for the EFL and Windows CE ports, these are basically Qt ports, so this sounds akin to arguing that &quot;pkasting broke the Qt port, and he also broke the Qt port and the other Qt port to boot.&quot;

I don&apos;t think it&apos;s reasonable to demand source-level compatibility with projects that are not part of the WebKit tree.  Do you expect developers to scour the web searching for WebKit forks that might be affected by changes?  Should we feel guilty about breaking the code for groups that don&apos;t respond on the mailing lists and don&apos;t communicate on IRC?  For that matter, where is the Qt build bot to help ensure that although architectural issues might be introduced, at least build and stability regressions will not occur?

Finally, I disagree that &quot;every&quot; port must create a forked file.  It is more accurate to say that &quot;some graphical backends needs an implementation&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125845</commentid>
    <comment_count>21</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 16:45:24 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Created an attachment (id=31259) [review]
&gt; Make ImageDecoder.cpp cross-platform
&gt; 
&gt; There is no need to force every port to have the exact same implementation of
&gt; RGBA32Buffer, the only symbol that is platform depended is the conversion to a
&gt; NativeImage and that does not belong into the buffer class anyway.

I think there is a good reason for these methods to be backend-dependent.  As with Skia, the Cairo port will refer to the internal image buffer (rather than the array of bytes) to provide the implementations for these method calls.

I agree it looks a little silly right now, since the wx and Cairo ports are nearly identical, but I am planning to revise the Cairo version of this file to use internal Cairo buffer/image handling routines which will remove the seeming duplication here.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125847</commentid>
    <comment_count>22</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 16:49:48 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Created an attachment (id=31261) [review]
&gt; Unfork the WX, no need to have an exact copy of the RGBA32Buffer... use the
&gt; common code

This is related to the issue in comment #5 -- they are identical *today*, but in a few days they will NOT be the same.

I don&apos;t believe this change is desirable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125859</commentid>
    <comment_count>23</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 18:52:01 -0700</bug_when>
    <thetext>(In reply to comment #20)
&gt; 3.  As for the EFL and Windows CE ports, these are basically Qt ports, so this
&gt; sounds akin to arguing that &quot;pkasting broke the Qt port, and he also broke the
&gt; Qt port and the other Qt port to boot.&quot;

Plus, I asked repeatedly both on bugs and IRC for input from Qt port maintainers to ensure that my changes didn&apos;t break Qt, and it was my impression that Qt _isn&apos;t_ broken.  None of the Torchmobile or EFL people have asked for help in any way.  The only bustage to Qt I&apos;m aware of was the the temporary bustage about 48 hours ago that I _had already said I was planning to fix_ and that _was_ in fact worked around with a roughly 3-line patch (not a &quot;115 line copy&quot;).

These comments boil down to &quot;you kept other ports working by copying a few functions&apos; implementations temporarily.  THIS IS AN ENORMOUS PENALTY!&quot;  I think it&apos;s clear that this isn&apos;t an &quot;enormous penalty&quot; or in fact much of any penalty, since it applies to exactly _two_ ports (not CG, the most widely used port as part of Safari; not Skia, the second most widely used port as part of Chromium; and not QT, the port I broke so apparently badly), and in fact _I_ was the one that made the changes for those other ports, not those ports&apos; maintainers (although kollivier on IRC last night said the changes &quot;sounded easy&quot; before I went ahead and wrote the wx patch, so even that wasn&apos;t a big deal).  I could alternately have provided an ImageDecoder.cpp that implemented these two ports&apos; functions for things they have in common at the moment, but this seemed like just causing the ports additional hassle since as Brent said in comment 21 things are about to change even more.

In summary, Holger, you are arguing that I have caused great pain to wx and Cairo, but the only thing I&apos;ve caused is my _own_ patches to implement some functions that are shortly going to differ between the two ports, the Cairo maintainer doesn&apos;t agree with your position, and the wx maintainer has not spoken.  And you give little indication as to whether the idea of moving RGBA32Buffer into a class in graphics/ would satisfy you at all: some of your comments sound as if it would, but they are so tangled in comments about how I must reverse my patches (rather than simply move toward merging these two classes, which is surely easier now if I&apos;ve actually made RGBA32Buffer more like ImageBuffer) that I don&apos;t know what to think.

This isn&apos;t productive dialog at all.  Be reasonable and stop trying to use other ports as weapons against me when their maintainers disagree with you or are silent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125864</commentid>
    <comment_count>24</comment_count>
    <who name="Kevin Ollivier">kevino</who>
    <bug_when>2009-06-14 19:45:30 -0700</bug_when>
    <thetext>I don&apos;t really want to get in the middle of all this, but for the record, I really feel that only people who actually build and run the wx port are entitled to speak for it. I&apos;m certainly not happy about port breakages, but that&apos;s really a side-effect of not being on the build bot, so I don&apos;t hold committers personally responsible for breakages they can&apos;t easily become aware of. 

As for the rest, honestly, I just don&apos;t see what is so contentious about this change. I certainly haven&apos;t seen any evidence (e.g. benchmarks, etc.) of the kind of performance or functional regression that would warrant a revert. The rest of the criticisms seem to be issues of design and/or style, and while platform #ifdefs aren&apos;t pretty, they aren&apos;t exactly forbidden in WebCore, so I really don&apos;t see how their existence is somehow grounds for revert. It looks like some interesting ideas have already been floated about in regards to removing them, though, so I think it&apos;s a shame that the focus of this discussion has mostly been on reverting rather than on a patch (or patches) to improve what&apos;s already there. 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125874</commentid>
    <comment_count>25</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 21:14:27 -0700</bug_when>
    <thetext>(In reply to comment #23)
&gt; (In reply to comment #20)
&gt; &gt; 3.  As for the EFL and Windows CE ports, these are basically Qt ports, so this
&gt; &gt; sounds akin to arguing that &quot;pkasting broke the Qt port, and he also broke the
&gt; &gt; Qt port and the other Qt port to boot.&quot;

I don&apos;t even know where to start to get the record straight...

1.) EFL is using EFL... and not Qt...
2.) Torchmobile is a Windows CE port
3.) Me using image-decoders on Qt, yes is Qt related...


&gt; Plus, I asked repeatedly both on bugs and IRC for input from Qt port
&gt; maintainers to ensure that my changes didn&apos;t break Qt, and it was my impression
&gt; that Qt _isn&apos;t_ broken.  None of the Torchmobile or EFL people have asked for
&gt; help in any way.  The only bustage to Qt I&apos;m aware of was the the temporary
&gt; bustage about 48 hours ago that I _had already said I was planning to fix_ and
&gt; that _was_ in fact worked around with a roughly 3-line patch (not a &quot;115 line
&gt; copy&quot;).

I don&apos;t event want to go in the process. Landing patches with a reviewer raising his flag is not nice and the responses I got on irc are not making me feel comfortable about Chromium at all. But leave that out for now.



&gt; 
&gt; These comments boil down to &quot;you kept other ports working by copying a few
&gt; functions&apos; implementations temporarily.  THIS IS AN ENORMOUS PENALTY!&quot;  I think
&gt; it&apos;s clear that this isn&apos;t an &quot;enormous penalty&quot; or in fact much of any
&gt; penalty, since it applies to exactly _two_ ports (not CG, the most widely used
&gt; port as part of Safari; not Skia, the second most widely used port as part of
&gt; Chromium; and not QT, the port I broke so apparently badly), and in fact _I_
&gt; was the one that made the changes for those other ports, not those ports&apos;
&gt; maintainers (although kollivier on IRC last night said the changes &quot;sounded
&gt; easy&quot; before I went ahead and wrote the wx patch, so even that wasn&apos;t a big
&gt; deal).  I could alternately have provided an ImageDecoder.cpp that implemented
&gt; these two ports&apos; functions for things they have in common at the moment, but
&gt; this seemed like just causing the ports additional hassle since as Brent said
&gt; in comment 21 things are about to change even more.

In a way I fundamentally disagree with.
 
&gt; In summary, Holger, you are arguing that I have caused great pain to wx and
&gt; Cairo, but the only thing I&apos;ve caused is my _own_ patches to implement some
&gt; functions that are shortly going to differ between the two ports, the Cairo
&gt; maintainer

which is alp and me as we inherited it and not brent!




&gt; This isn&apos;t productive dialog at all.  Be reasonable and stop trying to use
&gt; other ports as weapons against me when their maintainers disagree with you or
&gt; are silent.

Sigh.


To summarize:

I disagree with the changes to RGBA32Buffer. I think Skia should move towards making ImageBuffer suitable for use and nuke RGBA32Buffer all together or make truly cross platform. It is no acceptable temporarily solution to create a copy of clones (cairo, wx, Qt... whatever port)... it is moving in the wrong direction and my patch is reinforcing it.


And second. There is no reason to change the default behavior (no reason to #ifdef for CAIRO,WX), it should work for everyone (with eventually some performance impacts):

   1.) sometimes the decoded image is just copied somewhere else
   2.) some graphics libraries (e.g. cairo) allow you to adopt the memory and there will be exactly one conversion to image triggered the BitmapImage::cacheFrame.

and again my patch is restoring sanity.


So from my point of view your changes shouldn&apos;t have landed as they are a step back and not one ahead. The way ahead is to move the code over to ImageBuffer which I&apos;m very supportive of and until then I want the sanity of the old solution back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125878</commentid>
    <comment_count>26</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 22:04:55 -0700</bug_when>
    <thetext>(In reply to comment #25)
&gt; I don&apos;t even know where to start to get the record straight...
&gt; 
&gt; 1.) EFL is using EFL... and not Qt...
&gt; 2.) Torchmobile is a Windows CE port
&gt; 3.) Me using image-decoders on Qt, yes is Qt related...

I based the EFL comment on the EFL Wiki (&quot;EFL WebKit is a project aiming at porting this WebKit to the Enlightenment Foundation Libraries, and as the developers also work on the Qt port, we try to keep the implementation as close as possible to that of QtWebKit.&quot;).  I guess on closer reading that the Qt stuff was not actually related to the EFL work.

Regarding Torchmobile, I ran across &quot;Our source code is now imported into the git server at git://code.staikos.net/ alongside the QtWebKit and Torch Mobile Qt WebKit code, and we hope to move active development into git in the near future.&quot;, but I now see that there are two Torch Mobile ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125879</commentid>
    <comment_count>27</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 22:09:20 -0700</bug_when>
    <thetext>(In reply to comment #25)
&gt; (In reply to comment #23)
&gt; &gt; (In reply to comment #20)

Or in more simple words:
      1.) The WebCore/image-decoders where cross-platform without a performance impact on Cairo
          (as the image data was not copied and the cairo_image_surface was created exactly once, at least to what I think is right)

      2.) Now we have multiple copies of RGBA32Buffer.cpp and every port that wants to use the decoders need to copy it. Which makes the WebCore/image-decoders not cross-platform

      3.)
         a) Make them cross-platform again (this series) as they are just fine for Cairo (again up to my knowledge).
         b) Make them fast and cross-platform for everyone (including Skia) by using ImageBuffer.


We are at 2nd, I did 3a, you can do 3b and the amount of users does not matter, we are at a technical issue here (otherwise one should work on the IE Team).
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125880</commentid>
    <comment_count>28</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 22:11:56 -0700</bug_when>
    <thetext>(In reply to comment #26)
&gt; (In reply to comment #25)
&gt; &gt; I don&apos;t even know where to start to get the record straight...
&gt; &gt; 
&gt; &gt; 1.) EFL is using EFL... and not Qt...
&gt; &gt; 2.) Torchmobile is a Windows CE port
&gt; &gt; 3.) Me using image-decoders on Qt, yes is Qt related...
&gt; 
&gt; I based the EFL comment on the EFL Wiki (&quot;EFL WebKit is a project aiming at
&gt; porting this WebKit to the Enlightenment Foundation Libraries, and as the
&gt; developers also work on the Qt port, we try to keep the implementation as close
&gt; as possible to that of QtWebKit.&quot;).  I guess on closer reading that the Qt
&gt; stuff was not actually related to the EFL work.
&gt; 
&gt; Regarding Torchmobile, I ran across &quot;Our source code is now imported into the
&gt; git server at git://code.staikos.net/ alongside the QtWebKit and Torch Mobile
&gt; Qt WebKit code, and we hope to move active development into git in the near
&gt; future.&quot;, but I now see that there are two Torch Mobile ports.


And just for the record. I don&apos;t mind source level breakage. Apple is doing it all the time and it is the right thing to do as things progress in a good way. I just have so many issues with the RGBA32Buffer approach, technically  it is not the right one(tm).

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125886</commentid>
    <comment_count>29</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 22:36:48 -0700</bug_when>
    <thetext>I had a long reply, but I see no purpose in it.  I will restrict my comments to this:

(In reply to comment #28)
&gt; And just for the record. I don&apos;t mind source level breakage. Apple is doing it
&gt; all the time and it is the right thing to do as things progress in a good way.

I find this disingenuous.

&gt; I just have so many issues with the RGBA32Buffer approach, technically  it is
&gt; not the right one(tm).

While I respect your position as a port maintainer, given your comments on IRC and the past couple bugs, I believe that the people disagreeing with you have superior knowledge of this particular area of the code and how the various ports have been affected.  As Kevin noted, there are no performance or bustage problems with my patch and I don&apos;t think your dislike of 83 lines (I counted) of common C++ implementation copied to _one_ additional location for the time being is a sufficient reason for reverting.  So I think we are simply going to have to disagree on the approach.

That said, given that you would like to see this code merged with ImageBuffer, I would like to ask (as a way of burying the hatchet) if you know the ImageBuffer code well enough to provide some sample patches on how this can be done.  Clearly you&apos;re capable of whipping up patches very quickly, and as I&apos;ve already mentioned, ImageBuffer is a class I&apos;m not as familiar with.  If you can help with this I&apos;d be most grateful, as that was one of the reasons I reported the bug in the first place.

We can keep arguing about what to do in the interim, or we can try to work together to get to an end state that we can both be happy with.  Please, work with me here, not against me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125887</commentid>
    <comment_count>30</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 22:41:17 -0700</bug_when>
    <thetext>(In reply to comment #17)
&gt; Now, since I read Holger&apos;s main concern as the existence of #ifdefs in
&gt; ImageDecoder.h, I think there are ways to avoid them.  I&apos;m thinking of pulling
&gt; RGBA32Buffer out into a separate header that can live in graphics/ instead of
&gt; image-decoders/, which I hope would make Holger a bit more comfortable.  Given
&gt; the little I have heard about ImageBuffer, I think its goals are probably
&gt; similar enough to RGBA32Buffer that the two can be combined into a single class
&gt; that represents a single native frame with per-pixel write access.  An Image
&gt; can then be one or more of these frames and an ImageDecoder can write into an
&gt; image or its frame(s).  The exact details will take some care to avoid memory
&gt; corruption; over the lifetime of the Chromium port we&apos;ve managed to subtlely
&gt; break image memory management several times, because it&apos;s quite tricky to get
&gt; right.  I will also need to better understand the image caching system.

This seems reasonable to me.  After looking things over, the stuff in ImageDecoder (RGBA32Buffer) that is duplicated in wx and Cairo are themselves duplicates of concepts in the ImageBuffer class.

To build on some of Holger&apos;s suggestions, could the RGBA32Buffer be handled as a cross-platform base class (which the ImageBuffer would inherit from), and push the platform-specific logic into the individual ImageBuffer classes?  The decoder class could then deal in ImageBuffers:

RGBA32Buffer::clear &lt;==&gt; ImageBuffer::clearImage
RGBA32Buffer::width/height &lt;==&gt; ImageBuffer::size

ImageBuffer would inherit some pixel-level access methods, which might or might not be useful/good.
 
&gt; [...] but I certainly like Holger&apos;s idea of collapsing all the separate implementaions into one for
&gt; starters.

Agreed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125888</commentid>
    <comment_count>31</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 22:48:17 -0700</bug_when>
    <thetext>(In reply to comment #30)
&gt; This seems reasonable to me.  After looking things over, the stuff in
&gt; ImageDecoder (RGBA32Buffer) that is duplicated in wx and Cairo are themselves
&gt; duplicates of concepts in the ImageBuffer class.

That is good to hear.  I can start trying to understand ImageBuffer tomorrow, hopefully soon I will grasp it enough to make a concrete proposal.  Sounds promising though.

&gt; To build on some of Holger&apos;s suggestions, could the RGBA32Buffer be handled as
&gt; a cross-platform base class (which the ImageBuffer would inherit from), and
&gt; push the platform-specific logic into the individual ImageBuffer classes?  The
&gt; decoder class could then deal in ImageBuffers:
&gt; 
&gt; RGBA32Buffer::clear &lt;==&gt; ImageBuffer::clearImage
&gt; RGBA32Buffer::width/height &lt;==&gt; ImageBuffer::size
&gt; 
&gt; ImageBuffer would inherit some pixel-level access methods, which might or might
&gt; not be useful/good.

I am too ignorant to say at the moment.  My one concern with having too much of an inheritance hierarchy is that I&apos;d like to make sure there is not much overhead involved in things that happen in the inner loop of the decoders, which is primarily &quot;set this pixel&quot;.  In fact I could have avoided most of the current #ifdefs in ImageDecoder.h if I just made getAddr() not be inline, but I was worried about not wanting to hurt performance.

I should probably run some tests on some Chromium builds (as we have good perf-testing infrastructure) to see whether this kind of thing actually hurts.  Pointless optimization just hurts readability.

In the meantime, don&apos;t be shy about posting patches if you want; code is always more concrete than a description.

&gt; &gt; [...] but I certainly like Holger&apos;s idea of collapsing all the separate implementaions into one for
&gt; &gt; starters.
&gt; 
&gt; Agreed.

I will post an updated version of that patch tomorrow that will apply to the tree as-is (and, I suspect, remove all the per-platform files here).  Eventually I&apos;d like to take a look at the function this class is performing to ensure it makes sense.  Of course, eventually I&apos;d like to write a detailed design doc for the entire image subsystem :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125890</commentid>
    <comment_count>32</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-14 23:04:22 -0700</bug_when>
    <thetext>Looking some of this stuff over, the fact that getImageData always returns a copy seems inefficient.  Consider the code in svg/graphics/SVGResourceMasker.cpp::applyMask:

    PassRefPtr&lt;CanvasPixelArray&gt; srcPixelArray(m_mask-&gt;getImageData(intImageRect)-&gt;data());
    PassRefPtr&lt;ImageData&gt; destImageData(luminancedImage-&gt;getImageData(intImageRect));

    for (unsigned pixelOffset = 0; pixelOffset &lt; srcPixelArray-&gt;length(); pixelOffset++) {
        unsigned pixelByteOffset = pixelOffset * 4;

        unsigned char r = 0, g = 0, b = 0, a = 0;
        srcPixelArray-&gt;get(pixelByteOffset, r);
        srcPixelArray-&gt;get(pixelByteOffset + 1, g);
        srcPixelArray-&gt;get(pixelByteOffset + 2, b);
        srcPixelArray-&gt;get(pixelByteOffset + 3, a);

        double luma = (r * 0.2125 + g * 0.7154 + b * 0.0721) * ((double)a / 255.0);

        destImageData-&gt;data()-&gt;set(pixelByteOffset + 3, luma);
    }

I *think* the srcPixelArray is a full copy of the data (based on the ImageBuffer source), but is only ever read.  I guess the copy is made to provide an &quot;intImageRect&quot;-sized window into the source, but I wonder if this copy could be avoided somehow.

What if the intImageRect is the size of the source image?  It seems like having a way to return an immutable view of the original image data would be useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125894</commentid>
    <comment_count>33</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-14 23:13:38 -0700</bug_when>
    <thetext>(In reply to comment #27)
&gt;           (as the image data was not copied and the cairo_image_surface was
&gt; created exactly once, at least to what I think is right)

BTW Brent, I think this is correct, and may actually be a bug.  From my reading of some of the Cairo docs today, cairo_image_surface_create_for_data() doesn&apos;t copy the data, which means your returned surface is at the merge of the lifetime of the RGBA32Buffer -- which is managed by the ImageDecoder, which may delete it (see e.g. clear()).  I don&apos;t think it&apos;s safe to have the frames returned from the ImageSource depend on the vagaries of the ImageDecoder.  I assumed this code was copying since wx copies, Skia refs, and when we used to have a different backing implementation here, we had all kinds of problems until we ensured that the lifetimes were separate.

So you may want to see if you can write this in a way that allocates the buffer in some kind of a refcounted object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125896</commentid>
    <comment_count>34</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-06-14 23:40:04 -0700</bug_when>
    <thetext>(In reply to comment #33)
&gt; (In reply to comment #27)
&gt; &gt;           (as the image data was not copied and the cairo_image_surface was
&gt; &gt; created exactly once, at least to what I think is right)
&gt; 
&gt; BTW Brent, I think this is correct, and may actually be a bug.  From my reading
&gt; of some of the Cairo docs today, cairo_image_surface_create_for_data() doesn&apos;t
&gt; copy the data, which means your returned surface is at the merge of the
&gt; lifetime of the RGBA32Buffer -- which is managed by the ImageDecoder, which may
&gt; delete it (see e.g. clear()).  I don&apos;t think it&apos;s safe to have the frames
&gt; returned from the ImageSource depend on the vagaries of the ImageDecoder.  I
&gt; assumed this code was copying since wx copies, Skia refs, and when we used to
&gt; have a different backing implementation here, we had all kinds of problems
&gt; until we ensured that the lifetimes were separate.

I&apos;m not aware of any crash/issue with the Cairo backend, I don&apos;t remember seeing a crash in it since 2007... anyway. I take that as an ACK that the default implementation of Vector&lt;PixelData&gt; can be the &quot;optimized&quot; version for some platforms?

See, it would be so much easier if you would ack when you mess things up... Until now you are not even able to ACK that you made something that was cross-platform need platform specific code. Instead you defend it by saying &quot;Copy and Paste ain&apos;t bad.&quot; and that Skia is the 2nd most often used platform. Please at least ack that you removed the cross platform property. 

See I honestly care about all ports and making their life more easy and I&apos;m just afraid you continue this way (making code less portable).

 greetings from your general reviewer, Gtk+, Qt maintainer and janitor.

PS: Maybe just ack that your changes made things less portable?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125897</commentid>
    <comment_count>35</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-15 00:04:07 -0700</bug_when>
    <thetext>(In reply to comment #34)
&gt; anyway. I take that as an ACK that the
&gt; default implementation of Vector&lt;PixelData&gt; can be the &quot;optimized&quot; version for
&gt; some platforms?

No, I don&apos;t think the existing implementation, as-is, is appropriate for any platform.

However, I will certainly acknowledge that I believed the Cairo call in question copied its source pointer when it in fact didn&apos;t.

&gt; See, it would be so much easier if you would ack when you mess things up...

I would prefer if you did not take a patronizing tone with me.

&gt; See I honestly care about all ports and making their life more easy

I guess I will take your word for that.  Perhaps you could take my word that that is also the motivation for these changes.  And perhaps we could please, please, for crying out loud, stop discussing bug 25709 and start talking about something productive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125960</commentid>
    <comment_count>36</comment_count>
    <who name="Adam Treat">manyoso</who>
    <bug_when>2009-06-15 09:02:09 -0700</bug_when>
    <thetext>&lt;quote&gt;While I respect your position as a port maintainer, given your comments on IRC
and the past couple bugs, I believe that the people disagreeing with you have
superior knowledge of this particular area of the code and how the various
ports have been affected.&lt;/quote&gt;

This looks like an argument from authority to me and was in response to a technical argument made by Holger that the RGBA32Buffer class should, in fact, reflect its actual name.  Also, it is not clear to me that the argument to authority in this particular instance even works conceptually.  Regardless, I believe technical arguments should be given technical responses rather than relying upon logical fallacies.

From my vantage it seems that Holger has raised specific qualms with the design introduced by these recent changes and met with the following responses:

1) The changes are already in the tree...
2) It fixes a performance problem in some ports (although I haven&apos;t seen a rebuttal to Holger&apos;s point that the GTK+ port did not suffer such a problem.)
3) Changes that will be made in the future will address the design problem.

None of these seem to be responsive to me.  One is clearly not an answer. Two might well be true, but this doesn&apos;t absolve the changes with regard to the stated design problem.  Three is also clearly not an answer.

Whatever the merits of the recent changes I think Holger&apos;s objections based on a fundamental design problem should be given due attention and resolved before proceeding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125975</commentid>
    <comment_count>37</comment_count>
    <who name="Kevin Ollivier">kevino</who>
    <bug_when>2009-06-15 10:02:11 -0700</bug_when>
    <thetext>(In reply to comment #36)
&gt; &lt;quote&gt;While I respect your position as a port maintainer, given your comments
&gt; on IRC
&gt; and the past couple bugs, I believe that the people disagreeing with you have
&gt; superior knowledge of this particular area of the code and how the various
&gt; ports have been affected.&lt;/quote&gt;
&gt; 
&gt; This looks like an argument from authority to me and was in response to a
&gt; technical argument made by Holger that the RGBA32Buffer class should, in fact,
&gt; reflect its actual name.  Also, it is not clear to me that the argument to
&gt; authority in this particular instance even works conceptually.  Regardless, I
&gt; believe technical arguments should be given technical responses rather than
&gt; relying upon logical fallacies.

I have to say that a problem with the naming of the RGBA32Buffer class doesn&apos;t sound like a technical argument at all to me, as different people may conceptualize tbe name differently, and I&apos;d like to know what empirical technical data could be used to prove one side or the other&apos;s conceptualization as correct.

Technical arguments can be proven or disproven with performance benchmarks, unit tests, or other empircal data, and I have yet to see anything of the sort that shows a technical problem in Peter&apos;s design. Do you or Holger have such empirical data to show? Because you have not yet done so according to the bug tracker. Without empirical data, what&apos;s left is people&apos;s opinions, and frankly I think mostly this has been a long debate about a difference of opinion that has gotten really heated. In that case, I think what&apos;s best is for everyone to take a step back and cool down and re-think whether this whole debate over reverting is really the only way to go about resolving the problem, or whether it can really have a productive outcome. 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125976</commentid>
    <comment_count>38</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2009-06-15 10:06:48 -0700</bug_when>
    <thetext>(In reply to comment #34)
&gt; See I honestly care about all ports and making their life more easy and I&apos;m
&gt; just afraid you continue this way (making code less portable).
&gt; 
&gt;  greetings from your general reviewer, Gtk+, Qt maintainer and janitor.
&gt; 
&gt; PS: Maybe just ack that your changes made things less portable?

I was the main maintainer of the Chromium image decoders before Peter was. I had originally moved them completely out of the WebCore port directory with the intention of not sharing with other platforms at all since I figured it might be too much bother.

Instead Peter is spending a bunch of time trying to unify our code (which, though in some places is quite messy, generally works much better than ports other than CG). There is no reason for this work other than helping other ports in WebKit as far as I can tell, and your accusations are generally upsetting to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125977</commentid>
    <comment_count>39</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-15 10:12:21 -0700</bug_when>
    <thetext>(In reply to comment #34)
&gt;  greetings from your general reviewer, Gtk+, Qt maintainer and janitor.
&gt; 
&gt; PS: Maybe just ack that your changes made things less portable?
&gt; 

Hi Holger -- Setting all that aside, do you have any suggestions regarding Peter&apos;s request regarding ImageBuffer modifications:

&gt; [...] [do] you know the ImageBuffer code well enough to provide some sample patches on how
&gt; [merging RGBA32Buffer and ImageBuffer] can be done?  Clearly you&apos;re capable of whipping up
&gt; patches very quickly, and as I&apos;ve already mentioned, ImageBuffer is a class I&apos;m not as familiar with.
&gt; If you can help with this I&apos;d be most grateful, as that was one of the reasons I reported
&gt; the bug in the first place.

I also don&apos;t know this area as well as I would like, and I think you could help us avoid any further architectural
faux pas that don&apos;t help us advance the project.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125978</commentid>
    <comment_count>40</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-15 10:17:05 -0700</bug_when>
    <thetext>(In reply to comment #36)
&gt; Whatever the merits of the recent changes I think Holger&apos;s objections based on
&gt; a fundamental design problem should be given due attention and resolved before
&gt; proceeding.

I have spent over twenty hours in the past two days trying to respond to Holger&apos;s concerns.  If I have not given them &quot;due attention&quot; it has certainly not been for lack of trying.

While I tend to agree with Kevin Ollivier&apos;s recent comment that this is more an issue of semantics that cannot truly be resolved with facts, I will do my best to elaborate my responses to anything technical I can discern:

As far as I understand it the specific concern raised is that RGBA32Buffer should use a Vector&lt;unsigned&gt; as its low-level storage type.  The reason for this seems to be:
(1) That&apos;s what it was doing before
(2) This is sufficient for all ports

My answer to this technical concern was that (1) is not really a justification for anything and (2) is not accurate.  Vector&lt;unsigned&gt; is not usable by the Skia port today, which is the primary concern; it is in my opinion inappropriate for the wx port long term and not the best design for the Cairo port, though these are secondary issues.  (I was about to write up some patches which would, in fact, convert these ports to using a different backing store, so the question of &quot;future&quot; work here was not very abstract.)

There was an additional concern raised that other ports now needed to do extra work to use the image decoders.  I don&apos;t believe this is a practical objection as I am aware of no other ports making such an effort.  I don&apos;t feel a design should be based on elevating the concerns of hypothetical other ports over the real needs of existing ports.

There was an additional concern raised that using NativeImagePtr from ImageDecoder.h is a &quot;layering violation&quot;.  I have worked with the image decoders for several years now and have never been made aware of any layering requirement to avoid this type.

Both sides expressed interest in merging the functionality of RGBA32Buffer and ImageBuffer and the proposed difference in action seemed solely to be, whether or not to revert some changes in ImageDecoder.* before doing this work.  Given that I see no gain from doing this, I don&apos;t understand how this is anything other than a time cost and a hindrance to doing the work.

In summary, I believe the technical concerns raised were mainly that the work done on bug 25709 decreased the &quot;cross-platformness&quot; of ImageDecoder and related classes, to which my response was that these were certainly not sufficiently cross-platform before to account for all platforms, but now are; and that the changes made to accommodate ports like Skia were not harmful to other ports (and thus should be backed out and rethought) but instead helpful (now, for minor things like removing ImageSourceXXX.cpp files, and in the future, for writing clearer or more efficient backend storage functions).  As far as I know Holger continues to disagree with me on this and I do not know how to further resolve this disagreement, which is why I proposed attempting to reach a state where ImageBuffer and RGBA32Buffer are merged as quickly as possible.

I hope this is helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125990</commentid>
    <comment_count>41</comment_count>
    <who name="Adam Treat">manyoso</who>
    <bug_when>2009-06-15 11:17:15 -0700</bug_when>
    <thetext>I appreciate that a lot of time has been spent trying to rectify the disagreements over the scope of these changes and that everyone involved is earnestly looking for the correct and proper way forward, but respectfully, I don&apos;t think the issue is simply one of the now improper name of RGBA32Buffer.  Were that the case, RGBA32Buffer could simply be renamed to something more appropriate.  Rather, it is the case that the image-decoders as now configured are no longer cross-platform and regardless whether this is a layering violation or not, I think it prudent to consider whether this is wise in the long term.

From a technical perspective let&apos;s list the pros and cons mentioned as we currently stand:

Pro:
1) As Skia is currently written (to my knowledge) this is a definite performance advantage as it removes the necessity for a copy of the buffer into the native Skia bitmap type.
2) ... I&apos;ve seen pkasting mention that the current Vector&lt;unsigned&gt; is suboptimal for Cairo and WX, but I haven&apos;t seen the details of what this will move to and whether or not there is any possibility Cairo/WX/FooPort can share the future backend data store.  It&apos;d be nice to have more info please.

Con:
1) We lose flexibility in the image-decoders as they now depend on platform/graphics
2) Duplication of effort with ImageBuffer
3) Merging with mozilla versions becomes harder
4) Introducing copy+paste code which is is frowned upon. Cairo and WX (and presumably all future ports that wish to use this) have the exact same implementation of  ImageDecoderFoo except for the &apos;asNewNativeImage&apos; method.

Given the above, I&apos;d like to know if it&apos;d be possible for Skia to introduce a ctor for its SkBitmap that can take an existing buffer without copying, much as Cairo and Qt are doing now.  What would this lose the Skia port and/or how is it insufficient given #2 above?

RE: Kevin 

Techical arguments do not always require empirical data of the sort you are requesting.  Patches are often turned down based on technical reasons other than a lack of unit tests or benchmarks.

RE: Brett

Peter has made very valuable contributions to the image-decoders.  No one disputes that.  However, _so far_ I have a hard time seeing the benefits to the other ports in the recent changes other than the opportunity to share the code with the Skia port.  Maybe I&apos;m not reading something correctly...

RE: Peter

I don&apos;t think you can honestly object that the changes _have_ made the image-decoders less _cross-platform_.  Where before the code was not particularly dependent on any platform, now it is.  Anyways, can you elaborate on the pro #2 above and the related question of whether it&apos;d be sufficient to introduce a new ctor to SkBitmap instead to operate on the underlying RGB32Buffer without a memcpy?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125996</commentid>
    <comment_count>42</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-15 11:43:08 -0700</bug_when>
    <thetext>(In reply to comment #41)
&gt; 2) ... I&apos;ve seen pkasting mention that the current Vector&lt;unsigned&gt; is
&gt; suboptimal for Cairo and WX, but I haven&apos;t seen the details of what this will
&gt; move to and whether or not there is any possibility Cairo/WX/FooPort can share
&gt; the future backend data store.  It&apos;d be nice to have more info please.

As Holger pointed out, Cairo can &apos;adopt&apos; memory (without copy) so there does appear to be less of a performance impact than initially thought.  However, there might be some advantages gained by calling some of the cairo_surface_t-based calls rather than performing math on the raw vectors, and I think this should be considered as a potential performance gain.

&gt; Con:
&gt; 2) Duplication of effort with ImageBuffer

Well, the point of this current bug is to move much of the RGBA32Buffer logic to ImageBuffer, so perhaps this isn&apos;t really a con so much as an active development goal.

&gt; RE: Brett
&gt; 
&gt; Peter has made very valuable contributions to the image-decoders.  No one
&gt; disputes that.  However, _so far_ I have a hard time seeing the benefits to the
&gt; other ports in the recent changes other than the opportunity to share the code
&gt; with the Skia port.  Maybe I&apos;m not reading something correctly...

We now have image-decoder implementations for BMP, XBM, and ICO, which did not previously exist.  GTK+, wxWindows, and Cairo can now use these implementations which I do consider to be benefits to these other ports.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125999</commentid>
    <comment_count>43</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-15 12:19:58 -0700</bug_when>
    <thetext>(In reply to comment #41)
&gt; Rather, it is the case that the image-decoders as now configured
&gt; are no longer cross-platform and regardless whether this is a layering
&gt; violation or not, I think it prudent to consider whether this is wise in the
&gt; long term.

Thank you for the calm tone in this reply :)

&gt; 2) ... I&apos;ve seen pkasting mention that the current Vector&lt;unsigned&gt; is
&gt; suboptimal for Cairo and WX, but I haven&apos;t seen the details of what this will
&gt; move to and whether or not there is any possibility Cairo/WX/FooPort can share
&gt; the future backend data store.  It&apos;d be nice to have more info please.

From a high level, the idea for Cairo is for setSize() to do a cairo_image_create_surface(), have the operations that write pixels operate on that surface, and have asNewNativeImage() simply return a copy of the surface (which is cheap as Cairo surfaces refcount like Skia bitmaps do, from my limited reading of the Cairo APIs).

For wx the idea is similar except to use a wxBitmap instead of a cairo_surface_t.  The benefits are more concrete for wx as it is definitely not only copying the data when reading it out, but also flipping BGRA -&gt; RGBA.

Another benefit here is that the data ownership becomes more clear: the lifetime of the returned pointer is not tied to the lifetime of the RGBA32Buffer inside the ImageDecoder.  Holger says he hasn&apos;t seen any problems in the Cairo port due to this, and I believe him.  I&apos;m still not certain that it&apos;s _not_ a problem for Cairo given that we had issues with Skia with this, and I believe the Skia backend is far more well-tested on the web at large than the other non-CG ports.  On net I&apos;m not sure how much weight to give this concern but I am not willing to dismiss it.

&gt; Con:
&gt; 1) We lose flexibility in the image-decoders as they now depend on
&gt; platform/graphics

If you could elaborate more on this loss I&apos;d be interested.  I&apos;m not completely sure what sorts of flexibility are actually disappearing; on the surface, #include &quot;FrameBuffer.h&quot; where that header lives in graphics/ does not seem different to me than if it lives in image-decoders/.

&gt; 2) Duplication of effort with ImageBuffer

I consider this an active area of development interest.  To the degree that the two are duplicated, we should definitely converge.

Note that if the two weren&apos;t precisely duplicated before, but are now and can be combined, without loss of performance, then there is a net code (and complexity) savings.  This isn&apos;t yet quantifiable since there aren&apos;t yet concrete designs here.

&gt; 3) Merging with mozilla versions becomes harder

I object to this for two reasons.  First, the Mozilla decoders used are pretty much limited to the files in GIFImageReader.*; the JPEG/PNG decoders are just wrappers around libjpg and libpng, the XBM/ICO/BMP decoders were written by Google, and the files in GIFImageDecoder.* were written by hyatt long ago to shim the Mozilla decoders into WebKit.  So when we focus narrowly on what&apos;s actually been copied from Mozilla, we find that the series of patches on bug 25709 barely affected it at all, since they were to GIFImageDecoder.* rather than GIFImageReader.*.  Thus I don&apos;t think merging has actually become harder.

Second, to my knowledge there is no maintainer of these decoders on the WebKit side and has been no attempt to merge new code from Mozilla.  As far as I know I&apos;ve been the only one working with the GIF decoder&apos;s internals for a few years, and Eric Seidel noted to me privately that whether I like it or not, I have basically taken over ownership of these decoders.  In that light, it doesn&apos;t seem like merging was actively happening or was an interest of any of the other coders, at least not more than other responsibilities they had.

Finally, I am in fact interested in looking at more recent work by Mozilla, especially color profile support, as this is a notable lack in the cross-platform decoders compared to the CG ones.  So I expect that at some point I will be attempting a merge, and if there are difficulties at that point I am willing to resolve them.

&gt; 4) Introducing copy+paste code which is is frowned upon. Cairo and WX (and
&gt; presumably all future ports that wish to use this) have the exact same
&gt; implementation of  ImageDecoderFoo except for the &apos;asNewNativeImage&apos; method.

I agree that this occurred.  As I mentioned before, the current scope of this is 83 lines duplicated in one file, and once pro (2) above is addressed (which I intended to help do imminently) it will not occur at all.  Therefore I feel this is a transient issue.  However, if this is seen as a huge problem, one solution would be to temporarily introduce an ImageDecoder.cpp file alongside ImageDecoder.h that contains the functions that are currently common to wx and Cairo.  While I think this is something of a waste of time it would be preferable (to me) to backing out much of the ImageDecoder work.

&gt; Given the above, I&apos;d like to know if it&apos;d be possible for Skia to introduce a
&gt; ctor for its SkBitmap that can take an existing buffer without copying, much as
&gt; Cairo and Qt are doing now.  What would this lose the Skia port and/or how is
&gt; it insufficient given #2 above?

I don&apos;t know how to judge what Qt is doing now (since you mention it), because as I have said before I don&apos;t believe Qt is using the cross-platform decoders or very much from ImageDecoder.h.  As to behaving like Cairo currently does, it is possible for Skia to adopt an external buffer and not manage its memory; however, this loses the lifetime safety that I mentioned above.  I am gravely concerned about doing something like this if the sole benefit is to share more of the RGBA32Buffer implementation, when I am fearful of the downsides and convinced that at the very least wx does not benefit from this implementation.

&gt; Where before the code was not
&gt; particularly dependent on any platform, now it is.

Before the code _was_ dependent on platforms, in the form of having an implementation for Cairo and wx and one for Skia.  I don&apos;t think it&apos;s fair to consider only image-decoders/ImageDecoder.h and not also image-decoders/skia/ImageDecoder.h in describing the prior state of the world.

I think it is inherently sensible that low-level pixel storage differ platform to platform, and it already does elsewhere in the code.  What I am trying to do is to work towards unifying all the different ways in which low-level storage is achieved so the entire image subsystem, not just the decoders, is as simple, consistent, safe, and performant as possible.  The origin of RGBA32Buffer was as a fairly quick hack to get something working, and I think the larger picture of the rest of the image system suggests that while it works to some degree it is not the best design.

I believe Holger actually agrees with this last point, at least to some degree, and mainly differs from me in that he would prefer the old ImageDecoder code to the new code until that larger transition moves further, whereas I see the new code as making it much more clear where the needs of the image decoders lie (as we do the broader refactoring) and being generally simply on net (when Skia is factored in) than the old situation.  Therefore one of us feels this is a step backward and one a step forward, but I don&apos;t believe either of us believes that this is the ideal endpoint for the code.

My proposed plan forward is:
* Merge all the ImageSource files
* Simplify the RGBA32Buffer interface slightly by e.g. replacing &quot;width, height&quot; with IntSize, etc.
* Pull RGBA32Buffer out of image-decoders entirely into a class called FrameBuffer in graphics/
* Consider pulling implementations of getAddr() out into the platform-specific files to reduce #ifdefs in header
* Write Cairo- and wx-specific implementations of FrameBuffer
* Examine uses of ImageBuffer and attempt to merge it with FrameBuffer
* Examine uses of the merged class e.g. in the ImageDecoder versus as returned from the ImageSource and see if ImageDecoder can be made simpler, in terms of simply taking an empty image as input and writing into it rather than owning any pointers
* Examine ImageSource and the other image system classes and attempt to collapse/simplify where possible
* Publish design document for image system indicating control flow, data ownership and lifetime, caching behavior, etc.

These last points (except the design doc) are more speculative and vague, of course, but hopefully that gives a broad idea of what my goals are.

I had not originally planned to do all this immediately, but I am willing to prioritize it highly given the concerns expressed on this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126004</commentid>
    <comment_count>44</comment_count>
    <who name="Adam Treat">manyoso</who>
    <bug_when>2009-06-15 12:33:49 -0700</bug_when>
    <thetext>&gt; 
&gt; We now have image-decoder implementations for BMP, XBM, and ICO, which did not
&gt; previously exist.  GTK+, wxWindows, and Cairo can now use these implementations
&gt; which I do consider to be benefits to these other ports.
&gt; 

While this is true, I don&apos;t think (and please correct me if I&apos;m wrong) these decoders are dependent on the objected parts of the recent changes.  Thus, it is kind of sideways to the discussion :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126007</commentid>
    <comment_count>45</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2009-06-15 12:48:52 -0700</bug_when>
    <thetext>(In reply to comment #44)
&gt; &gt; We now have image-decoder implementations for BMP, XBM, and ICO, which did not
&gt; &gt; previously exist.  GTK+, wxWindows, and Cairo can now use these implementations
&gt; &gt; which I do consider to be benefits to these other ports.
&gt; 
&gt; While this is true, I don&apos;t think (and please correct me if I&apos;m wrong) these
&gt; decoders are dependent on the objected parts of the recent changes.  Thus, it
&gt; is kind of sideways to the discussion :)

These implementations were Skia-specific, so the expected interface (via ImageDecoder.h) was the Skia-specific style.  Peter&apos;s changes to ImageDecoder brought these more in line with the Skia version, allowing a single set of image-decoders (including these new ones).

The desire to roll back all of the changes would mean a loss of these new decoders, at least until they had been revised to work with the original style image decoder.

I would really prefer not to roll any of this back, and instead try to address the various concerns with the current source base and move forward.

My understanding is that Holger&apos;s proposal to undo all of the original bug&apos;s changes would mean a loss of this new functionality.  I strongly oppose this.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126010</commentid>
    <comment_count>46</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-15 13:00:44 -0700</bug_when>
    <thetext>(In reply to comment #45)
&gt; The desire to roll back all of the changes would mean a loss of these new
&gt; decoders, at least until they had been revised to work with the original style
&gt; image decoder.
&gt; 
&gt; I would really prefer not to roll any of this back, and instead try to address
&gt; the various concerns with the current source base and move forward.
&gt; 
&gt; My understanding is that Holger&apos;s proposal to undo all of the original bug&apos;s
&gt; changes would mean a loss of this new functionality.  I strongly oppose this.

I don&apos;t think this is actually what Holger is asking for.  I think the disputed pieces of the code could probably be modified without losing the new decoders.

My own objection to Holger&apos;s proposal is not along the lines of losing new image decoders but rather of gaining no practical advantage (see my detailed responses to Adam Treat&apos;s list of cons above) and yet losing clarity and simplicity.  Basically, I claim it makes moving forward harder and costs time to what I see as no good purpose (obviously Holger disagrees).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126012</commentid>
    <comment_count>47</comment_count>
    <who name="Adam Treat">manyoso</who>
    <bug_when>2009-06-15 13:09:34 -0700</bug_when>
    <thetext>(In reply to comment #43)
&gt; From a high level, the idea for Cairo is for setSize() to do a
&gt; cairo_image_create_surface(), have the operations that write pixels operate on
&gt; that surface, and have asNewNativeImage() simply return a copy of the surface
&gt; (which is cheap as Cairo surfaces refcount like Skia bitmaps do, from my
&gt; limited reading of the Cairo APIs).

Notwithstanding what you write below about the data ownership issues, I don&apos;t see how this will help the Cairo port at all versus the current situation where it adopts the Vector&lt;unsigned&gt; of the RGBA32Buffer.  Am I missing anything?

Also, because you asked about Qt...  while it is true that the Qt port doesn&apos;t currently use the image-decoders, that has not always been the case.  Holger wrote a patch in the past that converted the Qt port to use the built-in WebCore image-decoders.  That never went into mainline, but at Torch Mobile we used a similar approach for our version of the Qt port.  It operated much like the Cairo port does today: we use a QImage/QPixmap ctor that adopts the underlying data of the RGBA32Buffer.  So I&apos;m a bit familiar with this code.  As an aside, we have other Torch Mobile devs who&apos;ve made extensive changes and as a consequence have some pretty deep knowledge of the image-decoders for use by our windows mobile port.

&gt; For wx the idea is similar except to use a wxBitmap instead of a
&gt; cairo_surface_t.  The benefits are more concrete for wx as it is definitely not
&gt; only copying the data when reading it out, but also flipping BGRA -&gt; RGBA.

Hmm, that is interesting.  Of course, another alternative would be to modify wxBitmap so it could adopt an RGBA8888 buffer, but on to your other points...

&gt; Another benefit here is that the data ownership becomes more clear: the
&gt; lifetime of the returned pointer is not tied to the lifetime of the
&gt; RGBA32Buffer inside the ImageDecoder.  Holger says he hasn&apos;t seen any problems
&gt; in the Cairo port due to this, and I believe him.  I&apos;m still not certain that
&gt; it&apos;s _not_ a problem for Cairo given that we had issues with Skia with this,
&gt; and I believe the Skia backend is far more well-tested on the web at large than
&gt; the other non-CG ports.  On net I&apos;m not sure how much weight to give this
&gt; concern but I am not willing to dismiss it.

Absolutely shouldn&apos;t be dismissed.  OTOH, I don&apos;t see this as a fundamental win of the new design given that we have no concrete example of data lifetime issues in the real world.  And certainly were we given such an example I see no reason to believe that it wouldn&apos;t be fairly easily fixed given the previous design.

&gt; &gt; Con:
&gt; &gt; 1) We lose flexibility in the image-decoders as they now depend on
&gt; &gt; platform/graphics
&gt;
&gt; If you could elaborate more on this loss I&apos;d be interested.  I&apos;m not completely
&gt; sure what sorts of flexibility are actually disappearing; on the surface,
&gt; #include &quot;FrameBuffer.h&quot; where that header lives in graphics/ does not seem
&gt; different to me than if it lives in image-decoders/.

For one we lose the ability to modify the image-decoders in anyway that might depend upon the underlying data buffer.  Just as a brainstorm, if in the future we wanted to modify the decoders so that they&apos;d sample only 16 bit data and sync it into a RGBA4444 buffer this becomes more difficult with the addition of the native platform stores.  Or say we come up with a new way of optimizing the jpeg decoder that is relies upon querying the underlying data array.  I&apos;m just brainstorming, but I think it is not entirely clear that we want to sacrifice this flexibility if it can be reasonably avoided.

&gt; &gt; 2) Duplication of effort with ImageBuffer
&gt;
&gt; I consider this an active area of development interest.  To the degree that the
&gt; two are duplicated, we should definitely converge.
&gt;
&gt; Note that if the two weren&apos;t precisely duplicated before, but are now and can
&gt; be combined, without loss of performance, then there is a net code (and
&gt; complexity) savings.  This isn&apos;t yet quantifiable since there aren&apos;t yet
&gt; concrete designs here.

If we continue with this strategy for sure.  And looking at your outline below, I think that would be a good map if we do continue with this change.

&gt; &gt; 3) Merging with mozilla versions becomes harder
&gt;
&gt; I object to this for two reasons.  First, the Mozilla decoders used are pretty
&gt;

Point(s) taken.

&gt; &gt; 4) Introducing copy+paste code which is is frowned upon. Cairo and WX (and
&gt; &gt; presumably all future ports that wish to use this) have the exact same
&gt; &gt; implementation of  ImageDecoderFoo except for the &apos;asNewNativeImage&apos; method.
&gt;
&gt; I agree that this occurred.  As I mentioned before, the current scope of this
&gt; is 83 lines duplicated in one file, and once pro (2) above is addressed (which
&gt; I intended to help do imminently) it will not occur at all.  Therefore I feel

Only because you&apos;d be exacerbating the platform dependencies of the image-decoders by moving Cairo and WX away from the Vector&lt;unsigned&gt; :)  Right now, if Cairo and Wx were to remain as they are, then we really only need _two_ ImageDecoderFoo.cpp files: ImageDecoderSkia.cpp and ImageDecoderCrossPlatform.cpp :)  asNativeImagePtr could be moved to WebCore/platform/graphics :)

&gt; &gt; Given the above, I&apos;d like to know if it&apos;d be possible for Skia to introduce a
&gt; &gt; ctor for its SkBitmap that can take an existing buffer without copying, much as
&gt; &gt; Cairo and Qt are doing now.  What would this lose the Skia port and/or how is
&gt; &gt; it insufficient given #2 above?
&gt;
&gt; I don&apos;t know how to judge what Qt is doing now (since you mention it), because
&gt; as I have said before I don&apos;t believe Qt is using the cross-platform decoders
&gt; or very much from ImageDecoder.h.

Mentioned above...

&gt; As to behaving like Cairo currently does, it
&gt; is possible for Skia to adopt an external buffer and not manage its memory;
&gt; however, this loses the lifetime safety that I mentioned above.  I am gravely
&gt; concerned about doing something like this if the sole benefit is to share more
&gt; of the RGBA32Buffer implementation, when I am fearful of the downsides and
&gt; convinced that at the very least wx does not benefit from this implementation.

From what I can tell the only benefit of these changes is this theoretical data lifetime issue which has not been found in the wild yet.  Theoretically, the Wx port could, along with Skia port, be changed to work in the same way that Cairo and Qt now work: to adopt the underlying buffer of RGBA32Buffer.  To me this would preserve the flexibility iherant in the old way of doing things.  All the pro&apos;s without any of the con&apos;s (except the work involved of course :)

Now how much work do you think it&apos;d be to modify Wx and Skia to work this way and do you think it worthwhile given my answer to the flexibilty question above?

&gt; My proposed plan forward is:
&gt; * Merge all the ImageSource files
&gt; * Simplify the RGBA32Buffer interface slightly by e.g. replacing &quot;width,
&gt; height&quot; with IntSize, etc.
&gt; * Pull RGBA32Buffer out of image-decoders entirely into a class called
&gt; FrameBuffer in graphics/
&gt; * Consider pulling implementations of getAddr() out into the platform-specific
&gt; files to reduce #ifdefs in header
&gt; * Write Cairo- and wx-specific implementations of FrameBuffer
&gt; * Examine uses of ImageBuffer and attempt to merge it with FrameBuffer
&gt; * Examine uses of the merged class e.g. in the ImageDecoder versus as returned
&gt; from the ImageSource and see if ImageDecoder can be made simpler, in terms of
&gt; simply taking an empty image as input and writing into it rather than owning
&gt; any pointers
&gt; * Examine ImageSource and the other image system classes and attempt to
&gt; collapse/simplify where possible
&gt; * Publish design document for image system indicating control flow, data
&gt; ownership and lifetime, caching behavior, etc.

If we&apos;re to continue with the platform dependent image-decoders then the above sounds like a good plan.  I&apos;m still not sure the platform dependent image-decoders are necessary or wise given the alternative.  Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126018</commentid>
    <comment_count>48</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-06-15 13:43:05 -0700</bug_when>
    <thetext>So the debate boils down to if it&apos;s OK to add a image abstraction around the Vector&lt;unsigned&gt;.  Correct?  RGBA32Buffer used to be a thin layer you could grab through.  Now Peter&apos;s changed it to be an image abstraction, like ImageBuffer.

I don&apos;t see why this breaks ports?  Can&apos;t we have a default ImageBuffer which uses Vector&lt;unsigned&gt; under the covers?  Although it seems that would only be needed by platforms which don&apos;t provide an Image type to decode into, or?

For what it&apos;s worth, CoreGraphics (what I tend to use as my reference for graphics APIs), decodes into an opaque image type:
http://developer.apple.com/documentation/graphicsimaging/reference/CGImage/Reference/reference.html#//apple_ref/c/func/CGImageCreate

I feel much more informed after all this, and am looking forward to peter&apos;s next round of patches to share more platform/graphics code between all ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126021</commentid>
    <comment_count>49</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-15 13:51:37 -0700</bug_when>
    <thetext>(In reply to comment #47)
&gt; Notwithstanding what you write below about the data ownership issues, I don&apos;t
&gt; see how this will help the Cairo port at all versus the current situation where
&gt; it adopts the Vector&lt;unsigned&gt; of the RGBA32Buffer.  Am I missing anything?

Brent posted some ideas at the beginning of comment 42.  Besides those (if they pan out), the lifetime issue, and the forward motion I proposed with the classes as a whole, no, there are not further benefits to Cairo I am aware of.  But I think those are not things that should necessarily be discounted.

&gt; at Torch Mobile we
&gt; used a similar approach for our version of the Qt port.  It operated much like
&gt; the Cairo port does today: we use a QImage/QPixmap ctor that adopts the
&gt; underlying data of the RGBA32Buffer.  So I&apos;m a bit familiar with this code.  As
&gt; an aside, we have other Torch Mobile devs who&apos;ve made extensive changes and as
&gt; a consequence have some pretty deep knowledge of the image-decoders for use by
&gt; our windows mobile port.

Thanks, this is helpful background for me.

&gt; Absolutely shouldn&apos;t be dismissed.  OTOH, I don&apos;t see this as a fundamental win
&gt; of the new design given that we have no concrete example of data lifetime
&gt; issues in the real world.  And certainly were we given such an example I see no
&gt; reason to believe that it wouldn&apos;t be fairly easily fixed given the previous
&gt; design.

I am not sure how to address it with a design that writes to a Vector&lt;unsigned&gt; unless either (a) the ImageSource is invoked to provide the vector, so that it is managing the lifetime (seems cumbersome) or (b) the data is copied-on-exit, like wx currently does, which has performance issues.

As you say though, it is very hard to quantify this.

&gt; For one we lose the ability to modify the image-decoders in anyway that might
&gt; depend upon the underlying data buffer.  Just as a brainstorm, if in the future
&gt; we wanted to modify the decoders so that they&apos;d sample only 16 bit data and
&gt; sync it into a RGBA4444 buffer this becomes more difficult with the addition of
&gt; the native platform stores.

This is precisely the sort of optimization I&apos;m attempting to enable, by allowing a port where this matters (for example, a mobile device with low memory) to downsample inside the functions that write data to the backing store.  I don&apos;t see this class of optimizations as something we&apos;d ever want to apply globally to all ports.  Perhaps I am mistaken?

&gt; Or say we come up with a new way of optimizing the
&gt; jpeg decoder that is relies upon querying the underlying data array.  I&apos;m just
&gt; brainstorming, but I think it is not entirely clear that we want to sacrifice
&gt; this flexibility if it can be reasonably avoided.

I don&apos;t think moving to a per-platform storage system necessarily prevents this if it ever wants to occur.  We already have APIs (that I added) that abstract writing the pixel data as the decoders needed, it would certainly be possible to add abstractions to read it as well (and simple, given that all these systems give users ways of getting at the underlying data buffer directly).  So I don&apos;t think this is lost flexibility.

Even if I am mistaken that we lose no flexibility here, I am hard-pressed to think of realistic probable modifications along the lines you suggest.  I&apos;m also very reluctant to optimize a design for a low-likelihood future possibility that is not yet present versus current needs.  From the larger perspective of the image system as a whole, is seems clear that writing pixel elements into some sort of storage and being able to display the result is work that was being done in multiple places, and it seems like trying to combine those is sensical.

&gt; If we continue with this strategy for sure.  And looking at your outline below,
&gt; I think that would be a good map if we do continue with this change.

Note that my intent was to work on this &quot;in the next few days&quot;, not at an unspecified future date.  I filed this bug in hopes of getting the precise technical details needed to do this work immediately.  So the question should only be whether we even want to see this end state happen at all.

&gt; &gt; I agree that this occurred.  As I mentioned before, the current scope of this
&gt; &gt; is 83 lines duplicated in one file, and once pro (2) above is addressed (which
&gt; &gt; I intended to help do imminently) it will not occur at all.  Therefore I feel
&gt; 
&gt; Only because you&apos;d be exacerbating the platform dependencies of the
&gt; image-decoders by moving Cairo and WX away from the Vector&lt;unsigned&gt; :)  Right
&gt; now, if Cairo and Wx were to remain as they are, then we really only need _two_
&gt; ImageDecoderFoo.cpp files: ImageDecoderSkia.cpp and
&gt; ImageDecoderCrossPlatform.cpp :)  asNativeImagePtr could be moved to
&gt; WebCore/platform/graphics :)

But I have already mentioned that certainly wx does have concrete perf impact from the current design, so at the very least it would _want_ to move away from the &quot;cross platform&quot; code.  At that point, whether or not Cairo used Vector&lt;unsigned&gt;, the implementation would only be used by Cairo.  And of course this still sets aside the three points mentioned at the top of this replay as to possibilities why this might make sense.

&gt; From what I can tell the only benefit of these changes is this theoretical data
&gt; lifetime issue which has not been found in the wild yet.

As I said, we saw concrete issues with Skia here during our testing.  It was well over a year ago so I no longer recall how to reproduce.  Certainly without a reproduction case I cannot say whether it would affect other ports; it could be that it was due to an interaction of this code with other parts of the Skia image framework.

&gt; Theoretically, the Wx
&gt; port could, along with Skia port, be changed to work in the same way that Cairo
&gt; and Qt now work: to adopt the underlying buffer of RGBA32Buffer.

I do not know wx APIs well enough to say whether this is in fact true.

Note that moving asNewNativeImage() from RGBA32Buffer back to ImageSource prevents completely unifying the ImageSource class into one that is entirely cross-platform.  To me this makes the question feel somewhat like &quot;six of one, a half-dozen of the other&quot;.

&gt; To me this
&gt; would preserve the flexibility iherant in the old way of doing things.  All the
&gt; pro&apos;s without any of the con&apos;s (except the work involved of course :)

...And the con of basically closing down any ability to further simplify the overall image system architecture.

&gt; Now how much work do you think it&apos;d be to modify Wx and Skia to work this way
&gt; and do you think it worthwhile given my answer to the flexibilty question
&gt; above?

I do not know for Wx.  For Skia I would be unwilling to do this modification without guaranteeing the data lifetime irrespective of the ImageDecoder implementation.  As I said above, I am not convinced the solution to that is clean and easy.  Given that I believe the current system to be equally flexible to the old system (modulo writing a call to read data out), the benefit seems to me to be zero while the costs (ignoring the actual work to do this) are nonzero.  As always, I could be wrong.

A possibility that eseidel alludes to somewhat above is that I could continue by attempting to merge RGBA32Buffer and ImageBuffer while seeking to maintain the current Vector&lt;unsigned&gt; as the low-level implementation of the pixel storage in this class, at least for the time being.  In this scenario I would probably collect the Cairo and wx implementations into one, but leave Skia separate (and still using an SkBitmap) for now.  I&apos;m not sure exactly who allocates the storage when in this model but I&apos;m sure that could be worked out, perhaps ignoring the lifetime issue (which does not seem to be affecting wx and Cairo in practice at the moment anyway).  Given that due to not using a Vector&lt;unsigned for Skia, ImageDecoder would still have to speak to an (apparently) opaque backing store class (the unified ImageBuffer/RGBA32Buffer) I&apos;m not sure this satisfies the concerns raised, but perhaps it does.

Thank you again for your detailed replies.  This is the sort of background that is helpful to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126050</commentid>
    <comment_count>50</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-06-15 15:09:04 -0700</bug_when>
    <thetext>I talked more with pkasting over email, and Adam over IRC.  I&apos;d like to talk more with Holger (zecke) over IRC, but Adam and I seem to agree that letting Peter continue with his changes is a good thing (at least not harmful).  I intend to obsolete all the patches on this bug once I can teach my fancy bugzilla-tool how to obsolete a patch. :)  Thanks for them, but my understanding is Peter intends to work on these further and plans to take things in a slightly different direction than your patches.

Holger, let&apos;s talk over IRC when you&apos;re next around.  I think we&apos;re close to an understanding here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126083</commentid>
    <comment_count>51</comment_count>
    <who name="Kevin Ollivier">kevino</who>
    <bug_when>2009-06-15 16:41:32 -0700</bug_when>
    <thetext>(In reply to comment #43)
&gt; (In reply to comment #41)
&gt; For wx the idea is similar except to use a wxBitmap instead of a
&gt; cairo_surface_t.  The benefits are more concrete for wx as it is definitely not
&gt; only copying the data when reading it out, but also flipping BGRA -&gt; RGBA.

BTW, while I probably won&apos;t have time to delve too deeply into this over the next couple days, I did want to mention a possible source of confusion if you plan on looking at the wx port. 

As I mentioned in our discussion on IRC, the wx port has two different graphics rendering APIs. There is wxDC, a bitmap-based API which uses GDI, GDK and CoreGraphics APIs to draw, and wxGraphicsContext, a vector-based API which uses GDI+, Cairo and CoreGraphics to draw. Use of wxGraphicsContext is designated in wx code using #if USE(WXGC) blocks. Of course, whenever possible we want to use wxGraphicsContext since WebCore::GraphicsContext is based around a vector-based drawing API. Unfortunately, even if we use wxGraphicsContext, wxBitmap stores the bitmap data using the native type expected by wxDC, rather than wxGraphicsContext. This is why we do a conversion (and data copy, really) from wxBitmap to wxGraphicsBitmap in RGBA32Buffer::asNewNativeImage, because when USE(WXGC) is true (eventually always), we need the image data to be in a format usable by wxGraphicsContext. To make matters worse, the APIs for types like wxGraphicsBitmap are very minimal and essentially only allow conversion from the standard wx data type (e.g. wxBitmap to wxGraphicsBitmap), so there&apos;s currently no way to do things like get direct pixel access for reading or writing with these types. 

So, unfortunately, even if we use wxBitmap as the image buffer type, we will still have a copy operation to go from wxBitmap to wxGraphicsBitmap. My concern performance-wise is whether or not we can continue to efficiently cache the wxGraphicsBitmap type if the underlying wxBitmap buffer can change at any time. e.g. we&apos;d need a way to know when the buffer has been &apos;dirtied&apos; and needs a new wxGraphicsBitmap to be created from it, so that we&apos;re only creating new wxGraphicsBitmap types when necessary and not any time a wxGraphicsBitmap is being asked for. At the same time, we probably don&apos;t want to recreate it after every write operation, so we&apos;d probably need some mechanism to return a cache if not dirty or recreate the image if so.

I realize this sucks, but it&apos;s what I&apos;ve got to work with right now. :/ I can look at extending the wxGraphicsBitmap API, of course, but it will take some time to both implement and then have the change propagate into a release wx version, so we&apos;ll need a workaround in place in the short term.

RE: Adam

&gt; Techical arguments do not always require empirical data of the sort you are
&gt; requesting.  Patches are often turned down based on technical reasons other
&gt; than a lack of unit tests or benchmarks.

Yes, but we&apos;re discussing a patch that has already gone through the review process and been approved, meaning that the person or persons who reviewed the patch did not consider whatever flaws they saw as serious enough to outweigh the benefit of getting the patch into the tree. (An assessment I&apos;d agree with in this case.) While no one is perfect, given that, I think as a practical matter there should be a higher burden of proof to show that the flaws are serious enough to warrant a revert. 

Anyway, I think things are going in right direction now and people are getting on the same page, so it&apos;s probably a moot point now. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126351</commentid>
    <comment_count>52</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-06-16 16:25:49 -0700</bug_when>
    <thetext>I spoke with Holger (zecke) over IRC just now.  I think we&apos;re all much closer to the same page now.  Peter will continue with his refactoring work.  Peter says that the above patches are unfortunately in conflict with his next set.  I&apos;ve encouraged him to file a new bug to track the next round of refactoring work and mark this as a dupe.

Thank you again for your patches Holger, and your thoughts on this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126365</commentid>
    <comment_count>53</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-16 17:37:53 -0700</bug_when>
    <thetext>Holger, I want to extend a public apology to you for comment 14 on this bug which was completely inappropriate, as well as any other unprofessional comments I made on IRC, on bug 25709, or on this bug.  I am sorry for caring insufficiently about other ports in my original patch set, for losing my temper with you, and for being insufficiently informed up front to fully understand the alternatives to my design or the objections shared here.  For anything you have said which has been out of line, I completely forgive you.  I sincerely believe you have the best interests of the codebase as a whole at heart, and I am happy to have your input as a long-time contributor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126366</commentid>
    <comment_count>54</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-16 17:38:18 -0700</bug_when>
    <thetext>With that said, at eseidel&apos;s request I am closing this bug in favor of a new one, to try and gain clarity.  I have CCed most of the folks on this bug there, and have tried to cover things completely and without bias.  Please correct me where I have misstated or overlooked anything.


*** This bug has been marked as a duplicate of 26467 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126721</commentid>
    <comment_count>55</comment_count>
      <attachid>31258</attachid>
    <who name="Adam Treat">manyoso</who>
    <bug_when>2009-06-18 10:19:11 -0700</bug_when>
    <thetext>Comment on attachment 31258
Restore cross platform behavior

We&apos;ve moved onto another bug report I believe and zecke has indicated a new direction is acceptable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126724</commentid>
    <comment_count>56</comment_count>
      <attachid>31263</attachid>
    <who name="Adam Treat">manyoso</who>
    <bug_when>2009-06-18 10:24:46 -0700</bug_when>
    <thetext>Comment on attachment 31263
Unfork the various ImageSource*.cpp copies

I think there was agreement unifying the ImageSource copies floating around is the correct approach, but I don&apos; think it applies cleanly now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126726</commentid>
    <comment_count>57</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-06-18 10:30:56 -0700</bug_when>
    <thetext>(In reply to comment #56)
&gt; (From update of attachment 31263 [review])
&gt; I think there was agreement unifying the ImageSource copies floating around is
&gt; the correct approach, but I don&apos; think it applies cleanly now?

True, and I also found on closer inspection that the patch here overlooked some subtle differences between the sources.  I&apos;m working towards unifying the ImageSources as we speak, I need to correct some issues with Skia&apos;s usage of the ICO decoder to do so.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31258</attachid>
            <date>2009-06-14 06:40:47 -0700</date>
            <delta_ts>2009-06-18 10:19:11 -0700</delta_ts>
            <desc>Restore cross platform behavior</desc>
            <filename>0001-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>4363</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSA3YTUxYzA0NjI3ZjBkNzdkYWE1YTRmYjYxMmM1ZGM5Y2NhMGZlOTBiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIb2xnZXIgSGFucyBQZXRlciBGcmV5dGhlciA8emVja2VAc2Vs
ZmlzaC5vcmc+CkRhdGU6IFN1biwgMTQgSnVuIDIwMDkgMTA6MzE6MjMgKzAyMDAKU3ViamVjdDog
W1BBVENIIDEvN10gMjAwOS0wNi0xNCAgSG9sZ2VyIEhhbnMgUGV0ZXIgRnJleXRoZXIgIDx6ZWNr
ZUBzZWxmaXNoLm9yZz4KCiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAg
ICAgIE1ha2UgaW1hZ2UtZGVjb2RlcnMgY3Jvc3MtcGxhdGZvcm0gYWdhaW4uIEN1cnJlbnRseSBp
dCBpcwogICAgICAgIFN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ag name="review"
          id="15957"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31259</attachid>
            <date>2009-06-14 06:42:16 -0700</date>
            <delta_ts>2009-06-18 10:19:33 -0700</delta_ts>
            <desc>Make ImageDecoder.cpp cross-platform</desc>
            <filename>0002-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>11722</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSA3MGEyOGJhYjg3ODMzOGQ3YzEwNDEyOGFiMTAzNWU3OTY1NWMzNzI2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIb2xnZXIgSGFucyBQZXRlciBGcmV5dGhlciA8emVja2VAc2Vs
ZmlzaC5vcmc+CkRhdGU6IFN1biwgMTQgSnVuIDIwMDkgMTA6MzM6NDQgKzAyMDAKU3ViamVjdDog
W1BBVENIIDIvN10gMjAwOS0wNi0xNCAgSG9sZ2VyIEhhbnMgUGV0ZXIgRnJleXRoZXIgIDx6ZWNr
ZUBzZWxmaXNoLm9yZz4KCiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAg
ICAgIE1ha2UgSW1hZ2VEZWNvZGVyLmNwcCBjcm9zcyBwbGF0Zm9ybS4gRm9yIG5vdyAjaWZkZWYK
ICAgICAgICB0aGUgb25seSBjYWlybyBzcGVjaWZpYyBmdW5jdGlvbi4gVGhpcyBmaWxlIHNob3Vs
ZCBiZQogICAgICAgIGFkZGVkIGJ5IHBvcnRzIHVzaW5nIHRoZSBnZW5lcmljIFdlYkNvcmUgaW1h
Z2UgZGVjb2RlcnMuCgogICAgICAgICogR05VbWFrZWZpbGUuYW06CiAgICAgICAgKiBwbGF0Zm9y
bS9pbWFnZS1kZWNvZGVycy9JbWFnZURlY29kZXIuY3BwOiBBZGRlZC4KICAgICAgICAoV2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NpemUuaGVpZ2h0KCk7Ci19Ci0K
LX0gLy8gbmFtZXNwYWNlIFdlYkNvcmUKLS0gCjEuNi4zLjEKCg==
</data>
<flag name="review"
          id="15958"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31260</attachid>
            <date>2009-06-14 06:43:40 -0700</date>
            <delta_ts>2009-06-18 10:20:27 -0700</delta_ts>
            <desc>Move the secret how to create a cairo_surface_t back to ImageSourceCairo.cpp</desc>
            <filename>0003-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>4359</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSAwYmE1NTg0ZWI1Njk2NTk2NmVjZDZkMjdmZTQxZWY5ODlkNmE4MjI3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIb2xnZXIgSGFucyBQZXRlciBGcmV5dGhlciA8emVja2VAc2Vs
ZmlzaC5vcmc+CkRhdGU6IFN1biwgMTQgSnVuIDIwMDkgMTA6Mzc6MTggKzAyMDAKU3ViamVjdDog
W1BBVENIIDMvN10gMjAwOS0wNi0xNCAgSG9sZ2VyIEhhbnMgUGV0ZXIgRnJleXRoZXIgIDx6ZWNr
ZUBzZWxmaXNoLm9yZz4KCiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAg
ICAgIE1vdmUgdGhlIHNlY3JldCBvbiBob3cgdG8gZ2VuZXJhdGUgYSBuYXRpdmUgaW1hZ2UgZnJv
bQogICAgICAgIGEgcmdiYTg4OCBidWZmZXIgYmFjayB0byBJbWFnZVNvdXJjZUNhaXJvIGFuZCBt
YWtlIEltYWdlRGVjb2Rlci5jcHAKICAgICAgICB0cnVseSBjcm9zcyBwbGF0Zm9ybS4KCiAgICAg
ICAgKiBwbGF0Zm9ybS9ncmFwaGljcy9jYWlyby9JbW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aGE7CmRpZmYgLS1naXQgYS9XZWJDb3JlL3BsYXRmb3JtL2ltYWdl
LWRlY29kZXJzL0ltYWdlRGVjb2Rlci5oIGIvV2ViQ29yZS9wbGF0Zm9ybS9pbWFnZS1kZWNvZGVy
cy9JbWFnZURlY29kZXIuaAppbmRleCA2NDc3M2M1Li44ZjBhZDY2IDEwMDY0NAotLS0gYS9XZWJD
b3JlL3BsYXRmb3JtL2ltYWdlLWRlY29kZXJzL0ltYWdlRGVjb2Rlci5oCisrKyBiL1dlYkNvcmUv
cGxhdGZvcm0vaW1hZ2UtZGVjb2RlcnMvSW1hZ2VEZWNvZGVyLmgKQEAgLTEwMSw3ICsxMDEsNyBA
QCBuYW1lc3BhY2UgV2ViQ29yZSB7CiAgICAgICAgIC8vIGxlYWsgbWVtb3J5LgogICAgICAgICBi
b29sIHNldFNpemUoaW50IG5ld1dpZHRoLCBpbnQgbmV3SGVpZ2h0KTsKIAotI2lmIFBMQVRGT1JN
KFNLSUEpIHx8IFBMQVRGT1JNKENBSVJPKSB8fCBQTEFURk9STShXWCkKKyNpZiBQTEFURk9STShT
S0lBKSB8fCBQTEFURk9STShXWCkKICAgICAgICAgLy8gVG8gYmUgdXNlZCBieSBJbWFnZVNvdXJj
ZTo6Y3JlYXRlRnJhbWVBdEluZGV4KCkuICBSZXR1cm5zIGEgcG9pbnRlcgogICAgICAgICAvLyB0
byB0aGUgdW5kZXJseWluZyBuYXRpdmUgaW1hZ2UgZGF0YS4gIFRoaXMgcG9pbnRlciB3aWxsIGJl
IG93bmVkIGJ5CiAgICAgICAgIC8vIHRoZSBCaXRtYXBJbWFnZSBhbmQgZnJlZWQgaW4gRnJhbWVE
YXRhOjpjbGVhcigpLgotLSAKMS42LjMuMQoK
</data>
<flag name="review"
          id="15959"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31261</attachid>
            <date>2009-06-14 06:45:04 -0700</date>
            <delta_ts>2009-06-18 10:20:48 -0700</delta_ts>
            <desc>Unfork the WX, no need to have an exact copy of the RGBA32Buffer... use the common code</desc>
            <filename>0004-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>10724</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSBkZGM0ZTdkNTYzM2QwY2EzMzFhN2FhNDM2ZjAwMmE5ZDIyNWI3MGJiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIb2xnZXIgSGFucyBQZXRlciBGcmV5dGhlciA8emVja2VAc2Vs
ZmlzaC5vcmc+CkRhdGU6IFN1biwgMTQgSnVuIDIwMDkgMTU6MDc6MzQgKzAyMDAKU3ViamVjdDog
W1BBVENIIDQvN10gMjAwOS0wNi0xNCAgSG9sZ2VyIEhhbnMgUGV0ZXIgRnJleXRoZXIgIDx6ZWNr
ZUBzZWxmaXNoLm9yZz4KCiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAg
ICAgIFVzZSB0aGUgc2hhcmVkIGNvZGUgYW5kIG1vdmUgdGhlIHNlY3JldCBvZiBjcmVhdGluZwog
ICAgICAgIGEgbmF0aXZlIGltYWdlIGJhY2sgdG8gSW1hZ2VTb3VyY2UuCgogICAgICAgICogV2Vi
Q29yZVNvdXJjZXMuYmtsOgogICAgICAgICogcGxhdGZvcm0vZ3JhcGhpY3Mvd3gvSW1hZ2VTb3Vy
Y2VXeC5jcHA6CiAgICAgICAgKFdlYkNvcmU6OkltYWdlU291cmNlOjpjcmVhdGVGcmFtZUF0SW5k
ZXgpOgogICAgICAgICogcGxhdGZvcm0vaW1hZ2UtZGVjb2RlcnMvd3gvSW1hZ2VEZWNvZGVyV3gu
Y3BwOiBSZW1vdmVkLgogICAgICAgICogd2ViY29yZS13eC5ia2w6Ci0tLQogV2ViQ29yZS9DaGFu
Z2VMb2cgICAgICAgICAgICAgICAgICA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ci19Ci0KLX0gLy8gbmFtZXNwYWNlIFdlYkNvcmUKZGlmZiAtLWdpdCBhL1dlYkNvcmUv
d2ViY29yZS13eC5ia2wgYi9XZWJDb3JlL3dlYmNvcmUtd3guYmtsCmluZGV4IGIzMWExNzguLmVm
MGU2MjYgMTAwNjQ0Ci0tLSBhL1dlYkNvcmUvd2ViY29yZS13eC5ia2wKKysrIGIvV2ViQ29yZS93
ZWJjb3JlLXd4LmJrbApAQCAtNjUsOCArNjUsNiBAQCB3eFdlYkNvcmUgcG9ydCBCYWtlZmlsZSBw
cm9qZWN0IGZpbGUuCiAgICAgICAgICAgcGxhdGZvcm0vZ3JhcGhpY3Mvd3gvUGF0aFd4LmNwcAog
ICAgICAgICAgIHBsYXRmb3JtL2dyYXBoaWNzL3d4L1Blbld4LmNwcAogCi0gICAgICAgICAgcGxh
dGZvcm0vaW1hZ2UtZGVjb2RlcnMvd3gvSW1hZ2VEZWNvZGVyV3guY3BwCi0KICAgICAgICAgICBw
bGF0Zm9ybS93eC9UZW1wb3JhcnlMaW5rU3R1YnMuY3BwCiAgICAgICAgICAgcGxhdGZvcm0vd3gv
Q2xpcGJvYXJkV3guY3BwCiAgICAgICAgICAgcGxhdGZvcm0vd3gvQ3Vyc29yV3guY3BwCi0tIAox
LjYuMy4xCgo=
</data>
<flag name="review"
          id="15960"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31262</attachid>
            <date>2009-06-14 06:46:14 -0700</date>
            <delta_ts>2009-06-18 10:21:07 -0700</delta_ts>
            <desc>Call the thing by its name and rename ImageDecoder.cpp to RGBA32Buffer.cpp</desc>
            <filename>0005-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>11064</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSBiOWY3NTgyYzg0NTczY2FlNDY0MmY2ZDExMTM0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BoYTsKK30KKwordm9pZCBSR0JBMzJCdWZmZXI6OnNldEhh
c0FscGhhKGJvb2wgYWxwaGEpCit7CisgICAgbV9oYXNBbHBoYSA9IGFscGhhOworfQorCit2b2lk
IFJHQkEzMkJ1ZmZlcjo6c2V0U3RhdHVzKEZyYW1lU3RhdHVzIHN0YXR1cykKK3sKKyAgICBtX3N0
YXR1cyA9IHN0YXR1czsKK30KKworUkdCQTMyQnVmZmVyJiBSR0JBMzJCdWZmZXI6Om9wZXJhdG9y
PShjb25zdCBSR0JBMzJCdWZmZXImIG90aGVyKQoreworICAgIGlmICh0aGlzID09ICZvdGhlcikK
KyAgICAgICAgcmV0dXJuICp0aGlzOworCisgICAgbV9ieXRlcyA9IG90aGVyLm1fYnl0ZXM7Cisg
ICAgbV9zaXplID0gb3RoZXIubV9zaXplOworICAgIHNldEhhc0FscGhhKG90aGVyLmhhc0FscGhh
KCkpOworICAgIHNldFJlY3Qob3RoZXIucmVjdCgpKTsKKyAgICBzZXRTdGF0dXMob3RoZXIuc3Rh
dHVzKCkpOworICAgIHNldER1cmF0aW9uKG90aGVyLmR1cmF0aW9uKCkpOworICAgIHNldERpc3Bv
c2FsTWV0aG9kKG90aGVyLmRpc3Bvc2FsTWV0aG9kKCkpOworICAgIHJldHVybiAqdGhpczsKK30K
KworaW50IFJHQkEzMkJ1ZmZlcjo6d2lkdGgoKSBjb25zdCB7CisgICAgcmV0dXJuIG1fc2l6ZS53
aWR0aCgpOworfQorCitpbnQgUkdCQTMyQnVmZmVyOjpoZWlnaHQoKSBjb25zdCB7CisgICAgcmV0
dXJuIG1fc2l6ZS5oZWlnaHQoKTsKK30KKworfSAvLyBuYW1lc3BhY2UgV2ViQ29yZQotLSAKMS42
LjMuMQoK
</data>
<flag name="review"
          id="15961"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31263</attachid>
            <date>2009-06-14 06:47:23 -0700</date>
            <delta_ts>2009-06-18 10:24:46 -0700</delta_ts>
            <desc>Unfork the various ImageSource*.cpp copies</desc>
            <filename>0006-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>27698</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSAzYzc3ZGJlM2E5ZjE2ODkwMDJlYzA1ZmFiNTFmMjI4MTJkNGE3OTEwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIb2xnZXIgSGFucyBQZXRlciBGcmV5dGhlciA8emVja2VAc2Vs
ZmlzaC5vcmc+CkRhdGU6IFN1biwgMTQgSnVuIDIwMDkgMTA6NTM6MzggKzAyMDAKU3ViamVjdDog
W1BBVENIIDYvN10gMjAwOS0wNi0xNCAgSG9sZ2VyIEhhbnMgUGV0ZXIgRnJleXRoZXIgIDx6ZWNr
ZUBzZWxmaXNoLm9yZz4KCiAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCgogICAg
ICAgIFVuaWZ5IHRoZSB2YXJpb3VzIGNvcGllcyBvZiB0aGUgSW1hZ2VTb3VyY2UuY3BwIHRoYXQK
ICAgICAgICB1dGlsaXplIHRoZSBXZWJDb3JlIGltYWdlIGRlY29kZXJzLiBUaGUgb25seSB0aGlu
ZyBsZWZ0CiAgICAgICAgaW4gdGhlIHBvcnQgc3BlY2lmaWMgSW1hZ2VTb3VyY2UgZmlsZXMgaXMg
dGhlIHNlY3JldAogICAgICAgIG9uIGhvdyB0byB0dXJuIHRoZSBvdXRwdXQgb2YgdGhlIGRlY29k
ZXIgaW50byBhIGltYWdlLgoKICAgICAgICAqIEdOVW1ha2VmaWxlLmFtOgogICAgICAgICogV2Vi
Q29yZVNvdXJjZXMuYmtsOgogICAgICAgICogcGxhdGZvcm0vZ3JhcGhpY3MvSW1hZ2VTb3VyY2Uu
Y3BwOiBBZGRlZC4KICAgICAgICAoV2ViQ29yZTo6Y3Jl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GNvbnN0IGNoYXIqIGNvbnRlbnRzID0gZGF0YS5k
YXRhKCk7CisKKyAgICAvLyBHSUZzIGJlZ2luIHdpdGggR0lGOCg3IG9yIDkpLgorICAgIGlmIChz
dHJuY21wKGNvbnRlbnRzLCAiR0lGOCIsIDQpID09IDApCisgICAgICAgIHJldHVybiBuZXcgR0lG
SW1hZ2VEZWNvZGVyKCk7CisKKyAgICAvLyBUZXN0IGZvciBQTkcuCisgICAgaWYgKHVDb250ZW50
c1swXT09MHg4OSAmJgorICAgICAgICB1Q29udGVudHNbMV09PTB4NTAgJiYKKyAgICAgICAgdUNv
bnRlbnRzWzJdPT0weDRFICYmCisgICAgICAgIHVDb250ZW50c1szXT09MHg0NykKKyAgICAgICAg
cmV0dXJuIG5ldyBQTkdJbWFnZURlY29kZXIoKTsKKworICAgIC8vIEpQRUcKKyAgICBpZiAodUNv
bnRlbnRzWzBdPT0weEZGICYmCisgICAgICAgIHVDb250ZW50c1sxXT09MHhEOCAmJgorICAgICAg
ICB1Q29udGVudHNbMl09PTB4RkYpCisgICAgICAgIHJldHVybiBuZXcgSlBFR0ltYWdlRGVjb2Rl
cigpOworCisgICAgLy8gQk1QCisgICAgaWYgKHN0cm5jbXAoY29udGVudHMsICJCTSIsIDIpID09
IDApCisgICAgICAgIHJldHVybiBuZXcgQk1QSW1hZ2VEZWNvZGVyKCk7CisKKyAgICAvLyBJQ09z
IGFsd2F5cyBiZWdpbiB3aXRoIGEgMi1ieXRlIDAgZm9sbG93ZWQgYnkgYSAyLWJ5dGUgMS4KKyAg
ICAvLyBDVVJzIGJlZ2luIHdpdGggMi1ieXRlIDAgZm9sbG93ZWQgYnkgMi1ieXRlIDIuCisgICAg
aWYgKCFtZW1jbXAoY29udGVudHMsICJcMDAwXDAwMFwwMDFcMDAwIiwgNCkgfHwKKyAgICAgICAg
IW1lbWNtcChjb250ZW50cywgIlwwMDBcMDAwXDAwMlwwMDAiLCA0KSkKKyAgICAgICAgcmV0dXJu
IG5ldyBJQ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mQgV2luSUUncykgYmVoYXZpb3IgdG8gc2xvdyBhbm5veWluZyBhZHMgdGhhdAot
ICAgIC8vIHNwZWNpZnkgYSAwIGR1cmF0aW9uLgotICAgIGlmIChkdXJhdGlvbiA8IDAuMDUxZikK
LSAgICAgICAgcmV0dXJuIDAuMTAwZjsKLSAgICByZXR1cm4gZHVyYXRpb247Ci19Ci0KLWJvb2wg
SW1hZ2VTb3VyY2U6OmZyYW1lSGFzQWxwaGFBdEluZGV4KHNpemVfdCBpbmRleCkKLXsKLSAgICBp
ZiAoIW1fZGVjb2RlciB8fCAhbV9kZWNvZGVyLT5zdXBwb3J0c0FscGhhKCkpCi0gICAgICAgIHJl
dHVybiBmYWxzZTsKLQotICAgIFJHQkEzMkJ1ZmZlciogYnVmZmVyID0gbV9kZWNvZGVyLT5mcmFt
ZUJ1ZmZlckF0SW5kZXgoaW5kZXgpOwotICAgIGlmICghYnVmZmVyIHx8IGJ1ZmZlci0+c3RhdHVz
KCkgPT0gUkdCQTMyQnVmZmVyOjpGcmFtZUVtcHR5KQotICAgICAgICByZXR1cm4gZmFsc2U7Ci0K
LSAgICByZXR1cm4gYnVmZmVyLT5oYXNBbHBoYSgpOwotfQotCiB9Ci0tIAoxLjYuMy4xCgo=
</data>
<flag name="review"
          id="15962"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31264</attachid>
            <date>2009-06-14 06:51:11 -0700</date>
            <delta_ts>2009-06-18 10:21:24 -0700</delta_ts>
            <desc>Take out asNativeImagePtr</desc>
            <filename>0007-2009-06-14-Holger-Hans-Peter-Freyther-zecke-selfish..patch</filename>
            <type>text/plain</type>
            <size>5416</size>
            <attacher name="Holger Freyther">zecke</attacher>
            
              <data encoding="base64">RnJvbSBmYWViZTYxZTY4NjBkNGQwZTAyNWU2M2Q4MjJmMmI0OTQxZDA0MTY1IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwM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QotICAgICAg
ICAvLyBUbyBiZSB1c2VkIGJ5IEltYWdlU291cmNlOjpjcmVhdGVGcmFtZUF0SW5kZXgoKS4gIFJl
dHVybnMgYSBwb2ludGVyCi0gICAgICAgIC8vIHRvIHRoZSB1bmRlcmx5aW5nIG5hdGl2ZSBpbWFn
ZSBkYXRhLiAgVGhpcyBwb2ludGVyIHdpbGwgYmUgb3duZWQgYnkKLSAgICAgICAgLy8gdGhlIEJp
dG1hcEltYWdlIGFuZCBmcmVlZCBpbiBGcmFtZURhdGE6OmNsZWFyKCkuCi0gICAgICAgIE5hdGl2
ZUltYWdlUHRyIGFzTmV3TmF0aXZlSW1hZ2UoKSBjb25zdDsKLSNlbHNlCiAgICAgICAgIFZlY3Rv
cjxQaXhlbERhdGE+JiBieXRlcygpIHsgcmV0dXJuIG1fYnl0ZXM7IH0KLSNlbmRpZgogCiAgICAg
ICAgIGJvb2wgaGFzQWxwaGEoKSBjb25zdDsKICAgICAgICAgY29uc3QgSW50UmVjdCYgcmVjdCgp
IGNvbnN0IHsgcmV0dXJuIG1fcmVjdDsgfQpAQCAtMTU5LDYgKzE1Miw3IEBAIG5hbWVzcGFjZSBX
ZWJDb3JlIHsKICAgICAgICAgfQogCiAjaWYgUExBVEZPUk0oU0tJQSkKKyAgICAgICAgZnJpZW5k
IGNsYXNzIE5hdGl2ZUltYWdlU2tpYTsKICAgICAgICAgTmF0aXZlSW1hZ2VTa2lhIG1fYml0bWFw
OwogI2Vsc2UKICAgICAgICAgVmVjdG9yPFBpeGVsRGF0YT4gbV9ieXRlczsKLS0gCjEuNi4zLjEK
Cg==
</data>
<flag name="review"
          id="15963"
          type_id="1"
          status="-"
          setter="manyoso"
    />
          </attachment>
      

    </bug>

</bugzilla>