summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2014-02-05 19:46:02 -0500
committerLeon Scroggins III <scroggo@google.com>2014-02-06 18:44:54 -0500
commit2826e5f20295a1adb3b341c8b32f27d748e2ee19 (patch)
treeab9aa4112dd14217aa44416eddd786e0af156d94 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent2ac4f3b225192dad7bd6ff0788f083317d434534 (diff)
Decode file descriptor from the correct offset.
Fix a few bugs in nativeDecodeFileDescriptor: 1. Restore the FD's offset when exiting the function. 2. Copy the data when potentially using an SkImageRef. The old behavior would have continued to modify the file descriptor's offset each time a new decode was required. The copy ensures that the file descriptor remains unchanged. 3. Buffer the file stream. Prior to this change, if the image was not a PNG, the stream would be rewound to the beginning of the file, even if the file descriptor was passed in with an offset. Thanks to the buffer, the stream is only rewound to the original offset. Depends on https://googleplex-android-review.googlesource.com/#/c/415821/1 in external/skia BUG:12807677 BUG:12895876 Change-Id: I38b8cf5d210dbbc0107e6562e3884867de57fc4b
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions