Move OpenGL specific details behind renderPipeline interface.

Test: new and existing unit tests still pass.
Change-Id: I6164f30f45ebe450788ed8d949eca5af9a44e585
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 42da293..6cb2b9c 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -618,10 +618,7 @@
 }
 
 CREATE_BRIDGE2(prepareToDraw, RenderThread* thread, Bitmap* bitmap) {
-    if (Caches::hasInstance() && args->thread->eglManager().hasEglContext()) {
-        ATRACE_NAME("Bitmap#prepareToDraw task");
-        Caches::getInstance().textureCache.prefetch(args->bitmap);
-    }
+    CanvasContext::prepareToDraw(*args->thread, args->bitmap);
     args->bitmap->unref();
     args->bitmap = nullptr;
     return nullptr;