Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abf19d1a authored by Jerome Gaillard's avatar Jerome Gaillard Committed by Android (Google) Code Review
Browse files

Merge changes Ic8254f0f,I1f285c3b

* changes:
  Ignore justified in layoutlib for the moment
  Update Canvas_Delegate after Change I3edc963a
parents 8308526d 584f563e
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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) {
+0 −2
Original line number Diff line number Diff line
@@ -1062,8 +1062,6 @@ public class Paint_Delegate {

    @LayoutlibDelegate
    /*package*/ static void nSetWordSpacing(long nativePaint, float wordSpacing) {
        Bridge.getLog().fidelityWarning(LayoutLog.TAG_TEXT_RENDERING,
                "Paint.setWordSpacing() not supported.", null, null);
        Paint_Delegate delegate = sManager.getDelegate(nativePaint);
        if (delegate == null) {
            return;
+2 −2
Original line number Diff line number Diff line
@@ -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) {
+2 −1
Original line number Diff line number Diff line
@@ -75,7 +75,8 @@ public class StaticLayout_Delegate {
    /*package*/ static void nSetupParagraph(long nativeBuilder, char[] text, int length,
            float firstWidth, int firstWidthLineCount, float restWidth,
            int[] variableTabStops, int defaultTabStop, int breakStrategy,
            int hyphenationFrequency) {
            int hyphenationFrequency, boolean isJustified) {
        // TODO: implement justified alignment
        Builder builder = sBuilderManager.getDelegate(nativeBuilder);
        if (builder == null) {
            return;