diff options
author | Chet Haase <chet@google.com> | 2010-10-22 16:17:12 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2010-10-26 12:52:03 -0700 |
commit | ad93c2bb63dfc813b2eefa1043aa63afbddce655 (patch) | |
tree | b1a5a9cd667ed0dca718405390d76081a8241d54 /graphics | |
parent | 78098341f86b4c71256017ca2b33674d6bcab046 (diff) | |
download | frameworks_base-ad93c2bb63dfc813b2eefa1043aa63afbddce655.zip frameworks_base-ad93c2bb63dfc813b2eefa1043aa63afbddce655.tar.gz frameworks_base-ad93c2bb63dfc813b2eefa1043aa63afbddce655.tar.bz2 |
Optimizing ColorFilter in display lists
Change-Id: Ie4d5e5b0bc45e0ce47bba144049303c270762e54
Diffstat (limited to 'graphics')
3 files changed, 8 insertions, 7 deletions
diff --git a/graphics/java/android/graphics/ColorMatrixColorFilter.java b/graphics/java/android/graphics/ColorMatrixColorFilter.java index 245c615..4f32342 100644 --- a/graphics/java/android/graphics/ColorMatrixColorFilter.java +++ b/graphics/java/android/graphics/ColorMatrixColorFilter.java @@ -27,7 +27,7 @@ public class ColorMatrixColorFilter extends ColorFilter { public ColorMatrixColorFilter(ColorMatrix matrix) { final float[] colorMatrix = matrix.getArray(); native_instance = nativeColorMatrixFilter(colorMatrix); - nativeColorFilter = nColorMatrixFilter(colorMatrix); + nativeColorFilter = nColorMatrixFilter(native_instance, colorMatrix); } /** @@ -42,9 +42,9 @@ public class ColorMatrixColorFilter extends ColorFilter { throw new ArrayIndexOutOfBoundsException(); } native_instance = nativeColorMatrixFilter(array); - nativeColorFilter = nColorMatrixFilter(array); + nativeColorFilter = nColorMatrixFilter(native_instance, array); } private static native int nativeColorMatrixFilter(float[] array); - private static native int nColorMatrixFilter(float[] array); + private static native int nColorMatrixFilter(int nativeFilter, float[] array); } diff --git a/graphics/java/android/graphics/LightingColorFilter.java b/graphics/java/android/graphics/LightingColorFilter.java index 715ce86..c621de6 100644 --- a/graphics/java/android/graphics/LightingColorFilter.java +++ b/graphics/java/android/graphics/LightingColorFilter.java @@ -30,9 +30,9 @@ public class LightingColorFilter extends ColorFilter { */ public LightingColorFilter(int mul, int add) { native_instance = native_CreateLightingFilter(mul, add); - nativeColorFilter = nCreateLightingFilter(mul, add); + nativeColorFilter = nCreateLightingFilter(native_instance, mul, add); } private static native int native_CreateLightingFilter(int mul, int add); - private static native int nCreateLightingFilter(int mul, int add); + private static native int nCreateLightingFilter(int nativeFilter, int mul, int add); } diff --git a/graphics/java/android/graphics/PorterDuffColorFilter.java b/graphics/java/android/graphics/PorterDuffColorFilter.java index b02dab1..ecc7c24 100644 --- a/graphics/java/android/graphics/PorterDuffColorFilter.java +++ b/graphics/java/android/graphics/PorterDuffColorFilter.java @@ -26,9 +26,10 @@ public class PorterDuffColorFilter extends ColorFilter { */ public PorterDuffColorFilter(int srcColor, PorterDuff.Mode mode) { native_instance = native_CreatePorterDuffFilter(srcColor, mode.nativeInt); - nativeColorFilter = nCreatePorterDuffFilter(srcColor, mode.nativeInt); + nativeColorFilter = nCreatePorterDuffFilter(native_instance, srcColor, mode.nativeInt); } private static native int native_CreatePorterDuffFilter(int srcColor, int porterDuffMode); - private static native int nCreatePorterDuffFilter(int srcColor, int porterDuffMode); + private static native int nCreatePorterDuffFilter(int nativeFilter, int srcColor, + int porterDuffMode); } |