aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/android/video.h61
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;
};