am 2d468c5d: Make sure SurfaceView use a 565 surface when requesting an OPAQUE format.

Merge commit '2d468c5d73cc1cefbcfa8d98e30622c54756918c' into gingerbread-plus-aosp

* commit '2d468c5d73cc1cefbcfa8d98e30622c54756918c':
  Make sure SurfaceView use a 565 surface when requesting an OPAQUE format.
This commit is contained in:
Mathias Agopian
2010-06-14 22:00:40 -07:00
committed by Android Git Automerger

View File

@@ -724,6 +724,12 @@ public class SurfaceView extends View {
}
public void setFormat(int format) {
// for backward compatibility reason, OPAQUE always
// means 565 for SurfaceView
if (format == PixelFormat.OPAQUE)
format = PixelFormat.RGB_565;
mRequestedFormat = format;
if (mWindow != null) {
updateWindow(false);