Re: Quartz/memory benchmarks...
Re: Quartz/memory benchmarks...
- Subject: Re: Quartz/memory benchmarks...
- From: Paul Fox <email@hidden>
- Date: Mon, 15 Jul 2002 22:49:11 +0100
>
> I think Apple should carry on with Cocoa and provide a complete new
>
> API with none of the anti-aliasing, floating-point co-ords crap and
>
>
I agree with anti-aliasing being BAD.
>
>
The idea of "Lets smooth out diagonal jaggies" is GOOD.
>
The idea of "Lets blur every straight line" is BAD.
>
>
I have yet to see an anti-aliasing system that I really like.
Most anti-aliased text systems just give blurry, fainter text.
>
>
Just a quickie: All anti-aliasing algorithms that I've seen
>
try to keep the total black ink on a row the same, by adding
>
some black to the white, and reducing the black from the dark.
>
But they don't make any attempt to keep the black per column
>
the same. They don't make any attempt to say "Lets keep the
>
solid ink areas solid". They don't make any attempt to say
>
"Lets keep the solid background spacing between/around the ink
>
solid background". Result? Blurry, no contrast.
>
>
I found out something worse about anti-aliasing today which is annoying.
As I have mentioned previously - performance is my big issue. Graphics
ops on Cocoa are 10-100 times slower than any platform I have ever used.
This has made me optimise both my low-level driver layer code and
some higher level app code.
What I found was emulating the X11 XDrawString() function. This
draws a string without drawing the background color.
On the other platforms, I can quite happily call this op
multiple times to write the same string to the same X,Y co-ords.
Obviously I shouldnt do from a performance perspective (this happens
because of forced drawing followed by a drawRect: call).
But on Cocoa its worse than just a simple perf problem. Becuase of
anti-aliasing, the first time the text is drawn - its plain
anti-aliases - not pretty but not bad. The second time, it
'merges' the anti-aliased text with the new string, smudging it further.
If this is repeated a few times, it reaches a steady state of smudginess
where it looks unreadable and ugly (and a hint to me that it actually
happened). Until I understood this I just thought the anti-aliasing was
ugly. Now I know it pinpoints code writing the same string multiple
times.
I dont see a solution to this if anti-aliasing is on, so its up to
me to further optimise my coding and do better. But it is a warning
of the drawing model that this can happen. More than likely, it can happen
to people porting code rather than writing pure cocoa apps afresh.
It actually makes the Mac a desirable platform to test new s/w on
to visibly see performance hotspots which are not visible on any other
platform.
Bizarre!
>
I am a Mac OS X-Cocoa/WOF/EOF developer, and I'm available
for hire. Please contact me at michael-job @ stb.nccom.com if
interested. Resume at
http://resumes.dice.com/keybounce
>
>
>
>
>
+-------------------------------------------------------------------------+
| CRiSP - Flexible editor | CRiSP, syn. for BRIEF |#
| | Internet: email@hidden |#
| If you get no reply for | WWW: (mine)
http://www.crisp.demon.co.uk |#
| support, please check your | WWW:
http://www.crisp.com |#
| Reply-To: email address. | WWW:
http://www.pacemaker.co.uk |#
+-------------------------------------------------------------------------+#
###########################################################################
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.