Simplify proxy functionally exact check.

Now we know ahead of time what size approx textures will use when they're
allocated.

Change-Id: I9e15140496d15e7d6933aa03d0215222ac3b5be5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 7577811..edf836c 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -268,6 +268,12 @@
     return GrResourceProvider::MakeApprox(fDimensions);
 }
 
+bool GrSurfaceProxy::isFunctionallyExact() const {
+    SkASSERT(!this->isFullyLazy());
+    return fFit == SkBackingFit::kExact ||
+           fDimensions == GrResourceProvider::MakeApprox(fDimensions);
+}
+
 #ifdef SK_DEBUG
 void GrSurfaceProxy::validate(GrContext_Base* context) const {
     if (fTarget) {