diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 5 | ||||
-rw-r--r-- | libs/hwui/Program.h | 4 | ||||
-rw-r--r-- | libs/hwui/Properties.h | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index c92bead..a755320 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -45,8 +45,7 @@ namespace uirenderer { #define RAD_TO_DEG (180.0f / 3.14159265f) #define MIN_ANGLE 0.001f -// TODO: This should be set in properties -#define ALPHA_THRESHOLD (0x7f / PANEL_BIT_DEPTH) +#define ALPHA_THRESHOLD 0 #define FILTER(paint) (paint && paint->isFilterBitmap() ? GL_LINEAR : GL_NEAREST) @@ -449,7 +448,7 @@ int OpenGLRenderer::saveLayer(float left, float top, float right, float bottom, int OpenGLRenderer::saveLayerAlpha(float left, float top, float right, float bottom, int alpha, int flags) { - if (alpha >= 255 - ALPHA_THRESHOLD) { + if (alpha >= 255) { return saveLayer(left, top, right, bottom, NULL, flags); } else { SkPaint paint; diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index eb9ee7b..e9c666b 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -41,8 +41,8 @@ namespace uirenderer { #define PROGRAM_LOGD(...) #endif -#define COLOR_COMPONENT_THRESHOLD (1.0f - (0.5f / PANEL_BIT_DEPTH)) -#define COLOR_COMPONENT_INV_THRESHOLD (0.5f / PANEL_BIT_DEPTH) +#define COLOR_COMPONENT_THRESHOLD 1.0f +#define COLOR_COMPONENT_INV_THRESHOLD 0.0f #define PROGRAM_KEY_TEXTURE 0x1 #define PROGRAM_KEY_A8_TEXTURE 0x2 diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h index 7854729..c0311fb 100644 --- a/libs/hwui/Properties.h +++ b/libs/hwui/Properties.h @@ -78,9 +78,6 @@ enum DebugLevel { #define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "ro.text_gamma.black_threshold" #define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "ro.text_gamma.white_threshold" -// TODO: This should be set by a system property -#define PANEL_BIT_DEPTH 20 - // Converts a number of mega-bytes into bytes #define MB(s) s * 1024 * 1024 |