Bug 8939 - Quartz backend endianness problem
Summary: Quartz backend endianness problem
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: quartz backend (show other bugs)
Version: 1.2.7
Hardware: PowerPC Mac OS X (All)
: high blocker
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-07 14:31 UTC by Kristian Rietveld
Modified: 2007-08-21 19:43 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch (446 bytes, patch)
2006-11-07 14:32 UTC, Kristian Rietveld
Details | Splinter Review
Backwards-compatible fix. (367 bytes, patch)
2007-02-07 00:40 UTC, Theo Julienne
Details | Splinter Review

Description Kristian Rietveld 2006-11-07 14:31:08 UTC
There's a little endianness problem in the Quartz backend (latest version from the git repo) when running 
on Intel Macs (OS X 10.4.8).  I've  tracked it down to a call to CGImageCreate.  I will attach a patch which 
fixes the issue (and verified that it doesn't break the Quartz backend on PowerPC :).
Comment 1 Kristian Rietveld 2006-11-07 14:32:28 UTC
Created attachment 7700 [details] [review]
patch
Comment 2 Behdad Esfahbod 2006-11-07 15:00:42 UTC
Kris, a quick note that the nquartz backend will most probably be replacing the
quartz backend soon.  You may want to test that one too.
Comment 3 Kristian Rietveld 2006-11-08 01:59:17 UTC
I would love to test it, but it doesn't seem to compile at this moment ...  From a quick look at the source 
_cairo_nquartz_surface_release_dest_image() looks really similar to 
_cairo_quartz_surface_release_dest_image() and has the same bug; in the call to CGImageCreate(), 
kCGImageAlphaPremultipliedFirst should probably be replaced with kCGImageAlphaPremultipliedFirst | 
kCGBitmapByteOrder32Host.
Comment 4 Mikael Hallendal 2006-11-16 03:40:20 UTC
Is there anything blocking this patch? 

Would be great to have it in as soon as possible.
Comment 5 Vladimir Vukicevic 2006-11-16 09:09:14 UTC
That #define is only available in the 10.4 SDK; I have some code locally that
uses #ifdefs based on the SDK version in question to either #define a local name
to 0, if the SDK version is < 10.4, or #defines it to ByteOrder32Host if the
10.4  SDK.  I won't be able to attach a patch or push the commit until monday
though (meetings all day today and tomorrow).
Comment 6 Mikael Hallendal 2006-12-17 14:15:23 UTC
Vladimir, what is the status on the fix you had?
Comment 7 Theo Julienne 2007-02-07 00:40:54 UTC
Created attachment 8619 [details] [review]
Backwards-compatible fix.

This patch is similar to the one by Kristian (though I traced it myself because it wasn't in the latest sources, hint-hint) adds an #ifdef that checks for 10.4. It should work on later versions as well because ...10_4 will still be defined on them.
Comment 8 Richard Hult 2007-02-17 11:54:31 UTC
Nice, thanks! Vladimir, could this be pushed before 1.4?

Comment 9 Vladimir Vukicevic 2007-03-02 13:48:50 UTC
Just pushed this:

updating 'refs/heads/master'
  from 2640aa7e99453f17e9a2cb9084e0760d767cfeab
  to   ab1887f4b08784789f39396b3012dffede845466

Can someone on a PPC mac confirm that it works and confirm that this works?
Comment 10 Brian Ewins 2007-03-16 03:34:53 UTC
(In reply to comment #9)
> Just pushed this:
> 
> updating 'refs/heads/master'
>   from 2640aa7e99453f17e9a2cb9084e0760d767cfeab
>   to   ab1887f4b08784789f39396b3012dffede845466
> 
> Can someone on a PPC mac confirm that it works and confirm that this works?
> 

Will do. What's the testcase?
Comment 11 Brian Ewins 2007-03-19 11:51:44 UTC
building the tests with 10.4 on ppc and intel I'm not seeing any difference in the output (now, not tried before/after). So I presume we don't have a regression on ppc.

Vlad if you wanted me to try this on 10.3.9 and/or with a particular testcase, let me know. Otherwise looks good to me.
Comment 12 Behdad Esfahbod 2007-08-21 19:43:46 UTC
Kris, Vlad, Mikael, is this still an issue.  Please reopen and post an update if it is.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.