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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 fLCDState = SkOSMenu::kMixedState; | 908 fLCDState = SkOSMenu::kMixedState; |
909 fAAState = SkOSMenu::kMixedState; | 909 fAAState = SkOSMenu::kMixedState; |
910 fSubpixelState = SkOSMenu::kMixedState; | 910 fSubpixelState = SkOSMenu::kMixedState; |
911 fHintingState = 0; | 911 fHintingState = 0; |
912 fPixelGeometryIndex = 0; | 912 fPixelGeometryIndex = 0; |
913 fFilterQualityIndex = 0; | 913 fFilterQualityIndex = 0; |
914 fFlipAxis = 0; | 914 fFlipAxis = 0; |
915 | 915 |
916 fMouseX = fMouseY = 0; | 916 fMouseX = fMouseY = 0; |
917 fFatBitsScale = 8; | 917 fFatBitsScale = 8; |
918 fTypeface = SkTypeface::CreateFromTypeface(nullptr, SkTypeface::kBold); | 918 fTypeface = SkTypeface::MakeFromTypeface(nullptr, SkTypeface::kBold); |
919 fShowZoomer = false; | 919 fShowZoomer = false; |
920 | 920 |
921 fZoomLevel = 0; | 921 fZoomLevel = 0; |
922 fZoomScale = SK_Scalar1; | 922 fZoomScale = SK_Scalar1; |
923 fOffset = { 0, 0 }; | 923 fOffset = { 0, 0 }; |
924 | 924 |
925 fMagnify = false; | 925 fMagnify = false; |
926 | 926 |
927 fSaveToPdf = false; | 927 fSaveToPdf = false; |
928 fSaveToSKP = false; | 928 fSaveToSKP = false; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 // can't call this synchronously, since it may require a subclass to | 1034 // can't call this synchronously, since it may require a subclass to |
1035 // to implement, or the caller may need us to have returned from the | 1035 // to implement, or the caller may need us to have returned from the |
1036 // constructor first. Hence we post an event to ourselves. | 1036 // constructor first. Hence we post an event to ourselves. |
1037 // this->updateTitle(); | 1037 // this->updateTitle(); |
1038 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this); | 1038 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this); |
1039 | 1039 |
1040 gAnimTimer.run(); | 1040 gAnimTimer.run(); |
1041 } | 1041 } |
1042 | 1042 |
1043 SampleWindow::~SampleWindow() { | 1043 SampleWindow::~SampleWindow() { |
1044 SkSafeUnref(fTypeface); | |
1045 SkSafeUnref(fDevManager); | 1044 SkSafeUnref(fDevManager); |
1046 } | 1045 } |
1047 | 1046 |
1048 | 1047 |
1049 int SampleWindow::findByTitle(const char title[]) { | 1048 int SampleWindow::findByTitle(const char title[]) { |
1050 int i, count = fSamples.count(); | 1049 int i, count = fSamples.count(); |
1051 for (i = 0; i < count; i++) { | 1050 for (i = 0; i < count; i++) { |
1052 if (getSampleTitle(i).equals(title)) { | 1051 if (getSampleTitle(i).equals(title)) { |
1053 return i; | 1052 return i; |
1054 } | 1053 } |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 #ifdef SK_BUILD_FOR_MAC | 2400 #ifdef SK_BUILD_FOR_MAC |
2402 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2401 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2403 #endif | 2402 #endif |
2404 SkGraphics::Init(); | 2403 SkGraphics::Init(); |
2405 SkEvent::Init(); | 2404 SkEvent::Init(); |
2406 } | 2405 } |
2407 | 2406 |
2408 void application_term() { | 2407 void application_term() { |
2409 SkEvent::Term(); | 2408 SkEvent::Term(); |
2410 } | 2409 } |
OLD | NEW |