Allow aliasing in GrProxyProvider::processInvalidUniqueKey

Rearranges the code to support the case "&key == &proxy->fUniqueKey".
Removes the redundant GrUniqueKey parameter from
GrProxyProvider::removeUniqueKeyFromProxy (we can just get the key
from the proxy itself). Adds a passthru for "processInvalidUniqueKey"
to GrOnFlushResourceProvier.

Bug: skia:8462
Change-Id: I0c1e1f2c6ff15a9976f8475c19fd8a33a363193c
Reviewed-on: https://skia-review.googlesource.com/c/180048
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp
index 224af01..291d6b1 100644
--- a/src/gpu/GrBitmapTextureMaker.cpp
+++ b/src/gpu/GrBitmapTextureMaker.cpp
@@ -83,7 +83,8 @@
                 // mipmapped version. The texture backing the unmipped version will remain in the
                 // resource cache until the last texture proxy referencing it is deleted at which
                 // time it too will be deleted or recycled.
-                proxyProvider->removeUniqueKeyFromProxy(fOriginalKey, proxy.get());
+                SkASSERT(proxy->getUniqueKey() == fOriginalKey);
+                proxyProvider->removeUniqueKeyFromProxy(proxy.get());
                 proxyProvider->assignUniqueKeyToProxy(fOriginalKey, mippedProxy.get());
                 GrInstallBitmapUniqueKeyInvalidator(fOriginalKey, proxyProvider->contextUniqueID(),
                                                     fBitmap.pixelRef());