diff options
| author | Max Lingua | 2014-01-23 18:33:15 -0500 |
|---|---|---|
| committer | Max Lingua | 2014-01-23 18:33:15 -0500 |
| commit | 4ccdb3e2a30ead1fa015437306b046b69b69035b (patch) | |
| tree | e7a75774b540d871848791a6a8db9358514a97b2 /backends/platform/android/texture.cpp | |
| parent | b69a2c81a7b0ed535e23e91928bc8ba193db744a (diff) | |
| parent | 2fe303ce3fff008a58e9750c66e707ec4e7c93d8 (diff) | |
| download | scummvm-rg350-4ccdb3e2a30ead1fa015437306b046b69b69035b.tar.gz scummvm-rg350-4ccdb3e2a30ead1fa015437306b046b69b69035b.tar.bz2 scummvm-rg350-4ccdb3e2a30ead1fa015437306b046b69b69035b.zip | |
Merge branch 'master' of git://github.com/scummvm/scummvm
Diffstat (limited to 'backends/platform/android/texture.cpp')
| -rw-r--r-- | backends/platform/android/texture.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp index cc41c0d8a6..87fd2d976c 100644 --- a/backends/platform/android/texture.cpp +++ b/backends/platform/android/texture.cpp @@ -259,11 +259,15 @@ void GLESTexture::fillBuffer(uint32 color) { assert(_surface.getPixels()); if (_pixelFormat.bytesPerPixel == 1 || - ((color & 0xff) == ((color >> 8) & 0xff))) + (_pixelFormat.bytesPerPixel == 2 && + ((color & 0xff) == ((color >> 8) & 0xff)))) memset(_pixels, color & 0xff, _surface.pitch * _surface.h); - else - Common::fill(_pixels, _pixels + _surface.pitch * _surface.h, + else if (_pixelFormat.bytesPerPixel == 2) + Common::fill((uint16 *)_pixels, (uint16 *)(_pixels + _surface.pitch * _surface.h), (uint16)color); + else + Common::fill((uint32 *)_pixels, (uint32 *)(_pixels + _surface.pitch * _surface.h), + color); setDirty(); } @@ -334,6 +338,13 @@ GLES565Texture::GLES565Texture() : GLES565Texture::~GLES565Texture() { } +GLES8888Texture::GLES8888Texture() : + GLESTexture(GL_RGBA, GL_UNSIGNED_BYTE, pixelFormat()) { +} + +GLES8888Texture::~GLES8888Texture() { +} + GLESFakePaletteTexture::GLESFakePaletteTexture(GLenum glFormat, GLenum glType, Graphics::PixelFormat pixelFormat) : GLESBaseTexture(glFormat, glType, pixelFormat), |
