diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-03-12 00:38:45 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-12 00:38:45 +0000 |
commit | efc09c644fa4e8354d54485aab6c0b18868284eb (patch) | |
tree | ecc47d37e493e4b3684ac39017134c2143289416 /tools/layoutlib/bridge/src/android | |
parent | c706a980e426ea0e0b6aaee5530516b1a16c3755 (diff) | |
parent | 78660423900fa255cc83b85320e98d5184be393b (diff) | |
download | frameworks_base-efc09c644fa4e8354d54485aab6c0b18868284eb.zip frameworks_base-efc09c644fa4e8354d54485aab6c0b18868284eb.tar.gz frameworks_base-efc09c644fa4e8354d54485aab6c0b18868284eb.tar.bz2 |
am 78660423: Merge "Fix cyclic dependency in BlendComposite and BlendingMode." into lmp-dev
* commit '78660423900fa255cc83b85320e98d5184be393b':
Fix cyclic dependency in BlendComposite and BlendingMode.
Diffstat (limited to 'tools/layoutlib/bridge/src/android')
-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; |