Make Blitter part of Renderer.
This fixes two issues. We had a global 'blitter' instance which doesn't
get destroyed until the library us unloaded. This is reported as a
memory leak (albeit benign). Potentially worse is that the singleton was
shared between all threads, and the Routine cache isn't thread safe.
Bug chromium:732691
Change-Id: I7b90d7d2bc67b4a9f78cdf4f54a76fa2f798b7cc
Reviewed-on: https://swiftshader-review.googlesource.com/10128
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLES_CM/Context.cpp b/src/OpenGL/libGLES_CM/Context.cpp
index 5e09b65..b6f76c8 100644
--- a/src/OpenGL/libGLES_CM/Context.cpp
+++ b/src/OpenGL/libGLES_CM/Context.cpp
@@ -2850,6 +2850,11 @@
projectionStack.load(P);
}
+void Context::blit(sw::Surface *source, const sw::SliceRect &sRect, sw::Surface *dest, const sw::SliceRect &dRect)
+{
+ device->blit(source, sRect, dest, dRect, false);
+}
+
void Context::finish()
{
device->finish();