Skip to content

Stop explicitly using kCallerPasses_Ownership #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: cos7.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions core/jni/android/graphics/BitmapFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,8 @@ static jobject nativeDecodeFileDescriptor(JNIEnv* env, jobject clazz, jobject fi
return nullObjectReturn("Could not open file");
}

std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file,
SkFILEStream::kCallerPasses_Ownership));

std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file));

// If there is no offset for the file descriptor, we use SkFILEStream directly.
if (::lseek(descriptor, 0, SEEK_CUR) == 0) {
assert(isSeekable(dupDescriptor));
Expand Down
3 changes: 1 addition & 2 deletions media/jni/android_media_ExifInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,7 @@ static jobject ExifInterface_getRawAttributesFromFileDescriptor(
// Rewind the file descriptor.
fseek(file, 0L, SEEK_SET);

std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file,
SkFILEStream::kCallerPasses_Ownership));
std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file));
return getRawAttributes(env, fileStream.get(), false);
}

Expand Down