Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: samplecode/SampleApp.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SampleApp.h ('k') | samplecode/SampleArc.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #else 43 #else
44 class GrContext; 44 class GrContext;
45 #endif 45 #endif
46 46
47 extern SampleView* CreateSamplePictFileView(const char filename[]); 47 extern SampleView* CreateSamplePictFileView(const char filename[]);
48 48
49 class PictFileFactory : public SkViewFactory { 49 class PictFileFactory : public SkViewFactory {
50 SkString fFilename; 50 SkString fFilename;
51 public: 51 public:
52 PictFileFactory(const SkString& filename) : fFilename(filename) {} 52 PictFileFactory(const SkString& filename) : fFilename(filename) {}
53 virtual SkView* operator() () const SK_OVERRIDE { 53 SkView* operator() () const SK_OVERRIDE {
54 return CreateSamplePictFileView(fFilename.c_str()); 54 return CreateSamplePictFileView(fFilename.c_str());
55 } 55 }
56 }; 56 };
57 57
58 #ifdef SAMPLE_PDF_FILE_VIEWER 58 #ifdef SAMPLE_PDF_FILE_VIEWER
59 extern SampleView* CreateSamplePdfFileViewer(const char filename[]); 59 extern SampleView* CreateSamplePdfFileViewer(const char filename[]);
60 60
61 class PdfFileViewerFactory : public SkViewFactory { 61 class PdfFileViewerFactory : public SkViewFactory {
62 SkString fFilename; 62 SkString fFilename;
63 public: 63 public:
64 PdfFileViewerFactory(const SkString& filename) : fFilename(filename) {} 64 PdfFileViewerFactory(const SkString& filename) : fFilename(filename) {}
65 virtual SkView* operator() () const SK_OVERRIDE { 65 SkView* operator() () const SK_OVERRIDE {
66 return CreateSamplePdfFileViewer(fFilename.c_str()); 66 return CreateSamplePdfFileViewer(fFilename.c_str());
67 } 67 }
68 }; 68 };
69 #endif // SAMPLE_PDF_FILE_VIEWER 69 #endif // SAMPLE_PDF_FILE_VIEWER
70 70
71 #define PIPE_FILEx 71 #define PIPE_FILEx
72 #ifdef PIPE_FILE 72 #ifdef PIPE_FILE
73 #define FILE_PATH "/path/to/drawing.data" 73 #define FILE_PATH "/path/to/drawing.data"
74 #endif 74 #endif
75 75
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 virtual GrContext* getGrContext() { 339 virtual GrContext* getGrContext() {
340 #if SK_SUPPORT_GPU 340 #if SK_SUPPORT_GPU
341 return fCurContext; 341 return fCurContext;
342 #else 342 #else
343 return NULL; 343 return NULL;
344 #endif 344 #endif
345 } 345 }
346 346
347 virtual GrRenderTarget* getGrRenderTarget() SK_OVERRIDE { 347 GrRenderTarget* getGrRenderTarget() SK_OVERRIDE {
348 #if SK_SUPPORT_GPU 348 #if SK_SUPPORT_GPU
349 return fCurRenderTarget; 349 return fCurRenderTarget;
350 #else 350 #else
351 return NULL; 351 return NULL;
352 #endif 352 #endif
353 } 353 }
354 354
355 private: 355 private:
356 356
357 #if SK_SUPPORT_GPU 357 #if SK_SUPPORT_GPU
(...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 setenv("ANDROID_ROOT", "/android/device/data", 0); 2434 setenv("ANDROID_ROOT", "/android/device/data", 0);
2435 #endif 2435 #endif
2436 SkGraphics::Init(); 2436 SkGraphics::Init();
2437 SkEvent::Init(); 2437 SkEvent::Init();
2438 } 2438 }
2439 2439
2440 void application_term() { 2440 void application_term() {
2441 SkEvent::Term(); 2441 SkEvent::Term();
2442 SkGraphics::Term(); 2442 SkGraphics::Term();
2443 } 2443 }
OLDNEW
« no previous file with comments | « samplecode/SampleApp.h ('k') | samplecode/SampleArc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698