Remove SkCodec::fSrcInfo

This object is now redundant with fEncodedInfo. It holds an
SkColorSpace, which is never used now that SkCodec uses skcms.

SkCodec::getInfo() no longer returns a reference, but creates an
SkImageInfo from the SkEncodedInfo the same way fSrcInfo was
previously created.

Add SkCodec::bounds() and ::dimensions() to replace calling these
methods on getInfo().

Remove srcInfo from SkMaskSwizzler::Create, which just wants to know
whether the src is opaque.

Remove the srcColorType from conversionSupported. Only the base class
version used it. Make it look at fEncodedInfo.color() instead.

Bug: skia:6839
Bug: chromium:887372
Change-Id: I2c0583cae76121211c1a6b49979972fa86daf077
Reviewed-on: https://skia-review.googlesource.com/c/157563
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index 8a7fb9e8..8fc0ea8 100644
--- a/src/codec/SkBmpRLECodec.cpp
+++ b/src/codec/SkBmpRLECodec.cpp
@@ -275,7 +275,7 @@
  */
 int SkBmpRLECodec::decodeRows(const SkImageInfo& info, void* dst, size_t dstRowBytes,
         const Options& opts) {
-    const int width = this->getInfo().width();
+    const int width = this->dimensions().width();
     int height = info.height();
 
     // Account for sampling.
@@ -332,7 +332,7 @@
 
 int SkBmpRLECodec::decodeRLE(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes) {
     // Use the original width to count the number of pixels in each row.
-    const int width = this->getInfo().width();
+    const int width = this->dimensions().width();
 
     // This tells us the number of rows that we are meant to decode.
     const int height = dstInfo.height();
@@ -522,9 +522,8 @@
 }
 
 bool SkBmpRLECodec::skipRows(int count) {
-    const SkImageInfo rowInfo = SkImageInfo::Make(this->getInfo().width(), count, kN32_SkColorType,
-            kUnpremul_SkAlphaType);
-
+    const SkImageInfo rowInfo = SkImageInfo::Make(this->dimensions().width(), count,
+                                                  kN32_SkColorType, kUnpremul_SkAlphaType);
     return count == this->decodeRows(rowInfo, nullptr, 0, this->options());
 }
 
@@ -563,5 +562,5 @@
 
 int SkBmpRLECodec::setSampleX(int sampleX){
     fSampleX = sampleX;
-    return get_scaled_dimension(this->getInfo().width(), sampleX);
+    return get_scaled_dimension(this->dimensions().width(), sampleX);
 }