aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android
diff options
context:
space:
mode:
authordhewg2011-03-05 10:05:35 +0100
committerdhewg2011-03-05 11:00:36 +0100
commit4ee0a9f43a3ccb70872b059a753485349529166d (patch)
tree25182666d329298b6333ec60f55008b757b898a0 /backends/platform/android
parent68378150beb96159db7d959d9625107b721eef57 (diff)
downloadscummvm-rg350-4ee0a9f43a3ccb70872b059a753485349529166d.tar.gz
scummvm-rg350-4ee0a9f43a3ccb70872b059a753485349529166d.tar.bz2
scummvm-rg350-4ee0a9f43a3ccb70872b059a753485349529166d.zip
ANDROID: Merge updateTexture()
Diffstat (limited to 'backends/platform/android')
-rw-r--r--backends/platform/android/texture.cpp18
-rw-r--r--backends/platform/android/texture.h10
2 files changed, 12 insertions, 16 deletions
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index f715f7bc66..6e31bc0c59 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -348,15 +348,6 @@ void GLESPaletteTexture::updateBuffer(GLuint x, GLuint y,
} while (--h);
}
-void GLESPaletteTexture::uploadTexture() const {
- const size_t texture_size =
- _paletteSize + _texture_width * _texture_height * _bytesPerPixel;
-
- GLCALL(glCompressedTexImage2D(GL_TEXTURE_2D, 0, _glType,
- _texture_width, _texture_height,
- 0, texture_size, _texture));
-}
-
void GLESPaletteTexture::drawTexture(GLshort x, GLshort y, GLshort w,
GLshort h) {
if (_all_dirty) {
@@ -369,7 +360,14 @@ void GLESPaletteTexture::drawTexture(GLshort x, GLshort y, GLshort w,
GL_CLAMP_TO_EDGE));
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE));
- uploadTexture();
+
+ const size_t texture_size =
+ _paletteSize + _texture_width * _texture_height * _bytesPerPixel;
+
+ GLCALL(glCompressedTexImage2D(GL_TEXTURE_2D, 0, _glType,
+ _texture_width, _texture_height,
+ 0, texture_size, _texture));
+
_all_dirty = false;
}
diff --git a/backends/platform/android/texture.h b/backends/platform/android/texture.h
index f1bc46e997..38a6228076 100644
--- a/backends/platform/android/texture.h
+++ b/backends/platform/android/texture.h
@@ -57,6 +57,10 @@ public:
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h);
+ inline void drawTexture() {
+ drawTexture(0, 0, _surface.w, _surface.h);
+ }
+
inline GLuint width() const {
return _surface.w;
}
@@ -78,10 +82,6 @@ public:
return _all_dirty || !_dirty_rect.isEmpty();
}
- inline void drawTexture() {
- drawTexture(0, 0, _surface.w, _surface.h);
- }
-
protected:
inline void setDirty() {
_all_dirty = true;
@@ -154,8 +154,6 @@ public:
};
protected:
- void uploadTexture() const;
-
byte *_texture;
};