OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SampleApp.h" | 8 #include "SampleApp.h" |
9 | 9 |
10 #include "OverView.h" | 10 #include "OverView.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 class PictFileFactory : public SkViewFactory { | 74 class PictFileFactory : public SkViewFactory { |
75 SkString fFilename; | 75 SkString fFilename; |
76 public: | 76 public: |
77 PictFileFactory(const SkString& filename) : fFilename(filename) {} | 77 PictFileFactory(const SkString& filename) : fFilename(filename) {} |
78 SkView* operator() () const override { | 78 SkView* operator() () const override { |
79 return CreateSamplePictFileView(fFilename.c_str()); | 79 return CreateSamplePictFileView(fFilename.c_str()); |
80 } | 80 } |
81 }; | 81 }; |
82 | 82 |
83 extern SampleView* CreateSampleSVGFileView(const char filename[]); | 83 extern SampleView* CreateSampleSVGFileView(const SkString& filename); |
84 | 84 |
85 class SVGFileFactory : public SkViewFactory { | 85 class SVGFileFactory : public SkViewFactory { |
86 SkString fFilename; | 86 SkString fFilename; |
87 public: | 87 public: |
88 SVGFileFactory(const SkString& filename) : fFilename(filename) {} | 88 SVGFileFactory(const SkString& filename) : fFilename(filename) {} |
89 SkView* operator() () const override { | 89 SkView* operator() () const override { |
90 return CreateSampleSVGFileView(fFilename.c_str()); | 90 return CreateSampleSVGFileView(fFilename); |
91 } | 91 } |
92 }; | 92 }; |
93 | 93 |
94 #ifdef SAMPLE_PDF_FILE_VIEWER | 94 #ifdef SAMPLE_PDF_FILE_VIEWER |
95 extern SampleView* CreateSamplePdfFileViewer(const char filename[]); | 95 extern SampleView* CreateSamplePdfFileViewer(const char filename[]); |
96 | 96 |
97 class PdfFileViewerFactory : public SkViewFactory { | 97 class PdfFileViewerFactory : public SkViewFactory { |
98 SkString fFilename; | 98 SkString fFilename; |
99 public: | 99 public: |
100 PdfFileViewerFactory(const SkString& filename) : fFilename(filename) {} | 100 PdfFileViewerFactory(const SkString& filename) : fFilename(filename) {} |
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 #ifdef SK_BUILD_FOR_MAC | 2270 #ifdef SK_BUILD_FOR_MAC |
2271 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2271 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2272 #endif | 2272 #endif |
2273 SkGraphics::Init(); | 2273 SkGraphics::Init(); |
2274 SkEvent::Init(); | 2274 SkEvent::Init(); |
2275 } | 2275 } |
2276 | 2276 |
2277 void application_term() { | 2277 void application_term() { |
2278 SkEvent::Term(); | 2278 SkEvent::Term(); |
2279 } | 2279 } |
OLD | NEW |