summaryrefslogtreecommitdiffstats
path: root/libs/hwui/font/CacheTexture.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-01-05 15:51:13 -0800
committerChris Craik <ccraik@google.com>2015-01-05 16:49:13 -0800
commitd41c4d8c732095ae99c955b6b82f7306633004b1 (patch)
treedbb2e26c6c5a80c7ccf43e5cd5fb1554cc603555 /libs/hwui/font/CacheTexture.cpp
parent8dfaa4904205772cdceee63ef3989bcdedf1a914 (diff)
downloadframeworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.zip
frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.tar.gz
frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.tar.bz2
Add overrides and switch to nullptr keyword for all files
Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
Diffstat (limited to 'libs/hwui/font/CacheTexture.cpp')
-rw-r--r--libs/hwui/font/CacheTexture.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/hwui/font/CacheTexture.cpp b/libs/hwui/font/CacheTexture.cpp
index 380c0ed..128e392 100644
--- a/libs/hwui/font/CacheTexture.cpp
+++ b/libs/hwui/font/CacheTexture.cpp
@@ -43,7 +43,7 @@ CacheBlock* CacheBlock::insertBlock(CacheBlock* head, CacheBlock* newBlock) {
#endif
CacheBlock* currBlock = head;
- CacheBlock* prevBlock = NULL;
+ CacheBlock* prevBlock = nullptr;
while (currBlock && currBlock->mY != TEXTURE_BORDER_SIZE) {
if (newBlock->mWidth < currBlock->mWidth) {
@@ -110,9 +110,9 @@ CacheBlock* CacheBlock::removeBlock(CacheBlock* head, CacheBlock* blockToRemove)
///////////////////////////////////////////////////////////////////////////////
CacheTexture::CacheTexture(uint16_t width, uint16_t height, GLenum format, uint32_t maxQuadCount) :
- mTexture(NULL), mTextureId(0), mWidth(width), mHeight(height), mFormat(format),
+ mTexture(nullptr), mTextureId(0), mWidth(width), mHeight(height), mFormat(format),
mLinearFiltering(false), mDirty(false), mNumGlyphs(0),
- mMesh(NULL), mCurrentQuad(0), mMaxQuadCount(maxQuadCount),
+ mMesh(nullptr), mCurrentQuad(0), mMaxQuadCount(maxQuadCount),
mCaches(Caches::getInstance()) {
mCacheBlocks = new CacheBlock(TEXTURE_BORDER_SIZE, TEXTURE_BORDER_SIZE,
mWidth - TEXTURE_BORDER_SIZE, mHeight - TEXTURE_BORDER_SIZE);
@@ -131,7 +131,7 @@ CacheTexture::~CacheTexture() {
void CacheTexture::reset() {
// Delete existing cache blocks
- while (mCacheBlocks != NULL) {
+ while (mCacheBlocks != nullptr) {
CacheBlock* tmpBlock = mCacheBlocks;
mCacheBlocks = mCacheBlocks->mNext;
delete tmpBlock;
@@ -154,7 +154,7 @@ void CacheTexture::releaseMesh() {
void CacheTexture::releaseTexture() {
if (mTexture) {
delete mTexture;
- mTexture = NULL;
+ mTexture = nullptr;
}
if (mTextureId) {
mCaches.deleteTexture(mTextureId);
@@ -193,7 +193,7 @@ void CacheTexture::allocateTexture() {
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
// Initialize texture dimensions
glTexImage2D(GL_TEXTURE_2D, 0, mFormat, mWidth, mHeight, 0,
- mFormat, GL_UNSIGNED_BYTE, 0);
+ mFormat, GL_UNSIGNED_BYTE, nullptr);
const GLenum filtering = getLinearFiltering() ? GL_LINEAR : GL_NEAREST;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filtering);