Merge "Add basic code required for drawPicture()"
This commit is contained in:
@@ -908,17 +908,30 @@ class GLES20Canvas extends HardwareCanvas {
|
||||
|
||||
@Override
|
||||
public void drawPicture(Picture picture) {
|
||||
// TODO: Implement
|
||||
picture.endRecording();
|
||||
// TODO: Implement rendering
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPicture(Picture picture, Rect dst) {
|
||||
// TODO: Implement
|
||||
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) {
|
||||
// TODO: Implement
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user