diff options
author | Hal Canary <halcanary@google.com> | 2018-03-22 15:21:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-22 20:28:45 +0000 |
commit | 0f66681ff1c7a2b22d89424ba69e3a5bb8c40b0b (patch) | |
tree | 3cedddf6ce3e8d53739eae227008fff5dd29e413 /tools/viewer | |
parent | 43e64c7ba8ebdb1105561d9c648665a2ae9b5ddd (diff) |
BUILD: build when !skia_use_expat
Change-Id: I17a695c64be0e2081ad4937b23038b7ce88ae293
Reviewed-on: https://skia-review.googlesource.com/115988
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tools/viewer')
-rw-r--r-- | tools/viewer/BisectSlide.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/viewer/BisectSlide.cpp b/tools/viewer/BisectSlide.cpp index 63e69d278c..38ab3c3ffd 100644 --- a/tools/viewer/BisectSlide.cpp +++ b/tools/viewer/BisectSlide.cpp @@ -7,11 +7,14 @@ #include "BisectSlide.h" -#include "SkDOM.h" #include "SkOSPath.h" #include "SkPicture.h" #include "SkStream.h" + +#ifdef SK_XML +#include "SkDOM.h" #include "../experimental/svg/model/SkSVGDOM.h" +#endif sk_sp<BisectSlide> BisectSlide::Create(const char filepath[]) { SkFILEStream stream(filepath); @@ -22,6 +25,7 @@ sk_sp<BisectSlide> BisectSlide::Create(const char filepath[]) { sk_sp<BisectSlide> bisect(new BisectSlide(filepath)); if (bisect->fFilePath.endsWith(".svg")) { +#ifdef SK_XML SkDOM xml; if (!xml.build(stream)) { SkDebugf("BISECT: XML parsing failed: \"%s\"\n", filepath); @@ -34,6 +38,9 @@ sk_sp<BisectSlide> BisectSlide::Create(const char filepath[]) { } svg->setContainerSize(SkSize::Make(bisect->getDimensions())); svg->render(bisect.get()); +#else + return nullptr; +#endif } else { sk_sp<SkPicture> skp = SkPicture::MakeFromStream(&stream); if (!skp) { |