Revert "Add an Option for orientation on JPEG encodes"

This reverts commit 5411a60e0d7370a5d47b5049de845a06fe52e98b.

Reason for revert: ASAN and Coverage failing: https://chromium-swarm.appspot.com/task?id=394978f3b7d44610
Flutter_Android failing.

Original change's description:
> Add an Option for orientation on JPEG encodes
> 
> Move Origin to its own header so that SkPixmap and SkJpegEncoder need
> not depend on SkCodec.
> 
> Add libexif, which is already used by Android, and use it to write the
> orientation. Write a makefile based on the Android.bp in Android, minus
> warnings. (libexif has an LGPL license.)
> 
> Add a test that verifies all the orientations work.
> 
> Optionally enable writing the orientation (and therefore including
> libexif). Chromium does not currently need it, and Android does not
> expose an API that would allow using it. Disable on Windows, where we
> still have build errors to fix.
> 
> Bug: skia:7138
> Change-Id: Iaeff44c36aebe0e639666979dc00e1b7594bbeb1
> Reviewed-on: https://skia-review.googlesource.com/60721
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,reed@google.com

Change-Id: I05b7ae8d1c5bbd1de1642d9ef024943500256273
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7138
Reviewed-on: https://skia-review.googlesource.com/61620
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
diff --git a/src/codec/SkCodecImageGenerator.cpp b/src/codec/SkCodecImageGenerator.cpp
index 741c8e3..e8d7d30 100644
--- a/src/codec/SkCodecImageGenerator.cpp
+++ b/src/codec/SkCodecImageGenerator.cpp
@@ -15,23 +15,23 @@
 #define kSwapXY     SkPixmapPriv::kSwapXY
 
 const uint8_t gOrientationFlags[] = {
-    0,                              // kTopLeft_SkEncodedOrigin
-    kMirrorX,                       // kTopRight_SkEncodedOrigin
-    kMirrorX | kMirrorY,            // kBottomRight_SkEncodedOrigin
-               kMirrorY,            // kBottomLeft_SkEncodedOrigin
-                          kSwapXY,  // kLeftTop_SkEncodedOrigin
-    kMirrorX            | kSwapXY,  // kRightTop_SkEncodedOrigin
-    kMirrorX | kMirrorY | kSwapXY,  // kRightBottom_SkEncodedOrigin
-               kMirrorY | kSwapXY,  // kLeftBottom_SkEncodedOrigin
+    0,                              // kTopLeft_Origin
+    kMirrorX,                       // kTopRight_Origin
+    kMirrorX | kMirrorY,            // kBottomRight_Origin
+               kMirrorY,            // kBottomLeft_Origin
+                          kSwapXY,  // kLeftTop_Origin
+    kMirrorX            | kSwapXY,  // kRightTop_Origin
+    kMirrorX | kMirrorY | kSwapXY,  // kRightBottom_Origin
+               kMirrorY | kSwapXY,  // kLeftBottom_Origin
 };
 
-SkPixmapPriv::OrientFlags SkPixmapPriv::OriginToOrient(SkEncodedOrigin o) {
+SkPixmapPriv::OrientFlags SkPixmapPriv::OriginToOrient(SkCodec::Origin o) {
     unsigned io = static_cast<int>(o) - 1;
     SkASSERT(io < SK_ARRAY_COUNT(gOrientationFlags));
     return static_cast<SkPixmapPriv::OrientFlags>(gOrientationFlags[io]);
 }
 
-static bool should_swap_width_height(SkEncodedOrigin o) {
+static bool should_swap_width_height(SkCodec::Origin o) {
     return SkToBool(SkPixmapPriv::OriginToOrient(o) & kSwapXY);
 }
 
@@ -73,12 +73,12 @@
 
 bool SkCodecImageGenerator::onGetPixels(const SkImageInfo& requestInfo, void* requestPixels,
                                         size_t requestRowBytes, const Options& opts) {
-    const auto origin = fCodec->getOrigin();
+    const SkCodec::Origin origin = fCodec->getOrigin();
     const SkPixmap request(requestInfo, requestPixels, requestRowBytes);
     const SkPixmap* codecMap = &request;
     SkAutoPixmapStorage storage;    // used if we have to post-orient the output from the codec
 
-    if (origin != kTopLeft_SkEncodedOrigin) {
+    if (origin != SkCodec::kTopLeft_Origin) {
         SkImageInfo info = requestInfo;
         if (should_swap_width_height(origin)) {
             info = swap_width_height(info);