ccpr: Add a GrOctoBounds class

Encapsulates all the various code dealing with 45-degree bounding
boxes into a central GrOctoBounds class.

Bug: skia:
Change-Id: Ibc8ac4371af8f310e711579c3c77e0b3a53aff0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212563
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ccpr/GrCCPathCache.cpp b/src/gpu/ccpr/GrCCPathCache.cpp
index 4ca0845..3bc26c9 100644
--- a/src/gpu/ccpr/GrCCPathCache.cpp
+++ b/src/gpu/ccpr/GrCCPathCache.cpp
@@ -352,8 +352,7 @@
 
 void GrCCPathCacheEntry::setCoverageCountAtlas(
         GrOnFlushResourceProvider* onFlushRP, GrCCAtlas* atlas, const SkIVector& atlasOffset,
-        const SkRect& devBounds, const SkRect& devBounds45, const SkIRect& devIBounds,
-        const SkIVector& maskShift) {
+        const GrOctoBounds& octoBounds, const SkIRect& devIBounds, const SkIVector& maskShift) {
     SkASSERT(fOnFlushRefCnt > 0);
     SkASSERT(!fCachedAtlas);  // Otherwise we would need to call releaseCachedAtlas().
 
@@ -369,9 +368,7 @@
 
     fAtlasOffset = atlasOffset + maskShift;
 
-    float dx = (float)maskShift.fX, dy = (float)maskShift.fY;
-    fDevBounds = devBounds.makeOffset(-dx, -dy);
-    fDevBounds45 = GrCCPathProcessor::MakeOffset45(devBounds45, -dx, -dy);
+    fOctoBounds.setOffset(octoBounds, -maskShift.fX, -maskShift.fY);
     fDevIBounds = devIBounds.makeOffset(-maskShift.fX, -maskShift.fY);
 }