Merge "Fix pixel test" into klp-dev

This commit is contained in:
Andy McFadden
2013-09-09 22:55:35 +00:00
committed by Android (Google) Code Review

View File

@@ -19,16 +19,16 @@ package android.graphics;
public class PixelFormat
{
/* these constants need to match those in hardware/hardware.h */
public static final int UNKNOWN = 0;
/** System chooses a format that supports translucency (many alpha bits) */
public static final int TRANSLUCENT = -3;
/**
/**
* System chooses a format that supports transparency
* (at least 1 alpha bit)
*/
* (at least 1 alpha bit)
*/
public static final int TRANSPARENT = -2;
/** System chooses an opaque format (no alpha bits required) */
@@ -54,28 +54,28 @@ public class PixelFormat
/**
* @deprecated use {@link android.graphics.ImageFormat#NV16
* @deprecated use {@link android.graphics.ImageFormat#NV16
* ImageFormat.NV16} instead.
*/
@Deprecated
public static final int YCbCr_422_SP= 0x10;
/**
* @deprecated use {@link android.graphics.ImageFormat#NV21
* @deprecated use {@link android.graphics.ImageFormat#NV21
* ImageFormat.NV21} instead.
*/
@Deprecated
public static final int YCbCr_420_SP= 0x11;
/**
* @deprecated use {@link android.graphics.ImageFormat#YUY2
* @deprecated use {@link android.graphics.ImageFormat#YUY2
* ImageFormat.YUY2} instead.
*/
@Deprecated
public static final int YCbCr_422_I = 0x14;
/**
* @deprecated use {@link android.graphics.ImageFormat#JPEG
* @deprecated use {@link android.graphics.ImageFormat#JPEG
* ImageFormat.JPEG} instead.
*/
@Deprecated
@@ -95,6 +95,7 @@ public class PixelFormat
case RGB_565:
case RGBA_5551:
case RGBA_4444:
case LA_88:
info.bitsPerPixel = 16;
info.bytesPerPixel = 2;
break;
@@ -131,7 +132,7 @@ public class PixelFormat
}
return false;
}
public int bytesPerPixel;
public int bitsPerPixel;
}