Loading libs/hwui/Debug.h +3 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,9 @@ // Turn on to enable debugging shadow #define DEBUG_SHADOW 0 // Turn on to enable debugging vector drawable #define DEBUG_VECTOR_DRAWABLE 0 #if DEBUG_INIT #define INIT_LOGD(...) ALOGD(__VA_ARGS__) #else Loading libs/hwui/VectorDrawable.h +7 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,13 @@ namespace android { namespace uirenderer { // Debug #if DEBUG_VECTOR_DRAWABLE #define VECTOR_DRAWABLE_LOGD(...) ALOGD(__VA_ARGS__) #else #define VECTOR_DRAWABLE_LOGD(...) #endif namespace VectorDrawable { #define VD_SET_PRIMITIVE_FIELD_WITH_FLAG(field, value, flag) (VD_SET_PRIMITIVE_FIELD_AND_NOTIFY(field, (value)) ? ((flag) = true, true) : false) #define VD_SET_PROP(field, value) ((value) != (field) ? ((field) = (value), true) : false) Loading libs/hwui/utils/VectorDrawableUtils.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -198,12 +198,12 @@ static void drawArc(SkPath* p, /* Solve for intersecting unit circles */ double dsq = dx * dx + dy * dy; if (dsq == 0.0) { ALOGW("Points are coincident"); VECTOR_DRAWABLE_LOGD("Points are coincident"); return; /* Points are coincident */ } double disc = 1.0 / dsq - 1.0 / 4.0; if (disc < 0.0) { ALOGW("Points are too far apart %f", dsq); VECTOR_DRAWABLE_LOGD("Points are too far apart %f", dsq); float adjust = (float) (sqrt(dsq) / 1.99999); drawArc(p, x0, y0, x1, y1, a * adjust, b * adjust, theta, isMoreThanHalf, isPositiveArc); Loading Loading
libs/hwui/Debug.h +3 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,9 @@ // Turn on to enable debugging shadow #define DEBUG_SHADOW 0 // Turn on to enable debugging vector drawable #define DEBUG_VECTOR_DRAWABLE 0 #if DEBUG_INIT #define INIT_LOGD(...) ALOGD(__VA_ARGS__) #else Loading
libs/hwui/VectorDrawable.h +7 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,13 @@ namespace android { namespace uirenderer { // Debug #if DEBUG_VECTOR_DRAWABLE #define VECTOR_DRAWABLE_LOGD(...) ALOGD(__VA_ARGS__) #else #define VECTOR_DRAWABLE_LOGD(...) #endif namespace VectorDrawable { #define VD_SET_PRIMITIVE_FIELD_WITH_FLAG(field, value, flag) (VD_SET_PRIMITIVE_FIELD_AND_NOTIFY(field, (value)) ? ((flag) = true, true) : false) #define VD_SET_PROP(field, value) ((value) != (field) ? ((field) = (value), true) : false) Loading
libs/hwui/utils/VectorDrawableUtils.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -198,12 +198,12 @@ static void drawArc(SkPath* p, /* Solve for intersecting unit circles */ double dsq = dx * dx + dy * dy; if (dsq == 0.0) { ALOGW("Points are coincident"); VECTOR_DRAWABLE_LOGD("Points are coincident"); return; /* Points are coincident */ } double disc = 1.0 / dsq - 1.0 / 4.0; if (disc < 0.0) { ALOGW("Points are too far apart %f", dsq); VECTOR_DRAWABLE_LOGD("Points are too far apart %f", dsq); float adjust = (float) (sqrt(dsq) / 1.99999); drawArc(p, x0, y0, x1, y1, a * adjust, b * adjust, theta, isMoreThanHalf, isPositiveArc); Loading