aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FontHostStreamTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-14 14:47:56 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-14 14:47:56 +0000
commitcb3b615af712fc71b19b86211c1d083430114d7e (patch)
tree221396d3d49027b45482dfd7cb4bea980c87de53 /tests/FontHostStreamTest.cpp
parent983c022bffd27f1c30d365f7f34c3e7c152fcfd9 (diff)
Address some more valgrind issues
R=borenet@google.com Review URL: https://codereview.chromium.org/59713010 git-svn-id: http://skia.googlecode.com/svn/trunk@12286 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/FontHostStreamTest.cpp')
-rw-r--r--tests/FontHostStreamTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index 30e469b410..e15bd5a355 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;
- SkStream* fontData = origTypeface->openStream(&ttcIndex);
+ SkAutoTUnref<SkStream> fontData(origTypeface->openStream(&ttcIndex));
SkTypeface* streamTypeface = SkTypeface::CreateFromStream(fontData);
SkSafeUnref(paint.setTypeface(streamTypeface));
drawBG(&streamCanvas);