And indeed, the docs at the link you give seem to imply that
"compatibility mode" is turned on/off by the use of <support-screens>
tags, e.g. 'largsScreens="false"' turns it on.

BTW: the docs call it "screen-compatibility mode" and not just
"compatibility mode". That discrepancy also makes it harder to
understand what Dianne was talking about. But if Dianne had used the
exact same term, a simple Google search would have answered any
lingering questions the OP might have had.

Surely it is not too much to expect a Google employee to know how to
make Google queries simpler (by using exact spelling and the like) for
their correspondents.

The point I am trying to make is that if Dianne really wanted him to
do as she says, she should have said something about how to turn the
mode on and off since, as you say, "you won't see docs for it on any
view". I am not surprised he did not take the time out to read the
entire doc on Multiple Screen Support to figure this out. He should
not have to do that.

On Aug 4, 10:45 am, Robert Green <[email protected]> wrote:
> Compatibility mode means that Android tries to scale the output to be
> 480x320 or the closest thing to it.
>
> My first games run in compatibility mode, which puts the resolution at
> something like 587x320 on a droid.  When you turn anydensity on, you
> get native resolution on the droid which is 854x480
>
> You won't see docs for it on any view because it's a whole application
> thing 
> -http://developer.android.com/intl/de/guide/practices/screens_support....
>
> On Aug 4, 12:07 pm, Indicator Veritatis <[email protected]> wrote:
>
> > It is possible that the reason you have been getting no
> > acknowledgement for this line of reasoning is because he can't figure
> > out what you mean by "compatibility mode". It is not described in the
> > online docs under GLSurfaceView.
>
> > On Aug 4, 1:25 am, Dianne Hackborn <[email protected]> wrote:
>
> > > I explained why you are probably seeing the performance improvement --
> > > because turning on compatibility mode forces the system to give you a
> > > surface whose resolution matches an HVGA, meaning you have fewer pixels to
> > > draw (and the surface flinger will resize it when compositing, using
> > > hardware).
>
> > > I explained why you don't want to do this -- for example it will also 
> > > effect
> > > ldpi devices where your surface will actually be *larger* than needed and
> > > get scaled down during compositing.
>
> > > I explained how you can do this the right way -- don't force the system to
> > > use compatibility mode but rather explicitly set the surface view to a 
> > > fixed
> > > size that you find appropriate.
>
> > > I suggest doing that. :)
>
> > > On Wed, Aug 4, 2010 at 1:20 AM, mrqzzz <[email protected]> wrote:
> > > > Hi Dianne, thanks for the exhaustive response.
> > > > Yes i am using a SurfaceView.
>
> > > > So far i realized that i get slow-downs only if i declare support for
> > > > any density:
> > > > <supports-screens android:anyDensity="true"> (<--slows)
>
> > > > In my game  i handle a fake 2D zoom effect with
> > > >  drawable.setBounds(...)
> > > > And than painting on the canvas with:
> > > >  drawable.draw(canvas)
>
> > > > So far, i find this configuration working smoothly:
>
> > > > <supports-screens
> > > > android:anyDensity="false"
> > > > android:normalScreens="true"
> > > > android:largeScreens="true"
> > > > android:smallScreens="true"
> > > > android:resizeable="true">
> > > > </supports-screens>
>
> > > > Thank you,
> > > > Marcus.
>
> > > > On Aug 3, 6:30 pm, Dianne Hackborn <[email protected]> wrote:
> > > > > Are you using a surface view?  Most likely the reason for this is that
> > > > when
> > > > > in compatibility mode, the system tries to make everything look like
> > > > anmdpi
> > > > > screen.  This with a surface view on non-mdpi screens it will give 
> > > > > you a
> > > > > surface that is correct size for mdpi, and the surfaceflinger
>
> > > > > flinger will scale it
> > > > > when compositing to the screen.  Thus on am hdpi screen, your surface 
> > > > > is
> > > > > smaller and scaled up; on a ldpi screen, it is *larger* and scaled 
> > > > > down.
>
> > > > > For your UI outside of the surface view, the window's surface remains 
> > > > > at
> > > > the
> > > > > actual screen's density, but drawing to it is through an 
> > > > > transformation
> > > > > matrix to scale it appropriately.  This allows text and other vector
> > > > drawing
> > > > > to remain at the correct resolution (not pixelated), but can cause
> > > > artifacts
> > > > > because things like font metrics you compute will be in your
> > > > compatibility
> > > > > density but the font is actually drawn in the screen density and so 
> > > > > can
> > > > be
> > > > > slightly different in size.
>
> > > > > You really do not want to do this.
>
> > > > > I strongly recommend you figure out which aspect of the compatibility
> > > > mode
> > > > > is improving your performance, and implementing your app to explicitly
> > > > just
> > > > > do that when running on a different screen density.  For example, if 
> > > > > you
> > > > are
> > > > > using a surface view, you can set it to be a fixed size, which causes 
> > > > > the
> > > > > surface flinger to scale it during compositing to match the actual 
> > > > > size
> > > > of
> > > > > the view in its window, achieving the same effect there.  But you can 
> > > > > be
> > > > > smart and not do this on an ldpi device.
>
> > > > > On Tue, Aug 3, 2010 at 8:27 AM, mrqzzz <[email protected]> wrote:
> > > > > > The issue was solved setting in Manifest.xml  supports-screens
> > > > > > anyDensity to false:
>
> > > > > > <supports-screens android:anyDensity="false"
> > > > > > android:normalScreens="true" android:largeScreens="true"
> > > > > > android:smallScreens="true" android:resizeable="true"></supports-
> > > > > > screens>
>
> > > > > > I don't need that feature since i adapt the size of my objects to 
> > > > > > the
> > > > > > screen myself.
>
> > > > > > Thank you Kostya for the helpful tip!
>
> > > > > > Marcus.
>
> > > > > > On Aug 3, 3:58 pm, mrqzzz <[email protected]> wrote:
> > > > > > > Thanks for the fast reply!
> > > > > > > That might be the issue... I'll test ASAP.
>
> > > > > > > thanks,
> > > > > > > Marcus.
>
> > > > > > > On Aug 3, 3:27 pm, Kostya Vasilyev <[email protected]> wrote:
>
> > > > > > > > Did you declare support for varying screen sizes?
>
> > > > > > > >http://developer.android.com/guide/practices/screens_support.html
>
> > > > > > > > 03.08.2010 17:19, mrqzzz пишет:
>
> > > > > > > > > ...and if i don't specify any min SDK version, it runs smooth.
>
> > > > > > > > > I get average 30 fps vs. 12 fps.
>
> > > > > > > > > I am using Canvas to render and a JBox jar for physics.
>
> > > > > > > > > Tested and re-tested on a Motorola Milestone with Android 2.1
> > > > update
> > > > > > > > > 1.
> > > > > > > > > Using latest Eclipse ADT.
>
> > > > > > > > > Any tips?
>
> > > > > > > > > Thanks,
> > > > > > > > > Marcus.
>
> > > > > > > > --
> > > > > > > > Kostya Vasilev -- WiFi Manager + pretty widget --
> > > > > >http://kmansoft.wordpress.com
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google
> > > > > > Groups "Android Developers" group.
> > > > > > To post to this group, send email to
> > > > [email protected]
> > > > > > To unsubscribe from this group, send email to
> > > > > > [email protected]<android-developers%2Bunsubs
> > > > > >  [email protected]><android-developers%2Bunsubs
> > > > [email protected]>
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > --
> > > > > Dianne Hackborn
> > > > > Android framework engineer
> > > > > [email protected]
>
> > > > > Note: please don't send private questions to me, as I don't have time 
> > > > > to
> > > > > provide private support, and so won't reply to such e-mails.  All such
> > > > > questions should be posted on public forums, where I and others can 
> > > > > see
> > > > and
> > > > > answer them.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<android-developers%2Bunsubs
> > > >  [email protected]>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see 
> > > and
> > > answer them.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to