| Index: gm/factory.cpp
|
| diff --git a/gm/factory.cpp b/gm/factory.cpp
|
| index 4538cda8945d007fdbbbeb859af86a075f16c9c7..a7356a96e30a61288c5be5aaa883a201fbe21927 100644
|
| --- a/gm/factory.cpp
|
| +++ b/gm/factory.cpp
|
| @@ -11,6 +11,7 @@
|
| #include "SkData.h"
|
| #include "SkImageDecoder.h"
|
| #include "SkLruImageCache.h"
|
| +#include "SkOSFile.h"
|
| #include "SkStream.h"
|
|
|
| namespace skiagm {
|
| @@ -24,13 +25,9 @@ public:
|
|
|
| protected:
|
| virtual void onOnceBeforeDraw() SK_OVERRIDE {
|
| - SkString filename(INHERITED::gResourcePath);
|
| - if (!filename.endsWith("/") && !filename.endsWith("\\")) {
|
| - filename.append("/");
|
| - }
|
| -
|
| // Copyright-free file from http://openclipart.org/detail/29213/paper-plane-by-ddoo
|
| - filename.append("plane.png");
|
| + SkString filename = SkOSPath::SkPathJoin(INHERITED::gResourcePath.c_str(),
|
| + "plane.png");
|
|
|
| SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(filename.c_str()));
|
| if (NULL != stream.get()) {
|
|
|