From 2d172ebb29d7afe47aa179211c9f92187f28ec52 Mon Sep 17 00:00:00 2001 From: yujieqin Date: Tue, 23 Feb 2016 06:49:38 -0800 Subject: [PATCH] Use new API instead of the deprecated ones. This change will allow us to remove the old API in follow up clean up. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728553002 Review URL: https://codereview.chromium.org/1728553002 --- src/codec/SkRawCodec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp index 4cd44a4df1..655d14ea07 100644 --- a/src/codec/SkRawCodec.cpp +++ b/src/codec/SkRawCodec.cpp @@ -572,13 +572,13 @@ SkCodec* SkRawCodec::NewFromStream(SkStream* stream) { if (::piex::IsRaw(&piexStream)) { ::piex::Error error = ::piex::GetPreviewImageData(&piexStream, &imageData); - if (error == ::piex::Error::kOk && imageData.preview_length > 0) { + if (error == ::piex::Error::kOk && imageData.preview.length > 0) { #if !defined(GOOGLE3) // transferBuffer() is destructive to the rawStream. Abandon the rawStream after this // function call. // FIXME: one may avoid the copy of memoryStream and use the buffered rawStream. SkMemoryStream* memoryStream = - rawStream->transferBuffer(imageData.preview_offset, imageData.preview_length); + rawStream->transferBuffer(imageData.preview.offset, imageData.preview.length); return memoryStream ? SkJpegCodec::NewFromStream(memoryStream) : nullptr; #else return nullptr;