Update allocation from bitmap.
GL attribute cleanup in type. Change-Id: I504dcf6744ad13d65e068e784b6608c999ab48c6
This commit is contained in:
@@ -90,6 +90,18 @@ public class Allocation extends BaseObj {
|
||||
subData1D(0, mType.getElementCount(), d);
|
||||
}
|
||||
|
||||
public void updateFromBitmap(Bitmap b)
|
||||
throws IllegalArgumentException {
|
||||
|
||||
mRS.validate();
|
||||
if(mType.getX() != b.getWidth() ||
|
||||
mType.getY() != b.getHeight()) {
|
||||
throw new IllegalArgumentException("Cannot update allocation from bitmap, sizes mismatch");
|
||||
}
|
||||
|
||||
mRS.nAllocationUpdateFromBitmap(mID, b);
|
||||
}
|
||||
|
||||
public void subData(int xoff, FieldPacker fp) {
|
||||
int eSize = mType.mElement.getSizeBytes();
|
||||
final byte[] data = fp.getData();
|
||||
|
||||
Reference in New Issue
Block a user