Closed Bug 409849 Opened 14 years ago Closed 14 years ago
.8 branch build for ppc with gcc 4 .0 fails: .../ns Canvas Rendering Context2D .cpp: 1026: error: invalid conversion from 'int' to 'CGImage Alpha Info'
Camino 1.6, based on the 1.8 branch, may change the compiler used for the ppc portion of the build from gcc 3.3 to gcc 4.0. (It would continue to use the 10.3.9 SDK and would support 10.3.9 as a minimum on PowerPC instead of the current 10.3.0 permitted with gcc 3.3.) During a test build to determine feasability, while compiling mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: In member function ‘virtual nsresult nsCanvasRenderingContext2D::Render(nsIRenderingContext*)’: /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:1026: error: invalid conversion from ‘int’ to ‘CGImageAlphaInfo’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:1026: error: initializing argument 7 of ‘CGImage* CGImageCreate(size_t, size_t, size_t, size_t, size_t, CGColorSpace*, CGImageAlphaInfo, CGDataProvider*, const float*, bool, CGColorRenderingIntent)’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:908: warning: unused variable ‘dest’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:909: warning: unused variable ‘dest_cr’ /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: At global scope: /lizard/1.8/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:198: warning: ‘PRBool FloatValidate(double, double, double)’ defined but not used make: *** [nsCanvasRenderingContext2D.o] Error 1 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40/content/canvas/src' make: *** [libs] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40/content/canvas' make: *** [libs] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40/content' make: *** [tier_9] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40' make: *** [alldep] Error 2 make: Leaving directory `/lizard/1.8/build/camino-ppc-static-40' make: *** [alldep] Error 2 make: Leaving directory `/lizard/1.8/mozilla' The code causing the error: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp&rev=220.127.116.11&mark=155-164,1024-1026#1020 The problem is that during the ppc build as opposed to the x86 build, CG_BITMAP_BYTE_ORDER_FLAG is not of type CGImageAlphaInfo (an enum), but is instead 0: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp&rev=18.104.22.168&mark=155-164,1024-1026#155 gcc 3.3 is satisfied with this, but gcc 4.0 treats it as an error. A cast should be introduced to ensure that this is buildable with gcc 4.0. This appears the be the only change necessary to make the current 1.8 branch build for ppc with gcc 4.0, and it's completely safe as it's a simple cast that doesn't even involve a conversion.
Assignee: mark → nobody
Component: GFX: Mac → Layout: Canvas
QA Contact: mac → layout.canvas
Gah, I hate moving.
Assignee: nobody → mark
Comment on attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo I think vlad should review this -- this isn't my code.
Attachment #294568 - Flags: review?(mrbkap) → review?(vladimir)
Smokey, I've got something to alleviate the stripping pains.
Attachment #294568 - Flags: review?(vladimir) → review+
Comment on attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo No risk, just a cast, fixes compiler errors in the ppc build when using gcc 4, which we're evaluating for Camino 1.6 based on this branch.
Attachment #294568 - Flags: approval22.214.171.124?
Comment on attachment 294568 [details] [diff] [review] Cast to CGImageAlphaInfo Approved for the 126.96.36.199; a=ss for release drivers. Please land on the branch as soon as possible.
Attachment #294568 - Flags: approval188.8.131.52? → approval184.108.40.206+
Checked in on the MOZILLA_1_8_BRANCH.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.