Closed Bug 275365 Opened 20 years ago Closed 19 years ago

Support mozilla/gfx on WinXP AMD64 build.

Categories

(Core Graveyard :: GFX, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 305291

People

(Reporter: m_kato, Unassigned)

References

Details

Attachments

(1 file)

GDI handle on Win64 is 64bits.  But current code is used as 32bits.
Blocks: 237202
This approach looks reasonable; someone more familiar than I am with AMD64 stuff
should review the details (i.e., the ifdefs in nsIRenderingContext.h and
nsRenderingContextWin.cpp and the other changes in the latter).

However, I wonder if we really want PRWord (deprecated?) or something like that
rather than creating a new nsGraphicHandle type.
Status: UNCONFIRMED → NEW
Ever confirmed: true
David, although OS handle for Graphic isn't defined on current Mozilla code, if
we should use PRWord instend of new type like my proposal fix, I change it.   

And Window for AMD64 code is written by me only, there is no other stuff for Win
for AMD64.
nits:

Don't use _MSC_VER to test for LONG_PTR, that tests the compiler version, not if
they've downloaded the latest Platform SDK or not. Doesn't matter anyway (see below)

         if(NS_REINTERPRET_CAST(PRUint32, window->window) != hdc)
^-- shouldn't that cast also be changed to nsGraphicHandle too?

mMozContext->RetrieveCurrentNativeGraphicData((nsGraphicHandle *)(&hdc));
^-- I don't like that because of type aliasing issues among other things, just
create another variable and get rid of the cast

And I know this isn't your original code, but now's a good time as any to change it:
void CALLBACK LineDDAFunc(int x,int y,LONG lData)
^-- make this a static func and change LONG to LPARAM

+    LineDDA((int)(aX0),(int)(aY0),(int)(aX1),(int)(aY1),(LINEDDAPROC)
LineDDAFunc,(LONG_PTR)&dda_struct);
^-- change that last cast to LPARAM instead and get rid of the cast to LINEDDAPROC

Speaking of PRWord/PRUWord. I'd love to see those renamed to PRIntptr and
PRUintptr (to match intptr_t and uintptr_t from C99's stdint.h) and have those
used for these kind of things instead.
This was fixed by bug 305291.

*** This bug has been marked as a duplicate of 305291 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: