Fix copy-paste bugs in SkCanvas Nine and Lattice

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2203983002

Review-Url: https://codereview.chromium.org/2203983002
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 648059a..0b0434d 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1985,10 +1985,11 @@
     if (dst.isEmpty()) {
         return;
     }
-    if (!SkLatticeIter::Valid(image->width(), image->height(), center)) {
+    if (SkLatticeIter::Valid(image->width(), image->height(), center)) {
+        this->onDrawImageNine(image, center, dst, paint);
+    } else {
         this->drawImageRect(image, dst, paint);
     }
-    this->onDrawImageNine(image, center, dst, paint);
 }
 
 void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar dx, SkScalar dy, const SkPaint* paint) {
@@ -2022,10 +2023,12 @@
     if (bitmap.drawsNothing() || dst.isEmpty()) {
         return;
     }
-    if (!SkLatticeIter::Valid(bitmap.width(), bitmap.height(), center)) {
+    if (SkLatticeIter::Valid(bitmap.width(), bitmap.height(), center)) {
+        this->onDrawBitmapNine(bitmap, center, dst, paint);
+    } else {
         this->drawBitmapRect(bitmap, dst, paint);
     }
-    this->onDrawBitmapNine(bitmap, center, dst, paint);
+
 }
 
 void SkCanvas::drawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, const SkRect& dst,
@@ -2040,10 +2043,11 @@
     if (dst.isEmpty()) {
         return;
     }
-    if (!SkLatticeIter::Valid(image->width(), image->height(), lattice)) {
+    if (SkLatticeIter::Valid(image->width(), image->height(), lattice)) {
+        this->onDrawImageLattice(image, lattice, dst, paint);
+    } else {
         this->drawImageRect(image, dst, paint);
     }
-    this->onDrawImageLattice(image, lattice, dst, paint);
 }
 
 void SkCanvas::drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[],