summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/LayerBase.cpp
diff options
context:
space:
mode:
author Glenn Kasten <gkasten@google.com> 2011-12-15 09:51:17 -0800
committer Glenn Kasten <gkasten@google.com> 2012-01-05 07:33:45 -0800
commite80a4ccd2bac7bf121441e257044f5813e85180f (patch)
tree795c33992f702be01aac2ffbfb652408168d9b26 /services/surfaceflinger/LayerBase.cpp
parent7c48707a9d320230452d5937239f28ab0ea2e695 (diff)
Use the standard CC_LIKELY and CC_UNLIKELY macros
Several source files privately defined macros LIKELY and UNLIKELY in terms of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and CC_UNLIKELY which are intended for this purpose. So rename the private uses to use the standard names. In addition, AudioFlinger was relying on the macro expanding to extra ( ). Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
Diffstat (limited to 'services/surfaceflinger/LayerBase.cpp')
-rw-r--r--services/surfaceflinger/LayerBase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index f04add148c76..37879f1a47d0 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -240,7 +240,7 @@ void LayerBase::validateVisibility(const Transform& planeTransform)
for (size_t i=0 ; i<4 ; i++)
mVertices[i][1] = hw_h - mVertices[i][1];
- if (UNLIKELY(transformed)) {
+ if (CC_UNLIKELY(transformed)) {
// NOTE: here we could also punt if we have too many rectangles
// in the transparent region
if (tr.preserveRects()) {
@@ -416,7 +416,7 @@ void LayerBase::drawWithOpenGL(const Region& clip) const
const State& s(drawingState());
GLenum src = mPremultipliedAlpha ? GL_ONE : GL_SRC_ALPHA;
- if (UNLIKELY(s.alpha < 0xFF)) {
+ if (CC_UNLIKELY(s.alpha < 0xFF)) {
const GLfloat alpha = s.alpha * (1.0f/255.0f);
if (mPremultipliedAlpha) {
glColor4f(alpha, alpha, alpha, alpha);