Move GrRenderTargetPriv::maxWindowRectangles to GrRenderTargetContextPriv & GrRenderTargetProxy

This removes a reason to call accessRenderTarget on the GrRenderTargetContext

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

Change-Id: I6e8a53ffd5c1fea80f542b70e05744e2991f70f8
Reviewed-on: https://skia-review.googlesource.com/4583
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp
index 47bc3c9..3949b3f 100644
--- a/gm/windowrectangles.cpp
+++ b/gm/windowrectangles.cpp
@@ -182,8 +182,7 @@
     GrContext* ctx = canvas->getGrContext();
     GrRenderTargetContext* rtc = canvas->internal_private_accessTopLayerRenderTargetContext();
 
-    if (!ctx || !rtc ||
-        rtc->accessRenderTarget()->renderTargetPriv().maxWindowRectangles() < kNumWindows) {
+    if (!ctx || !rtc || rtc->priv().maxWindowRectangles() < kNumWindows) {
         this->fail(canvas);
         return;
     }