| Index: samplecode/SampleApp.cpp
|
| diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
|
| index 473220e7943f8e49ffda1d32a5887d7c411f659e..4ea9dbe00bc99b5c76f346c772b4c49c00299701 100644
|
| --- a/samplecode/SampleApp.cpp
|
| +++ b/samplecode/SampleApp.cpp
|
| @@ -54,19 +54,6 @@ public:
|
| }
|
| };
|
|
|
| -#ifdef SAMPLE_PDF_FILE_VIEWER
|
| -extern SampleView* CreateSamplePdfFileViewer(const char filename[]);
|
| -
|
| -class PdfFileViewerFactory : public SkViewFactory {
|
| - SkString fFilename;
|
| -public:
|
| - PdfFileViewerFactory(const SkString& filename) : fFilename(filename) {}
|
| - virtual SkView* operator() () const SK_OVERRIDE {
|
| - return CreateSamplePdfFileViewer(fFilename.c_str());
|
| - }
|
| -};
|
| -#endif // SAMPLE_PDF_FILE_VIEWER
|
| -
|
| #define PIPE_FILEx
|
| #ifdef PIPE_FILE
|
| #define FILE_PATH "/path/to/drawing.data"
|
| @@ -722,10 +709,6 @@ static inline SampleWindow::DeviceType cycle_devicetype(SampleWindow::DeviceType
|
|
|
| static void usage(const char * argv0) {
|
| SkDebugf("%s [--slide sampleName] [-i resourcePath] [--msaa sampleCount] [--pictureDir dirPath] [--picture path] [--sort]\n", argv0);
|
| -#ifdef SAMPLE_PDF_FILE_VIEWER
|
| - SkDebugf(" [--pdfDir pdfPath]\n");
|
| - SkDebugf(" pdfPath: path to directory pdf files are read from\n");
|
| -#endif // SAMPLE_PDF_FILE_VIEWER
|
| SkDebugf(" sampleName: sample at which to start.\n");
|
| SkDebugf(" resourcePath: directory that stores image resources.\n");
|
| SkDebugf(" msaa: request multisampling with the given sample count.\n");
|
| @@ -754,9 +737,6 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
|
|
|
| this->registerPictFileSamples(argv, argc);
|
| this->registerPictFileSample(argv, argc);
|
| -#ifdef SAMPLE_PDF_FILE_VIEWER
|
| - this->registerPdfFileViewerSamples(argv, argc);
|
| -#endif // SAMPLE_PDF_FILE_VIEWER
|
| SkGMRegistyToSampleRegistry();
|
| {
|
| const SkViewRegister* reg = SkViewRegister::Head();
|
| @@ -1047,32 +1027,6 @@ void SampleWindow::registerPictFileSamples(char** argv, int argc) {
|
| }
|
| }
|
|
|
| -#ifdef SAMPLE_PDF_FILE_VIEWER
|
| -void SampleWindow::registerPdfFileViewerSamples(char** argv, int argc) {
|
| - const char* pdfDir = NULL;
|
| -
|
| - for (int i = 0; i < argc; ++i) {
|
| - if (!strcmp(argv[i], "--pdfDir")) {
|
| - i += 1;
|
| - if (i < argc) {
|
| - pdfDir = argv[i];
|
| - break;
|
| - }
|
| - }
|
| - }
|
| - if (pdfDir) {
|
| - SkOSFile::Iter iter(pdfDir, "pdf");
|
| - SkString filename;
|
| - while (iter.next(&filename)) {
|
| - SkString path;
|
| - make_filepath(&path, pdfDir, filename);
|
| - *fSamples.append() = new PdfFileViewerFactory(path);
|
| - }
|
| - }
|
| -}
|
| -#endif // SAMPLE_PDF_FILE_VIEWER
|
| -
|
| -
|
| int SampleWindow::findByTitle(const char title[]) {
|
| int i, count = fSamples.count();
|
| for (i = 0; i < count; i++) {
|
|
|