diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-06-23 19:26:32 -0700 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2014-06-23 19:26:32 -0700 |
commit | ead9ce3ff6c7dd9c0607b3eb6496317f8e58e871 (patch) | |
tree | d9344d27686b50cb96e5d8a0115fa0dd74467530 | |
parent | 16af3691f5c99089457a6dd16a90e828c3482f0f (diff) | |
download | frameworks_base-ead9ce3ff6c7dd9c0607b3eb6496317f8e58e871.zip frameworks_base-ead9ce3ff6c7dd9c0607b3eb6496317f8e58e871.tar.gz frameworks_base-ead9ce3ff6c7dd9c0607b3eb6496317f8e58e871.tar.bz2 |
Temporarily change PorterDuff mode MULTIPLY to SRC_IN
Overflow pop up dialog for action bar uses PorterDuff color filters in
mode SRC_IN. The mode is not supported by AlphaComposite currently. So,
in order to render something, we swap it out with SRC_IN.
Change-Id: I987e101728ecb76b5e3d5cd91f831e6f63a4321f
-rw-r--r-- | tools/layoutlib/bridge/src/android/graphics/PorterDuffColorFilter_Delegate.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/PorterDuffColorFilter_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/PorterDuffColorFilter_Delegate.java index 0543f4f..c44e03b 100644 --- a/tools/layoutlib/bridge/src/android/graphics/PorterDuffColorFilter_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/PorterDuffColorFilter_Delegate.java @@ -98,6 +98,11 @@ public class PorterDuffColorFilter_Delegate extends ColorFilter_Delegate { private PorterDuffColorFilter_Delegate(int srcColor, int mode) { mSrcColor = srcColor; + // Temporarily change multiply to SRC_IN to render menus. + // TODO: support Mode.MULTIPLY + if (mode == Mode.MULTIPLY.nativeInt) { + mode = Mode.SRC_IN.nativeInt; + } mMode = getPorterDuffMode(mode); } |