summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-03-12 00:45:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-12 00:45:40 +0000
commit71ba12308e338595d8068ff788bb5c8abfcfe515 (patch)
tree70429d55250a550220dc80469189cb5c47e72ae9 /tools/layoutlib/bridge/src/android
parentb3cfb334893a0b302cd6a0a998f27ca2e8ba7f9d (diff)
parentefc09c644fa4e8354d54485aab6c0b18868284eb (diff)
downloadframeworks_base-71ba12308e338595d8068ff788bb5c8abfcfe515.zip
frameworks_base-71ba12308e338595d8068ff788bb5c8abfcfe515.tar.gz
frameworks_base-71ba12308e338595d8068ff788bb5c8abfcfe515.tar.bz2
am efc09c64: am 78660423: Merge "Fix cyclic dependency in BlendComposite and BlendingMode." into lmp-dev
* commit 'efc09c644fa4e8354d54485aab6c0b18868284eb': 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.java25
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;