reduce narrow windows API calls in cairo win32 surface

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
11 years ago
8 years ago

People

(Reporter: blassey, Unassigned)

Tracking

({mobile})

Trunk
x86
Windows CE
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

There is a call to FormateMessageA and LoadLibraryA which are unnessesary and can be replaced with their wide char equivalents.
Assignee: nobody → blassey
Status: NEW → ASSIGNED
Attachment #342138 - Flags: review?(pavlov)

Updated

11 years ago
Attachment #342138 - Flags: review?(pavlov) → review?(vladimir)

Updated

11 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 457899
Comment on attachment 342138 [details] [diff] [review]
switches to FormatMessageW and LoadLibraryW

Looks fine, I'll drop this in to cairo upstream as well.  (No need for a patch in gfx/cairo for this, as I'm doing it right away.)
Attachment #342138 - Flags: review?(vladimir) → review+

Updated

11 years ago
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
143e49ad9482	blassey — Bug 458946 - Reduce narrow windows API calls in cairo win32 surface. r=vlad


vlad -- i did not create a patch in gfx/cairo per your instructions.
Status: REOPENED → RESOLVED
Last Resolved: 11 years ago11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Duplicate of this bug: 457899

Comment 6

11 years ago
Comment on attachment 342138 [details] [diff] [review]
switches to FormatMessageW and LoadLibraryW

>+	fwprintf (stderr, "%S: %s", context, (char *)lpMsgBuf);

Should be L"%S: %s":

e:/builds/moz2_slave/mozilla-central-win32-nightly/build/gfx/cairo/cairo/src/cairo-win32-surface.c(99) : warning C4133: 'function' : incompatible types - from 'char [7]' to 'const wchar_t *'

Also, casting lpMsgBuf, which now points to an WCHAR array to a char * may work but it's still nasty.
Product: Core → Core Graveyard

Updated

10 years ago
Assignee: bugmail → nobody
Status: RESOLVED → REOPENED
Component: GFX: Win32 → General
Product: Core Graveyard → Core
QA Contact: win32 → general
Resolution: FIXED → ---

Comment 7

10 years ago
Posted patch actually working patch (obsolete) — Splinter Review
Strange how nobody has noticed that GDI errors are silently discarded or the compiler warnings.
Attachment #360698 - Flags: review?(vladimir)
Comment on attachment 360698 [details] [diff] [review]
actually working patch

This looks fine (we don't really hit this path); but please make sure to get a patch added to gfx/cairo and a mention in the README; otherwise this will get wiped out on the next cairo update.

Comment 9

10 years ago
Attachment #360698 - Attachment is obsolete: true
Attachment #360898 - Flags: review?(vladimir)
vlad, review ping?
Attachment #360898 - Flags: review?(vladimir) → review?(jmuizelaar)
Comment on attachment 360898 [details] [diff] [review]
with patch-in-patch

bouncing over to jeff for integration into cairo
Comment on attachment 360898 [details] [diff] [review]
with patch-in-patch

This has already been fixed and merged from upstream.
Attachment #360898 - Flags: review?(jmuizelaar)
Status: REOPENED → RESOLVED
Last Resolved: 11 years ago9 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.