Remove unnecessary GOOGLE3 ifdefs from SkRawCodec
These should be fine now that SkJpegCodec is building in GOOGLE3. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718343002 Review URL: https://codereview.chromium.org/1718343002
This commit is contained in:
parent
fda6cea7f8
commit
9ca27f39dd
@ -9,9 +9,7 @@
|
|||||||
#include "SkCodecPriv.h"
|
#include "SkCodecPriv.h"
|
||||||
#include "SkColorPriv.h"
|
#include "SkColorPriv.h"
|
||||||
#include "SkData.h"
|
#include "SkData.h"
|
||||||
#if !defined(GOOGLE3)
|
|
||||||
#include "SkJpegCodec.h"
|
#include "SkJpegCodec.h"
|
||||||
#endif
|
|
||||||
#include "SkRawCodec.h"
|
#include "SkRawCodec.h"
|
||||||
#include "SkRefCnt.h"
|
#include "SkRefCnt.h"
|
||||||
#include "SkStream.h"
|
#include "SkStream.h"
|
||||||
@ -573,16 +571,12 @@ SkCodec* SkRawCodec::NewFromStream(SkStream* stream) {
|
|||||||
::piex::Error error = ::piex::GetPreviewImageData(&piexStream, &imageData);
|
::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
|
// transferBuffer() is destructive to the rawStream. Abandon the rawStream after this
|
||||||
// function call.
|
// function call.
|
||||||
// FIXME: one may avoid the copy of memoryStream and use the buffered rawStream.
|
// FIXME: one may avoid the copy of memoryStream and use the buffered rawStream.
|
||||||
SkMemoryStream* memoryStream =
|
SkMemoryStream* memoryStream =
|
||||||
rawStream->transferBuffer(imageData.preview.offset, imageData.preview.length);
|
rawStream->transferBuffer(imageData.preview.offset, imageData.preview.length);
|
||||||
return memoryStream ? SkJpegCodec::NewFromStream(memoryStream) : nullptr;
|
return memoryStream ? SkJpegCodec::NewFromStream(memoryStream) : nullptr;
|
||||||
#else
|
|
||||||
return nullptr;
|
|
||||||
#endif
|
|
||||||
} else if (error == ::piex::Error::kFail) {
|
} else if (error == ::piex::Error::kFail) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user