diff options
| author | Jason Sams <rjsams@android.com> | 2010-12-15 01:41:00 -0800 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-12-15 01:41:00 -0800 |
| commit | 6d8eb266dd398abf0511685fdaf98abba3396174 (patch) | |
| tree | 1dab5166d146562573c048806a337b24177d732e /libs/rs/rsAllocation.cpp | |
| parent | 7dddf275cd7aa3b44ebeea1e34346f0a31308649 (diff) | |
| download | frameworks_base-6d8eb266dd398abf0511685fdaf98abba3396174.zip frameworks_base-6d8eb266dd398abf0511685fdaf98abba3396174.tar.gz frameworks_base-6d8eb266dd398abf0511685fdaf98abba3396174.tar.bz2 | |
Fix mipmap bug introduced with Allocation cleanup.
Add syncAll to rsg headers.
Change-Id: I02c953f3fddab3c6f4e98570cdad45a59711bbde
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
| -rw-r--r-- | libs/rs/rsAllocation.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 78b570a..cb00223 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -191,13 +191,6 @@ void Allocation::uploadToTexture(const Context *rsc) { uploadCubeTexture(isFirstUpload); } - if (mMipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { -#ifndef ANDROID_RS_BUILD_FOR_HOST - glGenerateMipmap(target); -#endif //ANDROID_RS_BUILD_FOR_HOST - } - - if (!(mUsageFlags & RS_ALLOCATION_USAGE_SCRIPT)) { freeScriptMemory(); } @@ -227,6 +220,12 @@ void Allocation::upload2DTexture(bool isFirstUpload, const void *ptr) { format, type, p); } } + + if (mMipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { +#ifndef ANDROID_RS_BUILD_FOR_HOST + glGenerateMipmap(target); +#endif //ANDROID_RS_BUILD_FOR_HOST + } } void Allocation::uploadCubeTexture(bool isFirstUpload) { @@ -266,6 +265,12 @@ void Allocation::uploadCubeTexture(bool isFirstUpload) { } } } + + if (mMipmapControl == RS_ALLOCATION_MIPMAP_ON_SYNC_TO_TEXTURE) { +#ifndef ANDROID_RS_BUILD_FOR_HOST + glGenerateMipmap(target); +#endif //ANDROID_RS_BUILD_FOR_HOST + } } void Allocation::deferedUploadToBufferObject(const Context *rsc) { |
