fix OpenCL memory leak
R=djsollen@google.com Review URL: https://codereview.chromium.org/18051004 git-svn-id: http://skia.googlecode.com/svn/trunk@9804 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
c0a75a879a
commit
5eef11b293
@ -187,6 +187,12 @@ int SkDifferentPixelsImageDiffer::queueDiff(SkBitmap * baseline, SkBitmap * test
|
||||
clEnqueueReadBuffer(fCommandQueue, diff->resultsBuffer, CL_TRUE, 0, sizeof(int), &numDiffPixels, 0, NULL, NULL);
|
||||
diff->result *= (double)numDiffPixels;
|
||||
diff->result = (1.0 - diff->result);
|
||||
|
||||
// Release all the buffers created
|
||||
clReleaseMemObject(diff->resultsBuffer);
|
||||
clReleaseMemObject(diff->baseline);
|
||||
clReleaseMemObject(diff->test);
|
||||
|
||||
SkDebugf("Time: %f\n", (get_seconds() - startTime));
|
||||
|
||||
return diffID;
|
||||
|
Loading…
Reference in New Issue
Block a user