Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: tests/FontHostStreamTest.cpp

Issue 59713010: Address some more valgrind issues (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/FontHostStreamTest.cpp
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index 30e469b4105b71857214e5dfc59620420b76027f..e15bd5a355ea0334a8138413cd31e95628a9830d 100644
--- a/tests/FontHostStreamTest.cpp
+++ b/tests/FontHostStreamTest.cpp
@@ -15,6 +15,7 @@
#include "SkPaint.h"
#include "SkPoint.h"
#include "SkRect.h"
+#include "SkStream.h"
#include "SkTypeface.h"
///////////////////////////////////////////////////////////////////////////////
@@ -99,7 +100,7 @@ static void test_fontHostStream(skiatest::Reporter* reporter) {
}
int ttcIndex;
robertphillips 2013/11/14 14:21:41 This addresses: 80 (32 direct, 48 indirect) bytes
- SkStream* fontData = origTypeface->openStream(&ttcIndex);
+ SkAutoTUnref<SkStream> fontData(origTypeface->openStream(&ttcIndex));
SkTypeface* streamTypeface = SkTypeface::CreateFromStream(fontData);
SkSafeUnref(paint.setTypeface(streamTypeface));
drawBG(&streamCanvas);

Powered by Google App Engine
This is Rietveld 408576698