diff options
author | dhewg | 2011-02-19 16:49:45 +0100 |
---|---|---|
committer | dhewg | 2011-02-19 20:15:51 +0100 |
commit | 229e3ca5bf4bbc91b6bf85a5fe6dd9356a97a5ef (patch) | |
tree | 52e1c2b29a08d291bcbf61da9c4d6628c6c7c709 /backends | |
parent | 435069fe4a548fe872ab7df0c13df3726359e155 (diff) | |
download | scummvm-rg350-229e3ca5bf4bbc91b6bf85a5fe6dd9356a97a5ef.tar.gz scummvm-rg350-229e3ca5bf4bbc91b6bf85a5fe6dd9356a97a5ef.tar.bz2 scummvm-rg350-229e3ca5bf4bbc91b6bf85a5fe6dd9356a97a5ef.zip |
ANDROID: inline some GLESTexture members
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/android/video.h | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/backends/platform/android/video.h b/backends/platform/android/video.h index 1e00f9bd57..da42ea876d 100644 --- a/backends/platform/android/video.h +++ b/backends/platform/android/video.h @@ -42,35 +42,40 @@ public: virtual void reinitGL(); virtual void allocBuffer(GLuint width, GLuint height); - const Graphics::Surface *surface_const() const { - return &_surface; - } + virtual void updateBuffer(GLuint x, GLuint y, GLuint width, GLuint height, + const void *buf, int pitch); + virtual void fillBuffer(byte x); - GLuint width() const { + virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h); + + inline GLuint width() const { return _surface.w; } - GLuint height() const { + inline GLuint height() const { return _surface.h; } - GLuint texture_name() const { + inline GLuint texture_name() const { return _texture_name; } - bool dirty() const { - return _all_dirty || !_dirty_rect.isEmpty(); + inline const Graphics::Surface *surface_const() const { + return &_surface; } - virtual void updateBuffer(GLuint x, GLuint y, GLuint width, GLuint height, - const void *buf, int pitch); - virtual void fillBuffer(byte x); + inline Graphics::Surface *surface() { + setDirty(); + return &_surface; + } - virtual void drawTexture() { - drawTexture(0, 0, _surface.w, _surface.h); + inline bool dirty() const { + return _all_dirty || !_dirty_rect.isEmpty(); } - virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h); + inline void drawTexture() { + drawTexture(0, 0, _surface.w, _surface.h); + } protected: virtual byte bytesPerPixel() const = 0; @@ -81,12 +86,12 @@ protected: return 0; } - void setDirty() { + inline void setDirty() { _all_dirty = true; _dirty_rect = Common::Rect(); } - void setDirtyRect(const Common::Rect& r) { + inline void setDirtyRect(const Common::Rect& r) { if (!_all_dirty) { if (_dirty_rect.isEmpty()) _dirty_rect = r; @@ -146,33 +151,23 @@ public: virtual void allocBuffer(GLuint width, GLuint height); virtual void updateBuffer(GLuint x, GLuint y, GLuint width, GLuint height, const void *buf, int pitch); + virtual void fillBuffer(byte x); - Graphics::Surface *surface() { - setDirty(); - return &_surface; - } + virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h); - void *pixels() { - setDirty(); - return _surface.pixels; + inline void drawTexture() { + drawTexture(0, 0, _surface.w, _surface.h); } - const byte *palette_const() const { + inline const byte *palette_const() const { return _texture; }; - byte *palette() { + inline byte *palette() { setDirty(); return _texture; }; - virtual void drawTexture() { - drawTexture(0, 0, _surface.w, _surface.h); - } - - virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h); - virtual void fillBuffer(byte x); - protected: virtual byte bytesPerPixel() const { return 1; @@ -190,7 +185,7 @@ protected: return 256 * 3; } - virtual void uploadTexture() const; + void uploadTexture() const; byte *_texture; }; |