summaryrefslogtreecommitdiffstats
path: root/libs/hwui/AssetAtlas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/AssetAtlas.cpp')
-rw-r--r--libs/hwui/AssetAtlas.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/hwui/AssetAtlas.cpp b/libs/hwui/AssetAtlas.cpp
index 52ca92d..4d2e3a0 100644
--- a/libs/hwui/AssetAtlas.cpp
+++ b/libs/hwui/AssetAtlas.cpp
@@ -18,6 +18,7 @@
#include "AssetAtlas.h"
#include "Caches.h"
+#include "Image.h"
#include <GLES2/gl2ext.h>
@@ -47,7 +48,7 @@ void AssetAtlas::init(sp<GraphicBuffer> buffer, int64_t* map, int count) {
} else {
ALOGW("Could not create atlas image");
delete mImage;
- mImage = NULL;
+ mImage = nullptr;
}
updateTextureId();
@@ -56,7 +57,7 @@ void AssetAtlas::init(sp<GraphicBuffer> buffer, int64_t* map, int count) {
void AssetAtlas::terminate() {
if (mImage) {
delete mImage;
- mImage = NULL;
+ mImage = nullptr;
updateTextureId();
}
}
@@ -82,12 +83,12 @@ void AssetAtlas::updateTextureId() {
AssetAtlas::Entry* AssetAtlas::getEntry(const SkBitmap* bitmap) const {
ssize_t index = mEntries.indexOfKey(bitmap);
- return index >= 0 ? mEntries.valueAt(index) : NULL;
+ return index >= 0 ? mEntries.valueAt(index) : nullptr;
}
Texture* AssetAtlas::getEntryTexture(const SkBitmap* bitmap) const {
ssize_t index = mEntries.indexOfKey(bitmap);
- return index >= 0 ? mEntries.valueAt(index)->texture : NULL;
+ return index >= 0 ? mEntries.valueAt(index)->texture : nullptr;
}
/**
@@ -98,12 +99,12 @@ struct DelegateTexture: public Texture {
DelegateTexture(Caches& caches, Texture* delegate): Texture(caches), mDelegate(delegate) { }
virtual void setWrapST(GLenum wrapS, GLenum wrapT, bool bindTexture = false,
- bool force = false, GLenum renderTarget = GL_TEXTURE_2D) {
+ bool force = false, GLenum renderTarget = GL_TEXTURE_2D) override {
mDelegate->setWrapST(wrapS, wrapT, bindTexture, force, renderTarget);
}
virtual void setFilterMinMag(GLenum min, GLenum mag, bool bindTexture = false,
- bool force = false, GLenum renderTarget = GL_TEXTURE_2D) {
+ bool force = false, GLenum renderTarget = GL_TEXTURE_2D) override {
mDelegate->setFilterMinMag(min, mag, bindTexture, force, renderTarget);
}