[Y-devel] shapes?

Chris Amshey ychris at amshey.net
Wed Feb 25 19:44:34 GMT 2004


On Wed, Feb 25, 2004 at 04:55:48PM +0200, Mikko Rantalainen wrote:
> The best way, IMO, is to make widget API work so that the less 
> accelerated backends like SDL can replace some bells and whistles 
> with something boring like solid coloured rectangles. If the 
> application *really* wants to just draw a button and the backend is 
> only framebuffer it really doesn't make sense to draw "metallic 
> chrome with bump mapping and eight light sources" look-a-like button 
> if the poor performance makes the application unusable. A good API 
> should be able to just draw a plain button instead. The only 
> guestion is, how on earth we can come up with a such API? Should the 
> degration be done in the drawing API level or theme API level? Is it 
> user's fault if he tries to use "OpenGL with pixels shaders" level 
> theme with SDL backend or should the theme automatically degrade to 
> something low-level if low-end backend is detected or should Y make 
> the theme think that it's drawing with OpenGL and pixel shaders when 
> it's really doing an ugly and fast imitation with SDL?
> 
> Things like that must be decided before going any further.

Automatic degradation of UI, if ever implemented, should be in Y's theme
code - not the theme modules, and not the drawing code under the theme
modules. From the theme handling code is where we decide which theme module
is going to draw a widget based on what themes have been loaded and support
widgets. Making the 'which theme module' decision a little more thoughtful
about what to call would be the cleanest, least intrusive, least performance
penalty way to deal with this.

I'm not clear that automatic degradation of UI is actually a good idea,
however, and I am certain that it should at least be a switchable 
feature. If I ask for a particular theme, that's the theme I want and
expect - especially when you consider that the 'person' doing the asking and
expecting may well be some type of desktop manager application that full
well expects that when it asks for a standard theme, that's what it gets;
or in the case of accessibility layers to theme, a blind person would not
appreciate the extra time their 'sound effects' are taking being optimized
away (yes, we can create flags and more flags so that certain themes are
left alone and certain calls are left alone, or whatever...)
 
 My point, basically, is that trying to outsmart the user (or application
programmer) and doing it correctly involves imagining every contingency
possible, ever, and doing the right thing.

        --Chris











More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved