@@ -17,26 +17,26 @@ public final class RenderThread {
1717 private RenderThread () {
1818 }
1919
20- private static RenderThreadDelegate DELEGATE ;
20+ private static RenderThreadDelegate delegate ;
2121
2222 static {
2323 init (false );
2424 }
2525
2626 public static void init (boolean skipAndroidVersionCheck ) {
27- RenderThreadDelegate delegate = DELEGATE ;
27+ RenderThreadDelegate delegate = RenderThread . delegate ;
2828 if (delegate == null || !delegate .isSupported ()) {
2929 RenderThreadMethods methods = RenderThreadMethods .create (skipAndroidVersionCheck );
3030 if (methods != null ) {
31- DELEGATE = new RenderThreadDelegateHw (methods );
31+ RenderThread . delegate = new RenderThreadDelegateHw (methods );
3232 } else {
33- DELEGATE = new RenderThreadDelegate ();
33+ RenderThread . delegate = new RenderThreadDelegate ();
3434 }
3535 }
3636 }
3737
3838 public static boolean isSupported () {
39- return DELEGATE .isSupported ();
39+ return delegate .isSupported ();
4040 }
4141
4242 @ NonNull
@@ -45,8 +45,8 @@ public static CanvasProperty<Float> createCanvasProperty(@NonNull Canvas canvas,
4545 }
4646
4747 @ NonNull
48- public static CanvasProperty <Float > createCanvasProperty (@ NonNull Canvas canvas , float initialValue , boolean useRenderThread ) {
49- return DELEGATE .createCanvasProperty (canvas , initialValue , useRenderThread );
48+ private static CanvasProperty <Float > createCanvasProperty (@ NonNull Canvas canvas , float initialValue , boolean useRenderThread ) {
49+ return delegate .createCanvasProperty (canvas , initialValue , useRenderThread );
5050 }
5151
5252 @ NonNull
@@ -55,16 +55,16 @@ public static CanvasProperty<Paint> createCanvasProperty(@NonNull Canvas canvas,
5555 }
5656
5757 @ NonNull
58- public static CanvasProperty <Paint > createCanvasProperty (@ NonNull Canvas canvas , @ NonNull Paint initialValue , boolean useRenderThread ) {
59- return DELEGATE .createCanvasProperty (canvas , initialValue , useRenderThread );
58+ private static CanvasProperty <Paint > createCanvasProperty (@ NonNull Canvas canvas , @ NonNull Paint initialValue , boolean useRenderThread ) {
59+ return delegate .createCanvasProperty (canvas , initialValue , useRenderThread );
6060 }
6161
6262 public static boolean isDisplayListCanvas (@ NonNull Canvas canvas ) {
63- return DELEGATE .isDisplayListCanvas (canvas );
63+ return delegate .isDisplayListCanvas (canvas );
6464 }
6565
6666 public static void setAnimatorTarget (@ RenderNodeAnimator @ NonNull Animator animator , @ DisplayListCanvas @ NonNull Canvas target ) {
67- DELEGATE .setTarget (animator , target );
67+ delegate .setTarget (animator , target );
6868 }
6969
7070 public static void drawCircle (
@@ -74,7 +74,7 @@ public static void drawCircle(
7474 @ NonNull CanvasProperty <Float > radius ,
7575 @ NonNull CanvasProperty <Paint > paint ) {
7676
77- DELEGATE .drawCircle (canvas , cx , cy , radius , paint );
77+ delegate .drawCircle (canvas , cx , cy , radius , paint );
7878 }
7979
8080 public static void drawRoundRect (
@@ -87,7 +87,7 @@ public static void drawRoundRect(
8787 @ NonNull CanvasProperty <Float > ry ,
8888 @ NonNull CanvasProperty <Paint > paint ) {
8989
90- DELEGATE .drawRoundRect (canvas , left , top , right , bottom , rx , ry , paint );
90+ delegate .drawRoundRect (canvas , left , top , right , bottom , rx , ry , paint );
9191 }
9292
9393 @ NonNull
@@ -97,7 +97,7 @@ public static Animator createFloatAnimator(
9797 @ NonNull CanvasProperty <Float > property ,
9898 float targetValue ) {
9999
100- return DELEGATE .createFloatAnimator (drawable , canvas , property , targetValue );
100+ return delegate .createFloatAnimator (drawable , canvas , property , targetValue );
101101 }
102102
103103 @ NonNull
@@ -107,7 +107,7 @@ public static Animator createPaintAlphaAnimator(
107107 @ NonNull CanvasProperty <Paint > property ,
108108 @ FloatRange (from = 0f , to = 255f ) float targetValue ) {
109109
110- return DELEGATE .createPaintAlphaAnimator (drawable , canvas , property , targetValue );
110+ return delegate .createPaintAlphaAnimator (drawable , canvas , property , targetValue );
111111 }
112112
113113 @ NonNull
@@ -117,6 +117,6 @@ public static Animator createPaintStrokeWidthAnimator(
117117 @ NonNull CanvasProperty <Paint > property ,
118118 float targetValue ) {
119119
120- return DELEGATE .createPaintStrokeWidthAnimator (drawable , canvas , property , targetValue );
120+ return delegate .createPaintStrokeWidthAnimator (drawable , canvas , property , targetValue );
121121 }
122122}
0 commit comments