Move Views into Sample and Viewer.
What is left of the SkView system is used only by samples or viewer.
As a result, move it out of the Skia source tree and re-organize so it
is a bit easier to understand and use more shared code.
Move samplecode/ClockFaceView.cpp to samplecode/SampleTextEffects.cpp,
sice that's what's actually in it.
Move SkAnimTimer.h to tools/timer, since it's actually shared between gm
and samples.
Change-Id: I55dafd94c64e4f930ddbd19168e0f812af86c455
Reviewed-on: https://skia-review.googlesource.com/146161
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 6d5905a..143b8f2 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -608,13 +608,11 @@
}
// samples
- const SkViewRegister* reg = SkViewRegister::Head();
- while (reg) {
- sk_sp<Slide> slide(new SampleSlide(reg->factory()));
+ for (const SampleFactory factory : SampleRegistry::Range()) {
+ sk_sp<Slide> slide(new SampleSlide(factory));
if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, slide->getName().c_str())) {
fSlides.push_back(slide);
}
- reg = reg->next();
}
for (const auto& info : gExternalSlidesInfo) {