Loading tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +1 −2 Original line number Diff line number Diff line Loading @@ -627,8 +627,7 @@ public final class Canvas_Delegate { // set the color graphics.setColor(new Color(color, true /*alpha*/)); Composite composite = PorterDuffXfermode_Delegate.getComposite( PorterDuffXfermode_Delegate.getPorterDuffMode(mode), 0xFF); Composite composite = PorterDuffXfermode_Delegate.getComposite(mode, 0xFF); if (composite != null) { graphics.setComposite(composite); } Loading tools/layoutlib/bridge/src/android/graphics/ColorFilter_Delegate.java +11 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.graphics; import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import java.awt.Graphics2D; /** * Delegate implementing the native methods of android.graphics.ColorFilter * Loading Loading @@ -50,9 +52,17 @@ public abstract class ColorFilter_Delegate { return sManager.getDelegate(nativeShader); } public abstract boolean isSupported(); public abstract String getSupportMessage(); public boolean isSupported() { return false; } public void applyFilter(Graphics2D g, int width, int height) { // This should never be called directly. If supported, the sub class should override this. assert false; } // ---- native methods ---- @LayoutlibDelegate Loading tools/layoutlib/bridge/src/android/graphics/ColorMatrixColorFilter_Delegate.java +0 −5 Original line number Diff line number Diff line Loading @@ -42,11 +42,6 @@ public class ColorMatrixColorFilter_Delegate extends ColorFilter_Delegate { // ---- Public Helper methods ---- @Override public boolean isSupported() { return false; } @Override public String getSupportMessage() { return "ColorMatrix Color Filters are not supported."; Loading tools/layoutlib/bridge/src/android/graphics/LightingColorFilter_Delegate.java +0 −5 Original line number Diff line number Diff line Loading @@ -42,11 +42,6 @@ public class LightingColorFilter_Delegate extends ColorFilter_Delegate { // ---- Public Helper methods ---- @Override public boolean isSupported() { return false; } @Override public String getSupportMessage() { return "Lighting Color Filters are not supported."; Loading tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +4 −4 Original line number Diff line number Diff line Loading @@ -827,8 +827,8 @@ public class Paint_Delegate { delegate.mColorFilter = ColorFilter_Delegate.getDelegate(filter); // since none of those are supported, display a fidelity warning right away if (delegate.mColorFilter != null && delegate.mColorFilter.isSupported() == false) { // Log warning if it's not supported. if (delegate.mColorFilter != null && !delegate.mColorFilter.isSupported()) { Bridge.getLog().fidelityWarning(LayoutLog.TAG_COLORFILTER, delegate.mColorFilter.getSupportMessage(), null, null /*data*/); } Loading Loading @@ -873,7 +873,7 @@ public class Paint_Delegate { delegate.mMaskFilter = MaskFilter_Delegate.getDelegate(maskfilter); // since none of those are supported, display a fidelity warning right away if (delegate.mMaskFilter != null && delegate.mMaskFilter.isSupported() == false) { if (delegate.mMaskFilter != null && !delegate.mMaskFilter.isSupported()) { Bridge.getLog().fidelityWarning(LayoutLog.TAG_MASKFILTER, delegate.mMaskFilter.getSupportMessage(), null, null /*data*/); } Loading Loading @@ -906,7 +906,7 @@ public class Paint_Delegate { delegate.mRasterizer = Rasterizer_Delegate.getDelegate(rasterizer); // since none of those are supported, display a fidelity warning right away if (delegate.mRasterizer != null && delegate.mRasterizer.isSupported() == false) { if (delegate.mRasterizer != null && !delegate.mRasterizer.isSupported()) { Bridge.getLog().fidelityWarning(LayoutLog.TAG_RASTERIZER, delegate.mRasterizer.getSupportMessage(), null, null /*data*/); } Loading Loading
tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +1 −2 Original line number Diff line number Diff line Loading @@ -627,8 +627,7 @@ public final class Canvas_Delegate { // set the color graphics.setColor(new Color(color, true /*alpha*/)); Composite composite = PorterDuffXfermode_Delegate.getComposite( PorterDuffXfermode_Delegate.getPorterDuffMode(mode), 0xFF); Composite composite = PorterDuffXfermode_Delegate.getComposite(mode, 0xFF); if (composite != null) { graphics.setComposite(composite); } Loading
tools/layoutlib/bridge/src/android/graphics/ColorFilter_Delegate.java +11 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.graphics; import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import java.awt.Graphics2D; /** * Delegate implementing the native methods of android.graphics.ColorFilter * Loading Loading @@ -50,9 +52,17 @@ public abstract class ColorFilter_Delegate { return sManager.getDelegate(nativeShader); } public abstract boolean isSupported(); public abstract String getSupportMessage(); public boolean isSupported() { return false; } public void applyFilter(Graphics2D g, int width, int height) { // This should never be called directly. If supported, the sub class should override this. assert false; } // ---- native methods ---- @LayoutlibDelegate Loading
tools/layoutlib/bridge/src/android/graphics/ColorMatrixColorFilter_Delegate.java +0 −5 Original line number Diff line number Diff line Loading @@ -42,11 +42,6 @@ public class ColorMatrixColorFilter_Delegate extends ColorFilter_Delegate { // ---- Public Helper methods ---- @Override public boolean isSupported() { return false; } @Override public String getSupportMessage() { return "ColorMatrix Color Filters are not supported."; Loading
tools/layoutlib/bridge/src/android/graphics/LightingColorFilter_Delegate.java +0 −5 Original line number Diff line number Diff line Loading @@ -42,11 +42,6 @@ public class LightingColorFilter_Delegate extends ColorFilter_Delegate { // ---- Public Helper methods ---- @Override public boolean isSupported() { return false; } @Override public String getSupportMessage() { return "Lighting Color Filters are not supported."; Loading
tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +4 −4 Original line number Diff line number Diff line Loading @@ -827,8 +827,8 @@ public class Paint_Delegate { delegate.mColorFilter = ColorFilter_Delegate.getDelegate(filter); // since none of those are supported, display a fidelity warning right away if (delegate.mColorFilter != null && delegate.mColorFilter.isSupported() == false) { // Log warning if it's not supported. if (delegate.mColorFilter != null && !delegate.mColorFilter.isSupported()) { Bridge.getLog().fidelityWarning(LayoutLog.TAG_COLORFILTER, delegate.mColorFilter.getSupportMessage(), null, null /*data*/); } Loading Loading @@ -873,7 +873,7 @@ public class Paint_Delegate { delegate.mMaskFilter = MaskFilter_Delegate.getDelegate(maskfilter); // since none of those are supported, display a fidelity warning right away if (delegate.mMaskFilter != null && delegate.mMaskFilter.isSupported() == false) { if (delegate.mMaskFilter != null && !delegate.mMaskFilter.isSupported()) { Bridge.getLog().fidelityWarning(LayoutLog.TAG_MASKFILTER, delegate.mMaskFilter.getSupportMessage(), null, null /*data*/); } Loading Loading @@ -906,7 +906,7 @@ public class Paint_Delegate { delegate.mRasterizer = Rasterizer_Delegate.getDelegate(rasterizer); // since none of those are supported, display a fidelity warning right away if (delegate.mRasterizer != null && delegate.mRasterizer.isSupported() == false) { if (delegate.mRasterizer != null && !delegate.mRasterizer.isSupported()) { Bridge.getLog().fidelityWarning(LayoutLog.TAG_RASTERIZER, delegate.mRasterizer.getSupportMessage(), null, null /*data*/); } Loading