Fix !defined(SK_XML) builds
Add guards for dependent code. TBR= Change-Id: I49c0c90a2defc6f39589721f95562e9e0f17db13 Reviewed-on: https://skia-review.googlesource.com/144610 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
parent
70c787ae5b
commit
5d3ff438fe
20
BUILD.gn
20
BUILD.gn
@ -1674,15 +1674,17 @@ if (skia_enable_tools) {
|
||||
]
|
||||
}
|
||||
|
||||
test_app("create_test_font_color") {
|
||||
sources = [
|
||||
"tools/fonts/create_test_font_color.cpp",
|
||||
]
|
||||
deps = [
|
||||
":flags",
|
||||
":skia",
|
||||
":tool_utils",
|
||||
]
|
||||
if (skia_use_expat) {
|
||||
test_app("create_test_font_color") {
|
||||
sources = [
|
||||
"tools/fonts/create_test_font_color.cpp",
|
||||
]
|
||||
deps = [
|
||||
":flags",
|
||||
":skia",
|
||||
":tool_utils",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
test_app("get_images_from_skps") {
|
||||
|
@ -533,6 +533,7 @@ static sk_sp<SkPicture> create_skp_from_svg(SkStream* stream, const char* filena
|
||||
return recorder.finishRecordingAsPicture();
|
||||
#endif
|
||||
exitf(ExitErr::kData, "SK_XML is disabled; cannot open svg file %s", filename);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool mkdir_p(const SkString& dirname) {
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "SvgSlide.h"
|
||||
|
||||
#if defined(SK_XML)
|
||||
|
||||
#include "SkCanvas.h"
|
||||
#include "SkStream.h"
|
||||
#include "SkSVGDOM.h"
|
||||
@ -41,3 +43,5 @@ void SvgSlide::draw(SkCanvas* canvas) {
|
||||
fDom->render(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SK_XML
|
||||
|
@ -530,10 +530,12 @@ void Viewer::initSlides() {
|
||||
return sk_make_sp<SkottieSlide>(name, path);}
|
||||
},
|
||||
#endif
|
||||
#if defined(SK_XML)
|
||||
{ ".svg", "svg-dir", FLAGS_svgs,
|
||||
[](const SkString& name, const SkString& path) -> sk_sp<Slide> {
|
||||
return sk_make_sp<SvgSlide>(name, path);}
|
||||
},
|
||||
#endif
|
||||
#if !(defined(SK_BUILD_FOR_WIN) && defined(__clang__))
|
||||
{ ".nima", "nima-dir", FLAGS_nimas,
|
||||
[](const SkString& name, const SkString& path) -> sk_sp<Slide> {
|
||||
|
Loading…
Reference in New Issue
Block a user