Specialize SkRectanzier to SkRectanizerSkyline

It looks like the pow2 rectanizer has never been used. Remove
the unneeded abstraction for rectanizer everywhere.

Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp
index 8f15db9..6211b71 100644
--- a/src/gpu/GrDrawOpAtlas.cpp
+++ b/src/gpu/GrDrawOpAtlas.cpp
@@ -15,7 +15,6 @@
 #include "src/gpu/GrOnFlushResourceProvider.h"
 #include "src/gpu/GrOpFlushState.h"
 #include "src/gpu/GrProxyProvider.h"
-#include "src/gpu/GrRectanizer.h"
 #include "src/gpu/GrResourceProvider.h"
 #include "src/gpu/GrResourceProviderPriv.h"
 #include "src/gpu/GrSurfaceProxyPriv.h"
@@ -103,7 +102,7 @@
         , fHeight(height)
         , fX(offX)
         , fY(offY)
-        , fRects(nullptr)
+        , fRectanizer(width, height)
         , fOffset(SkIPoint16::Make(fX * fWidth, fY * fHeight))
         , fColorType(colorType)
         , fBytesPerPixel(GrColorTypeBytesPerPixel(colorType))
@@ -120,17 +119,12 @@
 
 GrDrawOpAtlas::Plot::~Plot() {
     sk_free(fData);
-    delete fRects;
 }
 
 bool GrDrawOpAtlas::Plot::addSubImage(int width, int height, const void* image, SkIPoint16* loc) {
     SkASSERT(width <= fWidth && height <= fHeight);
 
-    if (!fRects) {
-        fRects = GrRectanizer::Factory(fWidth, fHeight);
-    }
-
-    if (!fRects->addRect(width, height, loc)) {
+    if (!fRectanizer.addRect(width, height, loc)) {
         return false;
     }
 
@@ -192,9 +186,7 @@
 }
 
 void GrDrawOpAtlas::Plot::resetRects() {
-    if (fRects) {
-        fRects->reset();
-    }
+    fRectanizer.reset();
 
     fGenID++;
     fID = CreateId(fPageIndex, fPlotIndex, fGenID);