diff options
| author | 2015-01-06 00:50:52 +0000 | |
|---|---|---|
| committer | 2015-01-06 00:50:53 +0000 | |
| commit | b15f21effb8d5be988bb46eea00b6ff28222aa98 (patch) | |
| tree | 1e972cc58de13661c5db8bf76d3b8d860a0bcfb4 /libs/hwui/GammaFontRenderer.cpp | |
| parent | 578efef682cc2216db121bb88d2af977703ee6e2 (diff) | |
| parent | d41c4d8c732095ae99c955b6b82f7306633004b1 (diff) | |
Merge "Add overrides and switch to nullptr keyword for all files"
Diffstat (limited to 'libs/hwui/GammaFontRenderer.cpp')
| -rw-r--r-- | libs/hwui/GammaFontRenderer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/hwui/GammaFontRenderer.cpp b/libs/hwui/GammaFontRenderer.cpp index 0a98c29d2044..e97a4771ae3f 100644 --- a/libs/hwui/GammaFontRenderer.cpp +++ b/libs/hwui/GammaFontRenderer.cpp @@ -61,7 +61,7 @@ GammaFontRenderer::GammaFontRenderer() { // Get the gamma mGamma = DEFAULT_TEXT_GAMMA; - if (property_get(PROPERTY_TEXT_GAMMA, property, NULL) > 0) { + if (property_get(PROPERTY_TEXT_GAMMA, property, nullptr) > 0) { INIT_LOGD(" Setting text gamma to %s", property); mGamma = atof(property); } else { @@ -70,7 +70,7 @@ GammaFontRenderer::GammaFontRenderer() { // Get the black gamma threshold mBlackThreshold = DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD; - if (property_get(PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD, property, NULL) > 0) { + if (property_get(PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD, property, nullptr) > 0) { INIT_LOGD(" Setting text black gamma threshold to %s", property); mBlackThreshold = atoi(property); } else { @@ -80,7 +80,7 @@ GammaFontRenderer::GammaFontRenderer() { // Get the white gamma threshold mWhiteThreshold = DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD; - if (property_get(PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD, property, NULL) > 0) { + if (property_get(PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD, property, nullptr) > 0) { INIT_LOGD(" Setting text white gamma threshold to %s", property); mWhiteThreshold = atoi(property); } else { @@ -98,13 +98,13 @@ GammaFontRenderer::~GammaFontRenderer() { ShaderGammaFontRenderer::ShaderGammaFontRenderer(bool multiGamma): GammaFontRenderer() { INIT_LOGD("Creating shader gamma font renderer"); - mRenderer = NULL; + mRenderer = nullptr; mMultiGamma = multiGamma; } void ShaderGammaFontRenderer::describe(ProgramDescription& description, const SkPaint* paint) const { - if (paint->getShader() == NULL) { + if (paint->getShader() == nullptr) { if (mMultiGamma) { const int l = luminance(paint); @@ -149,7 +149,7 @@ LookupGammaFontRenderer::LookupGammaFontRenderer(): GammaFontRenderer() { mGammaTable[i] = uint8_t((float)::floor(pow(i / 255.0f, gamma) * 255.0f + 0.5f)); } - mRenderer = NULL; + mRenderer = nullptr; } void LookupGammaFontRenderer::endPrecaching() { @@ -234,7 +234,7 @@ FontRenderer* Lookup3GammaFontRenderer::getRenderer(Gamma gamma) { } FontRenderer& Lookup3GammaFontRenderer::getFontRenderer(const SkPaint* paint) { - if (paint->getShader() == NULL) { + if (paint->getShader() == nullptr) { const int l = luminance(paint); if (l <= mBlackThreshold) { |