Skip to content

Commit 437e9cc

Browse files
marconeAndroid (Google) Code Review
authored andcommitted
Merge "Adjust buffer position after copying" into jb-mr1-dev
2 parents f6138f0 + 55adc14 commit 437e9cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graphics/java/android/graphics/Bitmap.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ public void copyPixelsFromBuffer(Buffer src) {
413413
}
414414

415415
nativeCopyPixelsFromBuffer(mNativeBitmap, src);
416+
417+
// now update the buffer's position
418+
int position = src.position();
419+
position += bitmapBytes >> shift;
420+
src.position(position);
416421
}
417422

418423
/**

0 commit comments

Comments
 (0)