зеркало из https://github.com/mozilla/moz-skia.git
Close a couple of minor memory leaks, add a valgrind suppression file to
mute complaints about apparent driver bugs. http://codereview.appspot.com/5837046/ git-svn-id: http://skia.googlecode.com/svn/trunk@3406 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
6036149354
Коммит
0435f161fc
|
@ -276,6 +276,8 @@ static void test_irect(skiatest::Reporter* reporter) {
|
|||
SkMask maskBW, maskAA;
|
||||
copyToMask(rgn2, &maskBW);
|
||||
clip2.copyToMask(&maskAA);
|
||||
SkAutoMaskFreeImage freeBW(maskBW.fImage);
|
||||
SkAutoMaskFreeImage freeAA(maskAA.fImage);
|
||||
REPORTER_ASSERT(reporter, maskBW == maskAA);
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +310,8 @@ static void test_path_with_hole(skiatest::Reporter* reporter) {
|
|||
|
||||
SkMask mask;
|
||||
clip.copyToMask(&mask);
|
||||
|
||||
SkAutoMaskFreeImage freeM(mask.fImage);
|
||||
|
||||
REPORTER_ASSERT(reporter, expected == mask);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -474,7 +474,8 @@ static void TestBitmapCopy(skiatest::Reporter* reporter) {
|
|||
// raw buffer pointer.
|
||||
const uint32_t bufSize = subH *
|
||||
SkBitmap::ComputeRowBytes(src.getConfig(), subW) * 2;
|
||||
uint8_t* buf = new uint8_t[bufSize];
|
||||
SkAutoMalloc autoBuf (bufSize);
|
||||
uint8_t* buf = static_cast<uint8_t*>(autoBuf.get());
|
||||
|
||||
SkBitmap bufBm; // Attach buf to this bitmap.
|
||||
bool successExpected;
|
||||
|
@ -593,7 +594,6 @@ static void TestBitmapCopy(skiatest::Reporter* reporter) {
|
|||
subset.copyPixelsFrom(buf, 1, subset.rowBytes()) ==
|
||||
false);
|
||||
|
||||
delete [] buf;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# Pass this file to Valgrind with "--suppressions=tests/valgrind.supp"
|
||||
# to avoid reporting errors inside the driver.
|
||||
|
||||
{
|
||||
nVidiaDriverUninitializedJump001
|
||||
Memcheck:Cond
|
||||
obj:/usr/lib/nvidia-current/libnvidia-glcore.so.280.13
|
||||
}
|
||||
{
|
||||
nVidiaDriverLeak001
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
obj:/usr/lib/nvidia-current/libGL.so.280.13
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче