Loading core/java/android/view/SurfaceView.java +10 −3 Original line number Original line Diff line number Diff line Loading @@ -140,7 +140,10 @@ public class SurfaceView extends View { boolean mViewVisibility = false; boolean mViewVisibility = false; int mRequestedWidth = -1; int mRequestedWidth = -1; int mRequestedHeight = -1; int mRequestedHeight = -1; int mRequestedFormat = PixelFormat.OPAQUE; /* Set SurfaceView's format to 565 by default to maintain backward * compatibility with applications assuming this format. */ int mRequestedFormat = PixelFormat.RGB_565; int mRequestedType = -1; int mRequestedType = -1; boolean mHaveFrame = false; boolean mHaveFrame = false; Loading @@ -163,16 +166,20 @@ public class SurfaceView extends View { public SurfaceView(Context context) { public SurfaceView(Context context) { super(context); super(context); setWillNotDraw(true); init(); } } public SurfaceView(Context context, AttributeSet attrs) { public SurfaceView(Context context, AttributeSet attrs) { super(context, attrs); super(context, attrs); setWillNotDraw(true); init(); } } public SurfaceView(Context context, AttributeSet attrs, int defStyle) { public SurfaceView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); super(context, attrs, defStyle); init(); } private void init() { setWillNotDraw(true); setWillNotDraw(true); } } Loading opengl/java/android/opengl/GLSurfaceView.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -222,7 +222,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback // underlying surface is created and destroyed // underlying surface is created and destroyed SurfaceHolder holder = getHolder(); SurfaceHolder holder = getHolder(); holder.addCallback(this); holder.addCallback(this); holder.setFormat(PixelFormat.RGB_565); // setType is not needed for SDK 2.0 or newer. Uncomment this // setType is not needed for SDK 2.0 or newer. Uncomment this // statement if back-porting this code to older SDKs. // statement if back-porting this code to older SDKs. // holder.setType(SurfaceHolder.SURFACE_TYPE_GPU); // holder.setType(SurfaceHolder.SURFACE_TYPE_GPU); Loading Loading
core/java/android/view/SurfaceView.java +10 −3 Original line number Original line Diff line number Diff line Loading @@ -140,7 +140,10 @@ public class SurfaceView extends View { boolean mViewVisibility = false; boolean mViewVisibility = false; int mRequestedWidth = -1; int mRequestedWidth = -1; int mRequestedHeight = -1; int mRequestedHeight = -1; int mRequestedFormat = PixelFormat.OPAQUE; /* Set SurfaceView's format to 565 by default to maintain backward * compatibility with applications assuming this format. */ int mRequestedFormat = PixelFormat.RGB_565; int mRequestedType = -1; int mRequestedType = -1; boolean mHaveFrame = false; boolean mHaveFrame = false; Loading @@ -163,16 +166,20 @@ public class SurfaceView extends View { public SurfaceView(Context context) { public SurfaceView(Context context) { super(context); super(context); setWillNotDraw(true); init(); } } public SurfaceView(Context context, AttributeSet attrs) { public SurfaceView(Context context, AttributeSet attrs) { super(context, attrs); super(context, attrs); setWillNotDraw(true); init(); } } public SurfaceView(Context context, AttributeSet attrs, int defStyle) { public SurfaceView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); super(context, attrs, defStyle); init(); } private void init() { setWillNotDraw(true); setWillNotDraw(true); } } Loading
opengl/java/android/opengl/GLSurfaceView.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -222,7 +222,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback // underlying surface is created and destroyed // underlying surface is created and destroyed SurfaceHolder holder = getHolder(); SurfaceHolder holder = getHolder(); holder.addCallback(this); holder.addCallback(this); holder.setFormat(PixelFormat.RGB_565); // setType is not needed for SDK 2.0 or newer. Uncomment this // setType is not needed for SDK 2.0 or newer. Uncomment this // statement if back-porting this code to older SDKs. // statement if back-porting this code to older SDKs. // holder.setType(SurfaceHolder.SURFACE_TYPE_GPU); // holder.setType(SurfaceHolder.SURFACE_TYPE_GPU); Loading