Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(984)

Unified Diff: src/codec/SkRawCodec.cpp

Issue 1718343002: Remove unnecessary GOOGLE3 ifdefs from SkRawCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkRawCodec.cpp
diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp
index 655d14ea076d7ec12955691d23237f433c61ac57..a006e508379ed598f005b22619a9ad9d9b21e8fb 100644
--- a/src/codec/SkRawCodec.cpp
+++ b/src/codec/SkRawCodec.cpp
@@ -9,9 +9,7 @@
#include "SkCodecPriv.h"
#include "SkColorPriv.h"
#include "SkData.h"
-#if !defined(GOOGLE3)
#include "SkJpegCodec.h"
-#endif
#include "SkRawCodec.h"
#include "SkRefCnt.h"
#include "SkStream.h"
@@ -573,16 +571,12 @@ SkCodec* SkRawCodec::NewFromStream(SkStream* stream) {
::piex::Error error = ::piex::GetPreviewImageData(&piexStream, &imageData);
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);
return memoryStream ? SkJpegCodec::NewFromStream(memoryStream) : nullptr;
-#else
- return nullptr;
-#endif
} else if (error == ::piex::Error::kFail) {
return nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698