[Scummvm-devel] SurfaceSDL-Backends and Scaler Plugins
Eric Culp
eculperic at gmail.com
Tue Aug 14 21:05:23 CEST 2012
Hi all
I want to make a pull request soon for my scaler work, but I need some
input from backend authors.
The affected backends are:
DINGUX, GPH, LinuxMoto, OpenPandora, Symbian, and WinCE
I have read all the backend code and tried to make some specific
suggestions for each.
Code is located at
https://github.com/singron/scummvm/tree/gsoc2012-scalers
All ports
=========
The SurfaceSdl getSupportedGraphicsModes does runtime selection of
available plugins. Defining s_supportedGraphicsModes is not needed
anymore. Use configuration defines to enable the compilation and linking
of the different plugins. Right now there are 4 states:
None of the below defined: Only the Normal plugin is used and it does 1x
scaling only.
USE_SCALERS: All are enabled except HQ and Edge scalers.
USE_HQ_SCALERS: All enabled except Edge scaler. Requires above define.
USE_EDGE_SCALERS: All scalers enabled. Requires both above defines.
Similarly, setGraphicsMode(int mode) should no longer need to be
overriden (or it can at least call the parent implementation after some
extra handling).
The Edge plugin is a slow scaler. It struggles to stay responsive on
desktop platforms and is probably not desireable for any of these
platforms. I have updated the configuration file to only use the edge
scaler on the desktop platforms.
Ports using GFX_HALF
====================
There is no GFX_HALF plugin. The scaler plugins could be extended for
such a thing, or it could be handled as a special case (like it is now).
There was discussion on scummvm-devel about possibly subclassing
SurfaceSdl for GFX_HALF since it is common for 320x240 devices.
Let me know if there are any changes I can do to make this easier (e.g.
how gfx modes are managed).
DINGUX, GPH, and LinuxMoto
==========================
See notes on GFX_HALF. I do not see any other issues.
OpenPandora and Symbian
=======================
These ports seem not to override much of surfaceSdl. They might be fine
with only preventing certain plugins from linking and compiling.
WinCE
=====
This is the most complicated port.
For high and low resolution devices, I would link all plugins that could
possibly be used, but the normal plugin is guarenteed to be plugin 0. So
low resolution devices can default to mode 0. Otherwise, high resolution
devices can switch plugins as they did before.
The special aspect + scaling functions (e.g. Normal2xAspect) do not have
plugin counterparts. I would recommend either using the normal plugin
and aspect correcting afterward (like the desktop), or treating them as
a special case (similar to GFX_HALF) especially if they offer necessary
performance benefits on some devices.
Thanks
Eric Culp (singron)
More information about the Scummvm-devel
mailing list