| 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 #include "SampleApp.h" | 7 #include "SampleApp.h" |
| 8 | 8 |
| 9 #include "SkData.h" | 9 #include "SkData.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 } | 718 } |
| 719 | 719 |
| 720 static SkString getSampleTitle(const SkViewFactory* sampleFactory) { | 720 static SkString getSampleTitle(const SkViewFactory* sampleFactory) { |
| 721 SkView* view = (*sampleFactory)(); | 721 SkView* view = (*sampleFactory)(); |
| 722 SkString title; | 722 SkString title; |
| 723 SampleCode::RequestTitle(view, &title); | 723 SampleCode::RequestTitle(view, &title); |
| 724 view->unref(); | 724 view->unref(); |
| 725 return title; | 725 return title; |
| 726 } | 726 } |
| 727 | 727 |
| 728 bool compareSampleTitle(const SkViewFactory* first, const SkViewFactory* second)
{ | 728 static bool compareSampleTitle(const SkViewFactory* first, const SkViewFactory*
second) { |
| 729 return strcmp(getSampleTitle(first).c_str(), getSampleTitle(second).c_str())
< 0; | 729 return strcmp(getSampleTitle(first).c_str(), getSampleTitle(second).c_str())
< 0; |
| 730 } | 730 } |
| 731 | 731 |
| 732 SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
Manager) | 732 SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
Manager) |
| 733 : INHERITED(hwnd) | 733 : INHERITED(hwnd) |
| 734 , fDevManager(NULL) { | 734 , fDevManager(NULL) { |
| 735 | 735 |
| 736 fCurrIndex = -1; | 736 fCurrIndex = -1; |
| 737 | 737 |
| 738 this->registerPictFileSamples(argv, argc); | 738 this->registerPictFileSamples(argv, argc); |
| (...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2545 SkGraphics::Init(); | 2545 SkGraphics::Init(); |
| 2546 SkEvent::Init(); | 2546 SkEvent::Init(); |
| 2547 } | 2547 } |
| 2548 | 2548 |
| 2549 // FIXME: this should be in a header | 2549 // FIXME: this should be in a header |
| 2550 void application_term(); | 2550 void application_term(); |
| 2551 void application_term() { | 2551 void application_term() { |
| 2552 SkEvent::Term(); | 2552 SkEvent::Term(); |
| 2553 SkGraphics::Term(); | 2553 SkGraphics::Term(); |
| 2554 } | 2554 } |
| OLD | NEW |