resolve merge conflicts of 404e2b2 to nyc-dev-plus-aosp
Change-Id: I3c486e83a3f2b27ee0e6bfe4e3bba3df3af758a5
This commit is contained in:
@@ -35,12 +35,12 @@
|
||||
|
||||
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 CLIP_AND_SWAP(elem, sign, k, p, q, r) { \
|
||||
poly_clip_to_halfspace(p, q, &v->elem-(float *)v, sign, sign*k); \
|
||||
if (q->n==0) {p1->n = 0; return POLY_CLIP_OUT;} \
|
||||
poly_clip_to_halfspace(p, q, &v->elem-(float *)v, sign, (sign)*(k)); \
|
||||
if ((q)->n==0) {p1->n = 0; return POLY_CLIP_OUT;} \
|
||||
SWAP(p, q, r); \
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace android {
|
||||
// Debug
|
||||
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
|
||||
|
||||
@@ -621,8 +621,8 @@ public:
|
||||
}
|
||||
|
||||
#define SET_TEXTURE(ptr, posRect, offsetRect, texCoordsRect, xDim, yDim) \
|
||||
TextureVertex::set(ptr++, posRect.xDim - offsetRect.left, posRect.yDim - offsetRect.top, \
|
||||
texCoordsRect.xDim, texCoordsRect.yDim)
|
||||
TextureVertex::set((ptr)++, (posRect).xDim - (offsetRect).left, (posRect).yDim - (offsetRect).top, \
|
||||
(texCoordsRect).xDim, (texCoordsRect).yDim)
|
||||
|
||||
/**
|
||||
* This multi-draw operation builds a mesh on the stack by generating a quad
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
#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 {
|
||||
if (isSimple()) {
|
||||
|
||||
@@ -838,7 +838,7 @@ void OpenGLRenderer::composeLayerRect(Layer* layer, const Rect& rect) {
|
||||
*/
|
||||
#define DRAW_DOUBLE_STENCIL_IF(COND, 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); \
|
||||
DRAW_COMMAND; \
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); \
|
||||
|
||||
@@ -224,9 +224,9 @@ enum DebugLevel {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Converts a number of mega-bytes into bytes
|
||||
#define MB(s) s * 1024 * 1024
|
||||
#define MB(s) ((s) * 1024 * 1024)
|
||||
// Converts a number of kilo-bytes into bytes
|
||||
#define KB(s) s * 1024
|
||||
#define KB(s) ((s) * 1024)
|
||||
|
||||
enum class ProfileType {
|
||||
None,
|
||||
|
||||
@@ -47,7 +47,7 @@ class RenderNode;
|
||||
class RenderProperties;
|
||||
|
||||
// The __VA_ARGS__ will be executed if a & b are not equal
|
||||
#define RP_SET(a, b, ...) (a != b ? (a = b, ##__VA_ARGS__, true) : false)
|
||||
#define RP_SET(a, b, ...) ((a) != (b) ? ((a) = (b), ##__VA_ARGS__, true) : false)
|
||||
#define RP_SET_AND_DIRTY(a, b) RP_SET(a, b, mPrimitiveFields.mMatrixOrPivotDirty = true)
|
||||
|
||||
// Keep in sync with View.java:LAYER_TYPE_*
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
#define ALIGN_SZ (sizeof(int))
|
||||
#endif
|
||||
|
||||
#define ALIGN(x) ((x + ALIGN_SZ - 1 ) & ~(ALIGN_SZ - 1))
|
||||
#define ALIGN_PTR(p) ((void*)(ALIGN((size_t)p)))
|
||||
#define ALIGN(x) (((x) + ALIGN_SZ - 1 ) & ~(ALIGN_SZ - 1))
|
||||
#define ALIGN_PTR(p) ((void*)(ALIGN((size_t)(p))))
|
||||
|
||||
#if LOG_NDEBUG
|
||||
#define ADD_ALLOCATION()
|
||||
|
||||
Reference in New Issue
Block a user