diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-03-11 16:34:13 -0700 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2015-03-11 17:04:21 -0700 |
commit | 5521f65ecb0b91a6847bd78afc4e8c927b6b78ef (patch) | |
tree | 9be715b0571fd2af07b094df3d5fb534b2551cd8 /tools/layoutlib/bridge/src/android/graphics | |
parent | 24b4e5729ed917dc2831a111f917d0a5fbd4e4d0 (diff) | |
download | frameworks_base-5521f65ecb0b91a6847bd78afc4e8c927b6b78ef.zip frameworks_base-5521f65ecb0b91a6847bd78afc4e8c927b6b78ef.tar.gz frameworks_base-5521f65ecb0b91a6847bd78afc4e8c927b6b78ef.tar.bz2 |
Fix cyclic dependency in BlendComposite and BlendingMode.
Introduced in commit 1a10ca7e526736b4fd143f7c9f3b29643c0062a4
Bug: http://b.android.com/159708
Change-Id: I6add5be3a933bbe4f8d888906e2aa1b2e35d045a
Diffstat (limited to 'tools/layoutlib/bridge/src/android/graphics')
-rw-r--r-- | tools/layoutlib/bridge/src/android/graphics/BlendComposite.java | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/BlendComposite.java b/tools/layoutlib/bridge/src/android/graphics/BlendComposite.java index b9928fc..e4fcf1b 100644 --- a/tools/layoutlib/bridge/src/android/graphics/BlendComposite.java +++ b/tools/layoutlib/bridge/src/android/graphics/BlendComposite.java @@ -37,17 +37,17 @@ import java.awt.image.WritableRaster; */ public final class BlendComposite implements Composite { public enum BlendingMode { - MULTIPLY(Multiply), - SCREEN(Screen), - DARKEN(Darken), - LIGHTEN(Lighten), - OVERLAY(Overlay), - ADD(Add); + MULTIPLY(), + SCREEN(), + DARKEN(), + LIGHTEN(), + OVERLAY(), + ADD(); - private BlendComposite mComposite; + private final BlendComposite mComposite; - BlendingMode(BlendComposite composite) { - mComposite = composite; + BlendingMode() { + mComposite = new BlendComposite(this); } BlendComposite getBlendComposite() { @@ -55,13 +55,6 @@ public final class BlendComposite implements Composite { } } - public static final BlendComposite Multiply = new BlendComposite(BlendingMode.MULTIPLY); - public static final BlendComposite Screen = new BlendComposite(BlendingMode.SCREEN); - public static final BlendComposite Darken = new BlendComposite(BlendingMode.DARKEN); - public static final BlendComposite Lighten = new BlendComposite(BlendingMode.LIGHTEN); - public static final BlendComposite Overlay = new BlendComposite(BlendingMode.OVERLAY); - public static final BlendComposite Add = new BlendComposite(BlendingMode.ADD); - private float alpha; private BlendingMode mode; |