summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java10
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java4
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index c599e9d6d6bc..47216eec03bd 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -209,20 +209,20 @@ public final class Canvas_Delegate extends BaseCanvas_Delegate {
}
@LayoutlibDelegate
- public static void nRestore(long nativeCanvas, boolean throwOnUnderflow) {
+ public static boolean nRestore(long nativeCanvas) {
// FIXME: implement throwOnUnderflow.
// get the delegate from the native int.
Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(nativeCanvas);
if (canvasDelegate == null) {
- return;
+ return false;
}
canvasDelegate.restore();
+ return true;
}
@LayoutlibDelegate
- public static void nRestoreToCount(long nativeCanvas, int saveCount,
- boolean throwOnUnderflow) {
+ public static void nRestoreToCount(long nativeCanvas, int saveCount) {
// FIXME: implement throwOnUnderflow.
// get the delegate from the native int.
Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(nativeCanvas);
@@ -427,7 +427,7 @@ public final class Canvas_Delegate extends BaseCanvas_Delegate {
}
@LayoutlibDelegate
- public static void nGetCTM(long canvas, long matrix) {
+ public static void nGetMatrix(long canvas, long matrix) {
// get the delegate from the native int.
Canvas_Delegate canvasDelegate = Canvas_Delegate.getDelegate(canvas);
if (canvasDelegate == null) {
diff --git a/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
index 430607aa178b..eee74734fde5 100644
--- a/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
@@ -156,7 +156,7 @@ public class VectorDrawable_Delegate {
bounds.offsetTo(0, 0);
nativePathRenderer.draw(canvasWrapperPtr, colorFilterPtr, bounds.width(), bounds.height());
- Canvas_Delegate.nRestore(canvasWrapperPtr, true);
+ Canvas_Delegate.nRestore(canvasWrapperPtr);
return bounds.width() * bounds.height();
}
@@ -1122,7 +1122,7 @@ public class VectorDrawable_Delegate {
drawPath(currentGroup, childPath, canvasPtr, w, h, filterPtr);
}
}
- Canvas_Delegate.nRestore(canvasPtr, true);
+ Canvas_Delegate.nRestore(canvasPtr);
}
public void draw(long canvasPtr, long filterPtr, int w, int h) {