summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-03-12 01:08:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-12 01:08:57 +0000
commit3d024d4c22b896c95ef4c98610c3db7c58a639ed (patch)
tree99bf258f9dba95e239609bf9b36654def094eeee /tools/layoutlib/bridge/src/android
parentfceec0e124a55b25d59f2af5279c70ac045d6771 (diff)
parent65215edd7acada70c2bcb060daec6ff718ae92ba (diff)
downloadframeworks_base-3d024d4c22b896c95ef4c98610c3db7c58a639ed.zip
frameworks_base-3d024d4c22b896c95ef4c98610c3db7c58a639ed.tar.gz
frameworks_base-3d024d4c22b896c95ef4c98610c3db7c58a639ed.tar.bz2
am 65215edd: am f0d324e5: am 71ba1230: am efc09c64: am 78660423: Merge "Fix cyclic dependency in BlendComposite and BlendingMode." into lmp-dev
* commit '65215edd7acada70c2bcb060daec6ff718ae92ba': 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;