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

Commit d348b6ea authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

LayoutLib: support for Path and BitmapShader using delegates.

Also created delegates for all missing shader, xfermode
and patheffect classes. Moved the logic of the xfermode,
and patheffects that was in Canvas_Delegate into the
xfermode/patheffect classes, and added support (in all
3 clases) for knowing if the shader/xfermode/patheffect
is actually supported or not. Make use of fidelityWarning
in LayoutLog if they are not.
parent 19a02103
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<com.android.test.hwui.PathsActivity.PathsView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
</com.android.test.hwui.PathsActivity.PathsView>
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<com.android.test.hwui.ShadersActivity.ShadersView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
</com.android.test.hwui.ShadersActivity.ShadersView>
+6 −6
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public class PathsActivity extends Activity {
        setContentView(view);
    }

    static class PathsView extends View {
    public static class PathsView extends View {
        private final Bitmap mBitmap1;
        private final Paint mSmallPaint;
        private final Paint mMediumPaint;
@@ -50,7 +50,7 @@ public class PathsActivity extends Activity {
        private final float mOffset;
        private final Paint mLinePaint;

        PathsView(Context c) {
        public PathsView(Context c) {
            super(c);

            mBitmap1 = BitmapFactory.decodeResource(c.getResources(), R.drawable.sunset1);
Loading