summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-03-26 17:40:31 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-03-26 17:40:32 +0000
commit62828dfca2b009d42a414b60117d7f34034841f8 (patch)
tree5a0ad6c78c7a1ebca79d8e85fa0c5cdea76efcfa /core/jni
parent564a0cd87c47ec53790c93197842969a6aab262c (diff)
parent8c271ca63b62061fd22cfee78fd6a574b44476fd (diff)
downloadframeworks_base-62828dfca2b009d42a414b60117d7f34034841f8.zip
frameworks_base-62828dfca2b009d42a414b60117d7f34034841f8.tar.gz
frameworks_base-62828dfca2b009d42a414b60117d7f34034841f8.tar.bz2
Merge "Add private circular reveal API on View/RenderNode"
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_RenderNode.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/jni/android_view_RenderNode.cpp b/core/jni/android_view_RenderNode.cpp
index 5c7e773..3e359d4 100644
--- a/core/jni/android_view_RenderNode.cpp
+++ b/core/jni/android_view_RenderNode.cpp
@@ -115,23 +115,38 @@ static void android_view_RenderNode_setOutlineRoundRect(JNIEnv* env,
jint right, jint bottom, jfloat radius) {
RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr);
displayList->mutateStagingProperties().mutableOutline().setRoundRect(left, top, right, bottom, radius);
+ displayList->mutateStagingProperties().updateClipPath();
}
+
static void android_view_RenderNode_setOutlineConvexPath(JNIEnv* env,
jobject clazz, jlong displayListPtr, jlong outlinePathPtr) {
RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr);
SkPath* outlinePath = reinterpret_cast<SkPath*>(outlinePathPtr);
displayList->mutateStagingProperties().mutableOutline().setConvexPath(outlinePath);
+ displayList->mutateStagingProperties().updateClipPath();
}
+
static void android_view_RenderNode_setOutlineEmpty(JNIEnv* env,
jobject clazz, jlong displayListPtr) {
RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr);
displayList->mutateStagingProperties().mutableOutline().setEmpty();
+ displayList->mutateStagingProperties().updateClipPath();
}
static void android_view_RenderNode_setClipToOutline(JNIEnv* env,
jobject clazz, jlong displayListPtr, jboolean clipToOutline) {
RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr);
displayList->mutateStagingProperties().mutableOutline().setShouldClip(clipToOutline);
+ displayList->mutateStagingProperties().updateClipPath();
+}
+
+static void android_view_RenderNode_setRevealClip(JNIEnv* env,
+ jobject clazz, jlong displayListPtr, jboolean shouldClip, jboolean inverseClip,
+ jfloat x, jfloat y, jfloat radius) {
+ RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr);
+ displayList->mutateStagingProperties().mutableRevealClip().set(
+ shouldClip, inverseClip, x, y, radius);
+ displayList->mutateStagingProperties().updateClipPath();
}
static void android_view_RenderNode_setAlpha(JNIEnv* env,
@@ -396,6 +411,7 @@ static JNINativeMethod gMethods[] = {
{ "nSetOutlineConvexPath", "(JJ)V", (void*) android_view_RenderNode_setOutlineConvexPath },
{ "nSetOutlineEmpty", "(J)V", (void*) android_view_RenderNode_setOutlineEmpty },
{ "nSetClipToOutline", "(JZ)V", (void*) android_view_RenderNode_setClipToOutline },
+ { "nSetRevealClip", "(JZZFFF)V", (void*) android_view_RenderNode_setRevealClip },
{ "nSetAlpha", "(JF)V", (void*) android_view_RenderNode_setAlpha },
{ "nSetHasOverlappingRendering", "(JZ)V",