Loading graphics/java/android/graphics/Canvas.java +5 −5 Original line number Diff line number Diff line Loading @@ -788,7 +788,7 @@ public class Canvas { * @return true if the resulting is non-empty */ public boolean clipPath(@NonNull Path path, @NonNull Region.Op op) { return native_clipPath(mNativeCanvasWrapper, path.ni(), op.nativeInt); return native_clipPath(mNativeCanvasWrapper, path.readOnlyNI(), op.nativeInt); } /** Loading Loading @@ -907,7 +907,7 @@ public class Canvas { * does not intersect with the canvas' clip */ public boolean quickReject(@NonNull Path path, @NonNull EdgeType type) { return native_quickReject(mNativeCanvasWrapper, path.ni()); return native_quickReject(mNativeCanvasWrapper, path.readOnlyNI()); } /** Loading Loading @@ -1259,7 +1259,7 @@ public class Canvas { if (path.isSimplePath && path.rects != null) { native_drawRegion(mNativeCanvasWrapper, path.rects.mNativeRegion, paint.getNativeInstance()); } else { native_drawPath(mNativeCanvasWrapper, path.ni(), paint.getNativeInstance()); native_drawPath(mNativeCanvasWrapper, path.readOnlyNI(), paint.getNativeInstance()); } } Loading Loading @@ -1895,7 +1895,7 @@ public class Canvas { throw new ArrayIndexOutOfBoundsException(); } native_drawTextOnPath(mNativeCanvasWrapper, text, index, count, path.ni(), hOffset, vOffset, path.readOnlyNI(), hOffset, vOffset, paint.mBidiFlags, paint.getNativeInstance(), paint.mNativeTypeface); } Loading @@ -1915,7 +1915,7 @@ public class Canvas { public void drawTextOnPath(@NonNull String text, @NonNull Path path, float hOffset, float vOffset, @NonNull Paint paint) { if (text.length() > 0) { native_drawTextOnPath(mNativeCanvasWrapper, text, path.ni(), hOffset, vOffset, native_drawTextOnPath(mNativeCanvasWrapper, text, path.readOnlyNI(), hOffset, vOffset, paint.mBidiFlags, paint.getNativeInstance(), paint.mNativeTypeface); } } Loading graphics/java/android/graphics/Paint.java +3 −3 Original line number Diff line number Diff line Loading @@ -1021,7 +1021,7 @@ public class Paint { * drawn with a hairline (width == 0) */ public boolean getFillPath(Path src, Path dst) { return nGetFillPath(mNativePaint, src.ni(), dst.ni()); return nGetFillPath(mNativePaint, src.readOnlyNI(), dst.mutateNI()); } /** Loading Loading @@ -2394,7 +2394,7 @@ public class Paint { throw new ArrayIndexOutOfBoundsException(); } nGetTextPath(mNativePaint, mNativeTypeface, mBidiFlags, text, index, count, x, y, path.ni()); path.mutateNI()); } /** Loading @@ -2416,7 +2416,7 @@ public class Paint { throw new IndexOutOfBoundsException(); } nGetTextPath(mNativePaint, mNativeTypeface, mBidiFlags, text, start, end, x, y, path.ni()); path.mutateNI()); } /** Loading graphics/java/android/graphics/Path.java +6 −1 Original line number Diff line number Diff line Loading @@ -775,7 +775,12 @@ public class Path { } } final long ni() { final long readOnlyNI() { return mNativePath; } final long mutateNI() { isSimplePath = false; return mNativePath; } Loading graphics/java/android/graphics/PathDashPathEffect.java +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public class PathDashPathEffect extends PathEffect { */ public PathDashPathEffect(Path shape, float advance, float phase, Style style) { native_instance = nativeCreate(shape.ni(), advance, phase, native_instance = nativeCreate(shape.readOnlyNI(), advance, phase, style.native_style); } Loading graphics/java/android/graphics/PathMeasure.java +3 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public class PathMeasure { public PathMeasure(Path path, boolean forceClosed) { // The native implementation does not copy the path, prevent it from being GC'd mPath = path; native_instance = native_create(path != null ? path.ni() : 0, native_instance = native_create(path != null ? path.readOnlyNI() : 0, forceClosed); } Loading @@ -60,7 +60,7 @@ public class PathMeasure { public void setPath(Path path, boolean forceClosed) { mPath = path; native_setPath(native_instance, path != null ? path.ni() : 0, path != null ? path.readOnlyNI() : 0, forceClosed); } Loading Loading @@ -134,8 +134,7 @@ public class PathMeasure { return false; } dst.isSimplePath = false; return native_getSegment(native_instance, startD, stopD, dst.ni(), startWithMoveTo); return native_getSegment(native_instance, startD, stopD, dst.mutateNI(), startWithMoveTo); } /** Loading Loading
graphics/java/android/graphics/Canvas.java +5 −5 Original line number Diff line number Diff line Loading @@ -788,7 +788,7 @@ public class Canvas { * @return true if the resulting is non-empty */ public boolean clipPath(@NonNull Path path, @NonNull Region.Op op) { return native_clipPath(mNativeCanvasWrapper, path.ni(), op.nativeInt); return native_clipPath(mNativeCanvasWrapper, path.readOnlyNI(), op.nativeInt); } /** Loading Loading @@ -907,7 +907,7 @@ public class Canvas { * does not intersect with the canvas' clip */ public boolean quickReject(@NonNull Path path, @NonNull EdgeType type) { return native_quickReject(mNativeCanvasWrapper, path.ni()); return native_quickReject(mNativeCanvasWrapper, path.readOnlyNI()); } /** Loading Loading @@ -1259,7 +1259,7 @@ public class Canvas { if (path.isSimplePath && path.rects != null) { native_drawRegion(mNativeCanvasWrapper, path.rects.mNativeRegion, paint.getNativeInstance()); } else { native_drawPath(mNativeCanvasWrapper, path.ni(), paint.getNativeInstance()); native_drawPath(mNativeCanvasWrapper, path.readOnlyNI(), paint.getNativeInstance()); } } Loading Loading @@ -1895,7 +1895,7 @@ public class Canvas { throw new ArrayIndexOutOfBoundsException(); } native_drawTextOnPath(mNativeCanvasWrapper, text, index, count, path.ni(), hOffset, vOffset, path.readOnlyNI(), hOffset, vOffset, paint.mBidiFlags, paint.getNativeInstance(), paint.mNativeTypeface); } Loading @@ -1915,7 +1915,7 @@ public class Canvas { public void drawTextOnPath(@NonNull String text, @NonNull Path path, float hOffset, float vOffset, @NonNull Paint paint) { if (text.length() > 0) { native_drawTextOnPath(mNativeCanvasWrapper, text, path.ni(), hOffset, vOffset, native_drawTextOnPath(mNativeCanvasWrapper, text, path.readOnlyNI(), hOffset, vOffset, paint.mBidiFlags, paint.getNativeInstance(), paint.mNativeTypeface); } } Loading
graphics/java/android/graphics/Paint.java +3 −3 Original line number Diff line number Diff line Loading @@ -1021,7 +1021,7 @@ public class Paint { * drawn with a hairline (width == 0) */ public boolean getFillPath(Path src, Path dst) { return nGetFillPath(mNativePaint, src.ni(), dst.ni()); return nGetFillPath(mNativePaint, src.readOnlyNI(), dst.mutateNI()); } /** Loading Loading @@ -2394,7 +2394,7 @@ public class Paint { throw new ArrayIndexOutOfBoundsException(); } nGetTextPath(mNativePaint, mNativeTypeface, mBidiFlags, text, index, count, x, y, path.ni()); path.mutateNI()); } /** Loading @@ -2416,7 +2416,7 @@ public class Paint { throw new IndexOutOfBoundsException(); } nGetTextPath(mNativePaint, mNativeTypeface, mBidiFlags, text, start, end, x, y, path.ni()); path.mutateNI()); } /** Loading
graphics/java/android/graphics/Path.java +6 −1 Original line number Diff line number Diff line Loading @@ -775,7 +775,12 @@ public class Path { } } final long ni() { final long readOnlyNI() { return mNativePath; } final long mutateNI() { isSimplePath = false; return mNativePath; } Loading
graphics/java/android/graphics/PathDashPathEffect.java +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public class PathDashPathEffect extends PathEffect { */ public PathDashPathEffect(Path shape, float advance, float phase, Style style) { native_instance = nativeCreate(shape.ni(), advance, phase, native_instance = nativeCreate(shape.readOnlyNI(), advance, phase, style.native_style); } Loading
graphics/java/android/graphics/PathMeasure.java +3 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public class PathMeasure { public PathMeasure(Path path, boolean forceClosed) { // The native implementation does not copy the path, prevent it from being GC'd mPath = path; native_instance = native_create(path != null ? path.ni() : 0, native_instance = native_create(path != null ? path.readOnlyNI() : 0, forceClosed); } Loading @@ -60,7 +60,7 @@ public class PathMeasure { public void setPath(Path path, boolean forceClosed) { mPath = path; native_setPath(native_instance, path != null ? path.ni() : 0, path != null ? path.readOnlyNI() : 0, forceClosed); } Loading Loading @@ -134,8 +134,7 @@ public class PathMeasure { return false; } dst.isSimplePath = false; return native_getSegment(native_instance, startD, stopD, dst.ni(), startWithMoveTo); return native_getSegment(native_instance, startD, stopD, dst.mutateNI(), startWithMoveTo); } /** Loading