Loading core/java/android/view/GLES20Canvas.java +0 −22 Original line number Diff line number Diff line Loading @@ -799,28 +799,6 @@ class GLES20Canvas extends HardwareCanvas { // TODO: Implement rendering } @Override public void drawPicture(Picture picture, Rect dst) { save(); translate(dst.left, dst.top); if (picture.getWidth() > 0 && picture.getHeight() > 0) { scale(dst.width() / picture.getWidth(), dst.height() / picture.getHeight()); } drawPicture(picture); restore(); } @Override public void drawPicture(Picture picture, RectF dst) { save(); translate(dst.left, dst.top); if (picture.getWidth() > 0 && picture.getHeight() > 0) { scale(dst.width() / picture.getWidth(), dst.height() / picture.getHeight()); } drawPicture(picture); restore(); } @Override public void drawPoint(float x, float y, Paint paint) { float[] point = getPointStorage(); Loading graphics/java/android/graphics/Canvas.java +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public class Canvas { */ public void setBitmap(@Nullable Bitmap bitmap) { if (isHardwareAccelerated()) { throw new RuntimeException("Can't set a bitmap device on a GL canvas"); throw new RuntimeException("Can't set a bitmap device on a HW accelerated canvas"); } if (bitmap == null) { Loading graphics/java/android/graphics/Picture.java +5 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,11 @@ public class Picture { * @param canvas The picture is drawn to this canvas */ public void draw(Canvas canvas) { if (canvas.isHardwareAccelerated()) { throw new IllegalArgumentException( "Picture playback is only supported on software canvas."); } if (mRecordingCanvas != null) { endRecording(); } Loading Loading
core/java/android/view/GLES20Canvas.java +0 −22 Original line number Diff line number Diff line Loading @@ -799,28 +799,6 @@ class GLES20Canvas extends HardwareCanvas { // TODO: Implement rendering } @Override public void drawPicture(Picture picture, Rect dst) { save(); translate(dst.left, dst.top); if (picture.getWidth() > 0 && picture.getHeight() > 0) { scale(dst.width() / picture.getWidth(), dst.height() / picture.getHeight()); } drawPicture(picture); restore(); } @Override public void drawPicture(Picture picture, RectF dst) { save(); translate(dst.left, dst.top); if (picture.getWidth() > 0 && picture.getHeight() > 0) { scale(dst.width() / picture.getWidth(), dst.height() / picture.getHeight()); } drawPicture(picture); restore(); } @Override public void drawPoint(float x, float y, Paint paint) { float[] point = getPointStorage(); Loading
graphics/java/android/graphics/Canvas.java +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public class Canvas { */ public void setBitmap(@Nullable Bitmap bitmap) { if (isHardwareAccelerated()) { throw new RuntimeException("Can't set a bitmap device on a GL canvas"); throw new RuntimeException("Can't set a bitmap device on a HW accelerated canvas"); } if (bitmap == null) { Loading
graphics/java/android/graphics/Picture.java +5 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,11 @@ public class Picture { * @param canvas The picture is drawn to this canvas */ public void draw(Canvas canvas) { if (canvas.isHardwareAccelerated()) { throw new IllegalArgumentException( "Picture playback is only supported on software canvas."); } if (mRecordingCanvas != null) { endRecording(); } Loading