Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dd22051 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

resolve merge conflicts of 404e2b21 to nyc-dev-plus-aosp

am: 0a870594

* commit '0a870594':
  Fix misc-macro-parentheses warnings in hwui and graphic jni.

Change-Id: I84afca734f9bf0cf4b9d503b17878d13f5a2b29c
parents bb08e425 0a870594
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -35,12 +35,12 @@


namespace android {
namespace android {


#define SWAP(a, b, temp)	{temp = a; a = b; b = temp;}
#define SWAP(a, b, temp)	{(temp) = a; (a) = b; (b) = temp;}
#define COORD(vert, i) ((float *)(vert))[i]
#define COORD(vert, i) ((float *)(vert))[i]


#define CLIP_AND_SWAP(elem, sign, k, p, q, r) { \
#define CLIP_AND_SWAP(elem, sign, k, p, q, r) { \
    poly_clip_to_halfspace(p, q, &v->elem-(float *)v, sign, sign*k); \
    poly_clip_to_halfspace(p, q, &v->elem-(float *)v, sign, (sign)*(k)); \
    if (q->n==0) {p1->n = 0; return POLY_CLIP_OUT;} \
    if ((q)->n==0) {p1->n = 0; return POLY_CLIP_OUT;} \
    SWAP(p, q, r); \
    SWAP(p, q, r); \
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -49,7 +49,7 @@ namespace android {
// Debug
// Debug
static const bool kDebugGraphicBuffer = false;
static const bool kDebugGraphicBuffer = false;


#define LOCK_CANVAS_USAGE GraphicBuffer::USAGE_SW_READ_OFTEN | GraphicBuffer::USAGE_SW_WRITE_OFTEN
#define LOCK_CANVAS_USAGE (GraphicBuffer::USAGE_SW_READ_OFTEN | GraphicBuffer::USAGE_SW_WRITE_OFTEN)


// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// JNI Helpers
// JNI Helpers
+2 −2
Original line number Original line Diff line number Diff line
@@ -621,8 +621,8 @@ public:
    }
    }


#define SET_TEXTURE(ptr, posRect, offsetRect, texCoordsRect, xDim, yDim) \
#define SET_TEXTURE(ptr, posRect, offsetRect, texCoordsRect, xDim, yDim) \
    TextureVertex::set(ptr++, posRect.xDim - offsetRect.left, posRect.yDim - offsetRect.top, \
    TextureVertex::set((ptr)++, (posRect).xDim - (offsetRect).left, (posRect).yDim - (offsetRect).top, \
            texCoordsRect.xDim, texCoordsRect.yDim)
            (texCoordsRect).xDim, (texCoordsRect).yDim)


    /**
    /**
     * This multi-draw operation builds a mesh on the stack by generating a quad
     * This multi-draw operation builds a mesh on the stack by generating a quad
+1 −1
Original line number Original line Diff line number Diff line
@@ -419,7 +419,7 @@ void Matrix4::mapPoint3d(Vector3& vec) const {
    vec.z = orig.x * data[2] + orig.y * data[6] + orig.z * data[kScaleZ] + data[kTranslateZ];
    vec.z = orig.x * data[2] + orig.y * data[6] + orig.z * data[kScaleZ] + data[kTranslateZ];
}
}


#define MUL_ADD_STORE(a, b, c) a = (a) * (b) + (c)
#define MUL_ADD_STORE(a, b, c) ((a) = (a) * (b) + (c))


void Matrix4::mapPoint(float& x, float& y) const {
void Matrix4::mapPoint(float& x, float& y) const {
    if (isSimple()) {
    if (isSimple()) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -838,7 +838,7 @@ void OpenGLRenderer::composeLayerRect(Layer* layer, const Rect& rect) {
 */
 */
#define DRAW_DOUBLE_STENCIL_IF(COND, DRAW_COMMAND) { \
#define DRAW_DOUBLE_STENCIL_IF(COND, DRAW_COMMAND) { \
        DRAW_COMMAND; \
        DRAW_COMMAND; \
        if (CC_UNLIKELY(Properties::debugOverdraw && getTargetFbo() == 0 && COND)) { \
        if (CC_UNLIKELY(Properties::debugOverdraw && getTargetFbo() == 0 && (COND))) { \
            glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); \
            glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); \
            DRAW_COMMAND; \
            DRAW_COMMAND; \
            glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); \
            glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); \
Loading