Loading core/jni/android_view_RenderNode.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -484,13 +484,13 @@ static JNINativeMethod gMethods[] = { { "nSetProjectBackwards", "!(JZ)Z", (void*) android_view_RenderNode_setProjectBackwards }, { "nSetProjectionReceiver","!(JZ)Z", (void*) android_view_RenderNode_setProjectionReceiver }, { "nSetOutlineRoundRect", "(JIIIIFF)Z", (void*) android_view_RenderNode_setOutlineRoundRect }, { "nSetOutlineConvexPath", "(JJF)Z", (void*) android_view_RenderNode_setOutlineConvexPath }, { "nSetOutlineEmpty", "(J)Z", (void*) android_view_RenderNode_setOutlineEmpty }, { "nSetOutlineNone", "(J)Z", (void*) android_view_RenderNode_setOutlineNone }, { "nSetOutlineRoundRect", "!(JIIIIFF)Z", (void*) android_view_RenderNode_setOutlineRoundRect }, { "nSetOutlineConvexPath", "!(JJF)Z", (void*) android_view_RenderNode_setOutlineConvexPath }, { "nSetOutlineEmpty", "!(J)Z", (void*) android_view_RenderNode_setOutlineEmpty }, { "nSetOutlineNone", "!(J)Z", (void*) android_view_RenderNode_setOutlineNone }, { "nHasShadow", "!(J)Z", (void*) android_view_RenderNode_hasShadow }, { "nSetClipToOutline", "!(JZ)Z", (void*) android_view_RenderNode_setClipToOutline }, { "nSetRevealClip", "(JZFFF)Z", (void*) android_view_RenderNode_setRevealClip }, { "nSetRevealClip", "!(JZFFF)Z", (void*) android_view_RenderNode_setRevealClip }, { "nSetAlpha", "!(JF)Z", (void*) android_view_RenderNode_setAlpha }, { "nSetHasOverlappingRendering", "!(JZ)Z", Loading libs/hwui/Outline.h +19 −3 Original line number Diff line number Diff line Loading @@ -33,13 +33,29 @@ public: , mAlpha(0.0f) {} void setRoundRect(int left, int top, int right, int bottom, float radius, float alpha) { mAlpha = alpha; if (mType == kOutlineType_RoundRect && left == mBounds.left && right == mBounds.right && top == mBounds.top && bottom == mBounds.bottom && radius == mRadius) { // nothing to change, don't do any work return; } mType = kOutlineType_RoundRect; mBounds.set(left, top, right, bottom); mRadius = radius; // update mPath to reflect new outline mPath.reset(); if (MathUtils::isPositive(radius)) { mPath.addRoundRect(SkRect::MakeLTRB(left, top, right, bottom), radius, radius); mAlpha = alpha; } else { mPath.addRect(left, top, right, bottom); } } void setConvexPath(const SkPath* outline, float alpha) { Loading Loading
core/jni/android_view_RenderNode.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -484,13 +484,13 @@ static JNINativeMethod gMethods[] = { { "nSetProjectBackwards", "!(JZ)Z", (void*) android_view_RenderNode_setProjectBackwards }, { "nSetProjectionReceiver","!(JZ)Z", (void*) android_view_RenderNode_setProjectionReceiver }, { "nSetOutlineRoundRect", "(JIIIIFF)Z", (void*) android_view_RenderNode_setOutlineRoundRect }, { "nSetOutlineConvexPath", "(JJF)Z", (void*) android_view_RenderNode_setOutlineConvexPath }, { "nSetOutlineEmpty", "(J)Z", (void*) android_view_RenderNode_setOutlineEmpty }, { "nSetOutlineNone", "(J)Z", (void*) android_view_RenderNode_setOutlineNone }, { "nSetOutlineRoundRect", "!(JIIIIFF)Z", (void*) android_view_RenderNode_setOutlineRoundRect }, { "nSetOutlineConvexPath", "!(JJF)Z", (void*) android_view_RenderNode_setOutlineConvexPath }, { "nSetOutlineEmpty", "!(J)Z", (void*) android_view_RenderNode_setOutlineEmpty }, { "nSetOutlineNone", "!(J)Z", (void*) android_view_RenderNode_setOutlineNone }, { "nHasShadow", "!(J)Z", (void*) android_view_RenderNode_hasShadow }, { "nSetClipToOutline", "!(JZ)Z", (void*) android_view_RenderNode_setClipToOutline }, { "nSetRevealClip", "(JZFFF)Z", (void*) android_view_RenderNode_setRevealClip }, { "nSetRevealClip", "!(JZFFF)Z", (void*) android_view_RenderNode_setRevealClip }, { "nSetAlpha", "!(JF)Z", (void*) android_view_RenderNode_setAlpha }, { "nSetHasOverlappingRendering", "!(JZ)Z", Loading
libs/hwui/Outline.h +19 −3 Original line number Diff line number Diff line Loading @@ -33,13 +33,29 @@ public: , mAlpha(0.0f) {} void setRoundRect(int left, int top, int right, int bottom, float radius, float alpha) { mAlpha = alpha; if (mType == kOutlineType_RoundRect && left == mBounds.left && right == mBounds.right && top == mBounds.top && bottom == mBounds.bottom && radius == mRadius) { // nothing to change, don't do any work return; } mType = kOutlineType_RoundRect; mBounds.set(left, top, right, bottom); mRadius = radius; // update mPath to reflect new outline mPath.reset(); if (MathUtils::isPositive(radius)) { mPath.addRoundRect(SkRect::MakeLTRB(left, top, right, bottom), radius, radius); mAlpha = alpha; } else { mPath.addRect(left, top, right, bottom); } } void setConvexPath(const SkPath* outline, float alpha) { Loading