Closed
Bug 328820
Opened 18 years ago
Closed 18 years ago
Fast path ASCII text measuring/drawing
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: pavlov, Assigned: pavlov)
References
Details
Attachments
(1 file, 1 obsolete file)
12.51 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
Since the DOM can provide us with ASCII strings, we should fast path them on the various platforms where we can.
Assignee | ||
Comment 1•18 years ago
|
||
With a few changes, we could probably use this function to also support non-complex scripts which would probably give us a win as well. I also need to see if I need to support RTL here...
Assignee: nobody → pavlov
Status: NEW → ASSIGNED
Comment on attachment 213436 [details] [diff] [review] windows fast pathing >+ int dxbuf[1024]; >+ results.nGlyphs = 1020; >+ results.lpDx = dxbuf; ... >+ for (PRInt32 k = 0; k < numGlyphs; k++) { What happens if I have more than 1024 glyphs? Why is nGlyphs 1020 instead of 1024?
Assignee | ||
Comment 3•18 years ago
|
||
this should be good enough. I'm told it isn't possible to do RTL with ascii text, but I'm skeptical so I added a warning. This should all be good now.
Attachment #213436 -
Attachment is obsolete: true
Attachment #213500 -
Flags: review?(vladimir)
Comment on attachment 213500 [details] [diff] [review] updated patch >@@ -354,16 +365,47 @@ > void > gfxWindowsTextRun::DrawString(gfxContext *aContext, gfxPoint pt) > { >+ if (mIsASCII && (MeasureOrDrawAscii(aContext, PR_TRUE, pt.x, pt.y, nsnull) != -1)) >+ return; >+ > MeasureOrDrawUniscribe(aContext, PR_TRUE, pt.x, pt.y, nsnull); > } > gfxFloat > gfxWindowsTextRun::MeasureString(gfxContext *aContext) > { >+#else >+ if (mIsASCII) { >+ PRInt32 ret = MeasureOrDrawAscii(aContext, PR_FALSE, 0, 0, nsnull); >+ if (ret != -1) { >+ return ret; >+ } >+ } Use the same construct as above (or change the one above to match this one, just make 'em consistent) r=me
Attachment #213500 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 5•18 years ago
|
||
This patch seems to have caused the following error in my Win32/cygwin/MinGW build e:/mozilla/source/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:557: error: invalid static_cast from type `NS_ConvertASCIItoUTF16' to type `nsAString_internal&'
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•18 years ago
|
||
so file a new bug. this one is fixed.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•