1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.view;
18 
19 import android.compat.annotation.UnsupportedAppUsage;
20 import android.graphics.BaseRecordingCanvas;
21 import android.graphics.CanvasProperty;
22 import android.graphics.Paint;
23 
24 /**
25  * This class exists temporarily to workaround broken apps
26  *
27  * b/119066174
28  *
29  * @hide
30  */
31 public abstract class DisplayListCanvas extends BaseRecordingCanvas {
32 
33     /** @hide */
DisplayListCanvas(long nativeCanvas)34     protected DisplayListCanvas(long nativeCanvas) {
35         super(nativeCanvas);
36     }
37 
38     /**
39      * TODO: Public API alternative
40      * @hide
41      */
42     @UnsupportedAppUsage
drawRoundRect(CanvasProperty<Float> left, CanvasProperty<Float> top, CanvasProperty<Float> right, CanvasProperty<Float> bottom, CanvasProperty<Float> rx, CanvasProperty<Float> ry, CanvasProperty<Paint> paint)43     public abstract void drawRoundRect(CanvasProperty<Float> left, CanvasProperty<Float> top,
44             CanvasProperty<Float> right, CanvasProperty<Float> bottom, CanvasProperty<Float> rx,
45             CanvasProperty<Float> ry, CanvasProperty<Paint> paint);
46 
47     /**
48      * TODO: Public API alternative
49      * @hide
50      */
51     @UnsupportedAppUsage
drawCircle(CanvasProperty<Float> cx, CanvasProperty<Float> cy, CanvasProperty<Float> radius, CanvasProperty<Paint> paint)52     public abstract void drawCircle(CanvasProperty<Float> cx, CanvasProperty<Float> cy,
53             CanvasProperty<Float> radius, CanvasProperty<Paint> paint);
54 }
55