[haiku-development] Re: Disable BView antialiasing

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 27 Sep 2009 10:47:06 +0800

On 2009-09-25 at 21:25:30 [+0800], Niels Reedijk <niels.reedijk@xxxxxxxxx> 
wrote:
> 2009/9/25 Stuart Adam <engaric@xxxxxxxxxxx>:
[...]
> > Sorry cannot agree that this is over-engineering.
> > The design for detecting the flag is simpler than auto detect of app style
> > and no more complex than having to add a new api call.
> 
> Your flag design involves three layers of the code:
> a) The interface kit layer which needs to be rewritten to support
> non-AA drawing.
> b) The FileTypes app which you want to make aware of this flag
> c) The website and build system that need to be adapted to produce
> such an automation.
> 
> The detection routine is far simpler, since it only involves level a.
> I cannot imagine that detecting the platform of the image is difficult
> (though I would like a second opinion by someone in the know of the
> elf layer).

Haiku extends the image_info structure by "api_version" and "abi", so it's 
very easy to check whether or not the shared object was compiled under Haiku. 
For internal use we should add a convenience function to 
headers/private/app/AppMisc.h to easily get the image info for the 
application image -- get_app_{path,ref}() already do that anyway.


On 2009-09-26 at 03:31:58 [+0800], Caitlin Shaw <rogueeve@xxxxxxxxxxxxx> 
wrote:
[...]
> This is the list of possibilities I went down in my head. Based on this,
> it seems that the simplest and best way is the first way, a bitmask with
> default=off. That naturally solves the problem and is both backwards and
> forwards compatible, whereas the other idea is to change the API
> behavior, then oops that broke a couple of things, so we'll add a flag
> to change it back, but oops we can't recompile some of those apps to add
> the flag, so we'll hack the runtime loader to detect that fact and add
> the flag for them.

I believe generally it is desired to enable AA for all views, so the most 
convenient way is to make AA an opt-out feature. This seems to be, as you 
write, a more complicated solution than simply making the feature opt-in, but 
making writing Haiku applications less convenient for sake of old BeOS 
applications or back-porting Haiku code to BeOS is not the way to go IMHO.

CU, Ingo

Other related posts: