Move is_orientation_marker into its own file
Bug: skia:8046
This is used both by SkJpegCodec and SkWebpCodec, so make it possible
to use it when SK_HAS_JPEG_LIBRARY is not set.
Change-Id: I34aa3587500cca3d2d74c4eb33945451592bf72b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/175428
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 20ded40..a90d452 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -14,6 +14,7 @@
#include "include/private/SkTo.h"
#include "src/codec/SkCodecAnimationPriv.h"
#include "src/codec/SkCodecPriv.h"
+#include "src/codec/SkParseEncodedOrigin.h"
#include "src/codec/SkSampler.h"
#include "src/core/SkMakeUnique.h"
#include "src/core/SkRasterPipeline.h"
@@ -106,7 +107,7 @@
WebPChunkIterator chunkIterator;
SkAutoTCallVProc<WebPChunkIterator, WebPDemuxReleaseChunkIterator> autoCI(&chunkIterator);
if (WebPDemuxGetChunk(demux, "EXIF", 1, &chunkIterator)) {
- is_orientation_marker(chunkIterator.chunk.bytes, chunkIterator.chunk.size, &origin);
+ SkParseEncodedOrigin(chunkIterator.chunk.bytes, chunkIterator.chunk.size, &origin);
}
}