aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRenderer.h
diff options
context:
space:
mode:
authorMax Horn2009-01-30 16:18:58 +0000
committerMax Horn2009-01-30 16:18:58 +0000
commite354c4b4f28ec5e67817fe3161ce163bd60e4748 (patch)
tree866b4f8fa64b43dfc0ad7eec57dcbaacb01b5625 /graphics/VectorRenderer.h
parentf49e0667a4a2bfb55022705f58b4c2608d86b2b5 (diff)
downloadscummvm-rg350-e354c4b4f28ec5e67817fe3161ce163bd60e4748.tar.gz
scummvm-rg350-e354c4b4f28ec5e67817fe3161ce163bd60e4748.tar.bz2
scummvm-rg350-e354c4b4f28ec5e67817fe3161ce163bd60e4748.zip
Got rid of VectorRenderer::surfacePitch() & VectorRenderer::bytesPerPixel(): the latter was not used, for the former it is silly to go through a virtual method to compute that value; all in all, this code performs too many unnecessary divisions ;)
svn-id: r36151
Diffstat (limited to 'graphics/VectorRenderer.h')
-rw-r--r--graphics/VectorRenderer.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 9d5453aa57..7905c43940 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -218,28 +218,6 @@ public:
}
/**
- * Gets the pixel pitch for the current drawing surface.
- * Note: This is a real pixel-pitch, not a byte-pitch.
- * That means it can be safely used in pointer arithmetics and
- * in pixel manipulation.
- *
- * @return integer with the active bytes per pixel
- */
- virtual uint16 surfacePitch() {
- return _activeSurface->pitch / _activeSurface->bytesPerPixel;
- }
-
- /**
- * Gets the BYTES (not bits) per Pixel we are working on,
- * based on the active drawing surface.
- *
- * @return integer byte with the active bytes per pixel value
- */
- virtual uint8 bytesPerPixel() {
- return _activeSurface->bytesPerPixel;
- }
-
- /**
* Set the active foreground painting color for the renderer.
* All the foreground drawing from then on will be done with that color, unless
* specified otherwise.
@@ -303,7 +281,7 @@ public:
*/
virtual void clearSurface() {
byte *src = (byte *)_activeSurface->pixels;
- memset(src, 0, _activeSurface->w * _activeSurface->h * _activeSurface->bytesPerPixel);
+ memset(src, 0, _activeSurface->pitch * _activeSurface->h);
}
/**