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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 } | 737 } |
738 | 738 |
739 DEFINE_string(slide, "", "Start on this sample."); | 739 DEFINE_string(slide, "", "Start on this sample."); |
740 DEFINE_int32(msaa, 0, "Request multisampling with this count."); | 740 DEFINE_int32(msaa, 0, "Request multisampling with this count."); |
741 DEFINE_string(pictureDir, "", "Read pictures from here."); | 741 DEFINE_string(pictureDir, "", "Read pictures from here."); |
742 DEFINE_string(picture, "", "Path to single picture."); | 742 DEFINE_string(picture, "", "Path to single picture."); |
743 DEFINE_string(sequence, "", "Path to file containing the desired samples/gms to
show."); | 743 DEFINE_string(sequence, "", "Path to file containing the desired samples/gms to
show."); |
744 DEFINE_bool(sort, false, "Sort samples by title."); | 744 DEFINE_bool(sort, false, "Sort samples by title."); |
745 DEFINE_bool(list, false, "List samples?"); | 745 DEFINE_bool(list, false, "List samples?"); |
746 DEFINE_bool(gpu, false, "Start up with gpu?"); | 746 DEFINE_bool(gpu, false, "Start up with gpu?"); |
| 747 DEFINE_bool(redraw, false, "Force continuous redrawing, for profiling or debuggi
ng tools."); |
747 DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-spec
ific names | 748 DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-spec
ific names |
748 #ifdef SAMPLE_PDF_FILE_VIEWER | 749 #ifdef SAMPLE_PDF_FILE_VIEWER |
749 DEFINE_string(pdfPath, "", "Path to direcotry of pdf files."); | 750 DEFINE_string(pdfPath, "", "Path to direcotry of pdf files."); |
750 #endif | 751 #endif |
751 | 752 |
752 #include "SkTaskGroup.h" | 753 #include "SkTaskGroup.h" |
753 | 754 |
754 SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
Manager) | 755 SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
Manager) |
755 : INHERITED(hwnd) | 756 : INHERITED(hwnd) |
756 , fDevManager(nullptr) { | 757 , fDevManager(nullptr) { |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 } | 1095 } |
1095 if (fMagnify && !fSaveToPdf) { | 1096 if (fMagnify && !fSaveToPdf) { |
1096 magnify(canvas); | 1097 magnify(canvas); |
1097 } | 1098 } |
1098 | 1099 |
1099 if (fMeasureFPS && fMeasureFPS_Time) { | 1100 if (fMeasureFPS && fMeasureFPS_Time) { |
1100 this->updateTitle(); | 1101 this->updateTitle(); |
1101 this->postInvalDelay(); | 1102 this->postInvalDelay(); |
1102 } | 1103 } |
1103 | 1104 |
1104 if (this->sendAnimatePulse()) { | 1105 if (this->sendAnimatePulse() || FLAGS_redraw) { |
1105 this->inval(nullptr); | 1106 this->inval(nullptr); |
1106 } | 1107 } |
1107 | 1108 |
1108 // do this last | 1109 // do this last |
1109 fDevManager->publishCanvas(fDeviceType, canvas, this); | 1110 fDevManager->publishCanvas(fDeviceType, canvas, this); |
1110 } | 1111 } |
1111 | 1112 |
1112 static float clipW = 200; | 1113 static float clipW = 200; |
1113 static float clipH = 200; | 1114 static float clipH = 200; |
1114 void SampleWindow::magnify(SkCanvas* canvas) { | 1115 void SampleWindow::magnify(SkCanvas* canvas) { |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2302 #ifdef SK_BUILD_FOR_MAC | 2303 #ifdef SK_BUILD_FOR_MAC |
2303 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2304 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2304 #endif | 2305 #endif |
2305 SkGraphics::Init(); | 2306 SkGraphics::Init(); |
2306 SkEvent::Init(); | 2307 SkEvent::Init(); |
2307 } | 2308 } |
2308 | 2309 |
2309 void application_term() { | 2310 void application_term() { |
2310 SkEvent::Term(); | 2311 SkEvent::Term(); |
2311 } | 2312 } |
OLD | NEW |