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

Unified Diff: tests/YUVTest.cpp

Issue 2339273002: SkFontData to use smart pointers. (Closed)
Patch Set: Add trivial bodies to the trivial implementations. Created 4 years, 3 months 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
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/Resources.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/YUVTest.cpp
diff --git a/tests/YUVTest.cpp b/tests/YUVTest.cpp
index f7b3306b98fa935b02b5cda64c1caf6506c3d442..d3b916784372fdeab18d8883fbd82d0d9edf5ad7 100644
--- a/tests/YUVTest.cpp
+++ b/tests/YUVTest.cpp
@@ -12,17 +12,11 @@
#include "SkYUVSizeInfo.h"
#include "Test.h"
-static SkStreamAsset* resource(const char path[]) {
- SkString fullPath = GetResourcePath(path);
- return SkStream::NewFromFile(fullPath.c_str());
-}
-
static void codec_yuv(skiatest::Reporter* reporter,
const char path[],
SkISize expectedSizes[3]) {
- SkAutoTDelete<SkStream> stream(resource(path));
+ SkAutoTDelete<SkStream> stream(GetResourceAsStream(path));
if (!stream) {
- INFOF(reporter, "Missing resource '%s'\n", path);
return;
}
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/Resources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698