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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 fLCDState = SkOSMenu::kMixedState; | 928 fLCDState = SkOSMenu::kMixedState; |
929 fAAState = SkOSMenu::kMixedState; | 929 fAAState = SkOSMenu::kMixedState; |
930 fSubpixelState = SkOSMenu::kMixedState; | 930 fSubpixelState = SkOSMenu::kMixedState; |
931 fHintingState = 0; | 931 fHintingState = 0; |
932 fPixelGeometryIndex = 0; | 932 fPixelGeometryIndex = 0; |
933 fFilterQualityIndex = 0; | 933 fFilterQualityIndex = 0; |
934 fFlipAxis = 0; | 934 fFlipAxis = 0; |
935 | 935 |
936 fMouseX = fMouseY = 0; | 936 fMouseX = fMouseY = 0; |
937 fFatBitsScale = 8; | 937 fFatBitsScale = 8; |
938 fTypeface = SkTypeface::CreateFromTypeface(nullptr, SkTypeface::kBold); | 938 fTypeface = SkTypeface::MakeFromTypeface(nullptr, SkTypeface::kBold); |
939 fShowZoomer = false; | 939 fShowZoomer = false; |
940 | 940 |
941 fZoomLevel = 0; | 941 fZoomLevel = 0; |
942 fZoomScale = SK_Scalar1; | 942 fZoomScale = SK_Scalar1; |
943 fOffset = { 0, 0 }; | 943 fOffset = { 0, 0 }; |
944 | 944 |
945 fMagnify = false; | 945 fMagnify = false; |
946 | 946 |
947 fSaveToPdf = false; | 947 fSaveToPdf = false; |
948 fSaveToSKP = false; | 948 fSaveToSKP = false; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 // can't call this synchronously, since it may require a subclass to | 1054 // can't call this synchronously, since it may require a subclass to |
1055 // to implement, or the caller may need us to have returned from the | 1055 // to implement, or the caller may need us to have returned from the |
1056 // constructor first. Hence we post an event to ourselves. | 1056 // constructor first. Hence we post an event to ourselves. |
1057 // this->updateTitle(); | 1057 // this->updateTitle(); |
1058 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this); | 1058 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this); |
1059 | 1059 |
1060 gAnimTimer.run(); | 1060 gAnimTimer.run(); |
1061 } | 1061 } |
1062 | 1062 |
1063 SampleWindow::~SampleWindow() { | 1063 SampleWindow::~SampleWindow() { |
1064 SkSafeUnref(fTypeface); | |
1065 SkSafeUnref(fDevManager); | 1064 SkSafeUnref(fDevManager); |
1066 } | 1065 } |
1067 | 1066 |
1068 | 1067 |
1069 int SampleWindow::findByTitle(const char title[]) { | 1068 int SampleWindow::findByTitle(const char title[]) { |
1070 int i, count = fSamples.count(); | 1069 int i, count = fSamples.count(); |
1071 for (i = 0; i < count; i++) { | 1070 for (i = 0; i < count; i++) { |
1072 if (getSampleTitle(i).equals(title)) { | 1071 if (getSampleTitle(i).equals(title)) { |
1073 return i; | 1072 return i; |
1074 } | 1073 } |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2425 #ifdef SK_BUILD_FOR_MAC | 2424 #ifdef SK_BUILD_FOR_MAC |
2426 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2425 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2427 #endif | 2426 #endif |
2428 SkGraphics::Init(); | 2427 SkGraphics::Init(); |
2429 SkEvent::Init(); | 2428 SkEvent::Init(); |
2430 } | 2429 } |
2431 | 2430 |
2432 void application_term() { | 2431 void application_term() { |
2433 SkEvent::Term(); | 2432 SkEvent::Term(); |
2434 } | 2433 } |
OLD | NEW |