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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 1974783002: Revert of Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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
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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::MakeFromTypeface(nullptr, SkTypeface::kBold); 938 fTypeface = SkTypeface::CreateFromTypeface(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
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);
1064 SkSafeUnref(fDevManager); 1065 SkSafeUnref(fDevManager);
1065 } 1066 }
1066 1067
1067 1068
1068 int SampleWindow::findByTitle(const char title[]) { 1069 int SampleWindow::findByTitle(const char title[]) {
1069 int i, count = fSamples.count(); 1070 int i, count = fSamples.count();
1070 for (i = 0; i < count; i++) { 1071 for (i = 0; i < count; i++) {
1071 if (getSampleTitle(i).equals(title)) { 1072 if (getSampleTitle(i).equals(title)) {
1072 return i; 1073 return i;
1073 } 1074 }
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 #ifdef SK_BUILD_FOR_MAC 2425 #ifdef SK_BUILD_FOR_MAC
2425 setenv("ANDROID_ROOT", "/android/device/data", 0); 2426 setenv("ANDROID_ROOT", "/android/device/data", 0);
2426 #endif 2427 #endif
2427 SkGraphics::Init(); 2428 SkGraphics::Init();
2428 SkEvent::Init(); 2429 SkEvent::Init();
2429 } 2430 }
2430 2431
2431 void application_term() { 2432 void application_term() {
2432 SkEvent::Term(); 2433 SkEvent::Term();
2433 } 2434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698