mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 05:36:12 +00:00
GRAPHICS: adds comments for scalers and clean up
This commit is contained in:
parent
739c75c869
commit
0d103d01c4
@ -24,7 +24,6 @@
|
||||
|
||||
void NormalPlugin::initialize(Graphics::PixelFormat format) {}
|
||||
|
||||
|
||||
void NormalPlugin::scale(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) {
|
||||
if (!_doScale) {
|
||||
@ -60,17 +59,5 @@ const char *NormalPlugin::getName() const {
|
||||
return "Normal";
|
||||
}
|
||||
|
||||
int NormalPlugin::getFactor() {
|
||||
return _factor;
|
||||
}
|
||||
|
||||
bool NormalPlugin::canDrawCursor() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int NormalPlugin::extraPixels() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
REGISTER_PLUGIN_STATIC(NORMAL, PLUGIN_TYPE_SCALER, NormalPlugin);
|
||||
|
@ -32,9 +32,9 @@ public:
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
virtual int increaseFactor();
|
||||
virtual int decreaseFactor();
|
||||
virtual int getFactor();
|
||||
virtual bool canDrawCursor();
|
||||
virtual int extraPixels();
|
||||
virtual int getFactor() { return _factor; }
|
||||
virtual bool canDrawCursor() { return true; }
|
||||
virtual int extraPixels() { return 0; }
|
||||
virtual const char *getName() const;
|
||||
};
|
||||
|
||||
|
@ -32,29 +32,47 @@ public:
|
||||
|
||||
virtual ~ScalerPluginObject() {}
|
||||
|
||||
/**
|
||||
* This function will be called before any scaler is used.
|
||||
* Precomputed data should be generated here.
|
||||
* @param format The pixel format to scale.
|
||||
*/
|
||||
virtual void initialize(Graphics::PixelFormat format) = 0;
|
||||
|
||||
/**
|
||||
* This is called when the plugin is not needed. It should clean
|
||||
* up memory from the initialize method.
|
||||
*/
|
||||
virtual void deinitialize() {}
|
||||
|
||||
virtual void scale(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) = 0;
|
||||
virtual void scale(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
|
||||
uint32 dstPitch, int width, int height, int x, int y) = 0;
|
||||
|
||||
virtual int getFactor() = 0;
|
||||
|
||||
/**
|
||||
* Increase the factor of scaling.
|
||||
* @return the new factor
|
||||
* @return The new factor
|
||||
*/
|
||||
virtual int increaseFactor() = 0;
|
||||
|
||||
/**
|
||||
* Decrease the factor of scaling.
|
||||
* @return the new factor
|
||||
* @return The new factor
|
||||
*/
|
||||
virtual int decreaseFactor() = 0;
|
||||
|
||||
virtual int getFactor() = 0;
|
||||
|
||||
/**
|
||||
* Indicates how far outside the scaling region this scaler "looks"
|
||||
* @return The number of pixels in any direction
|
||||
*/
|
||||
virtual int extraPixels() = 0;
|
||||
|
||||
/**
|
||||
* Some scalers are not suitable for scaling the cursor.
|
||||
* Blurring scalers should return false.
|
||||
*/
|
||||
virtual bool canDrawCursor() = 0;
|
||||
|
||||
// temporary HACK
|
||||
|
Loading…
x
Reference in New Issue
Block a user