| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Skia | 2 * Copyright 2011 Skia |
| 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 #ifndef SampleApp_DEFINED | 8 #ifndef SampleApp_DEFINED |
| 9 #define SampleApp_DEFINED | 9 #define SampleApp_DEFINED |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 void toggleRendering(); | 122 void toggleRendering(); |
| 123 void toggleSlideshow(); | 123 void toggleSlideshow(); |
| 124 void toggleFPS(); | 124 void toggleFPS(); |
| 125 void showOverview(); | 125 void showOverview(); |
| 126 void toggleDistanceFieldFonts(); | 126 void toggleDistanceFieldFonts(); |
| 127 | 127 |
| 128 GrContext* getGrContext() const { return fDevManager->getGrContext(); } | 128 GrContext* getGrContext() const { return fDevManager->getGrContext(); } |
| 129 | 129 |
| 130 void setZoomCenter(float x, float y); | 130 void setZoomCenter(float x, float y); |
| 131 void changeZoomLevel(float delta); | 131 void changeZoomLevel(float delta); |
| 132 void changeOffset(SkVector delta); |
| 132 bool nextSample(); | 133 bool nextSample(); |
| 133 bool previousSample(); | 134 bool previousSample(); |
| 134 bool goToSample(int i); | 135 bool goToSample(int i); |
| 135 SkString getSampleTitle(int i); | 136 SkString getSampleTitle(int i); |
| 136 int sampleCount(); | 137 int sampleCount(); |
| 137 bool handleTouch(int ownerId, float x, float y, | 138 bool handleTouch(int ownerId, float x, float y, |
| 138 SkView::Click::State state); | 139 SkView::Click::State state); |
| 139 void saveToPdf(); | 140 void saveToPdf(); |
| 140 void postInvalDelay(); | 141 void postInvalDelay(); |
| 141 | 142 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 165 | 166 |
| 166 int fCurrIndex; | 167 int fCurrIndex; |
| 167 | 168 |
| 168 SkPictureRecorder fRecorder; | 169 SkPictureRecorder fRecorder; |
| 169 SkAutoTDelete<SkCanvas> fFlagsFilterCanvas; | 170 SkAutoTDelete<SkCanvas> fFlagsFilterCanvas; |
| 170 SkPath fClipPath; | 171 SkPath fClipPath; |
| 171 | 172 |
| 172 SkTouchGesture fGesture; | 173 SkTouchGesture fGesture; |
| 173 SkScalar fZoomLevel; | 174 SkScalar fZoomLevel; |
| 174 SkScalar fZoomScale; | 175 SkScalar fZoomScale; |
| 176 SkVector fOffset; |
| 175 | 177 |
| 176 DeviceType fDeviceType; | 178 DeviceType fDeviceType; |
| 177 DeviceManager* fDevManager; | 179 DeviceManager* fDevManager; |
| 178 | 180 |
| 179 bool fSaveToPdf; | 181 bool fSaveToPdf; |
| 180 bool fSaveToSKP; | 182 bool fSaveToSKP; |
| 181 SkAutoTUnref<SkDocument> fPDFDocument; | 183 SkAutoTUnref<SkDocument> fPDFDocument; |
| 182 | 184 |
| 183 bool fUseClip; | 185 bool fUseClip; |
| 184 bool fUsePicture; | 186 bool fUsePicture; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 202 | 204 |
| 203 SkOSMenu::TriState fLCDState; | 205 SkOSMenu::TriState fLCDState; |
| 204 SkOSMenu::TriState fAAState; | 206 SkOSMenu::TriState fAAState; |
| 205 SkOSMenu::TriState fSubpixelState; | 207 SkOSMenu::TriState fSubpixelState; |
| 206 int fHintingState; | 208 int fHintingState; |
| 207 int fFilterQualityIndex; | 209 int fFilterQualityIndex; |
| 208 unsigned fFlipAxis; | 210 unsigned fFlipAxis; |
| 209 | 211 |
| 210 int fMSAASampleCount; | 212 int fMSAASampleCount; |
| 211 | 213 |
| 212 int fScrollTestX, fScrollTestY; | |
| 213 SkScalar fZoomCenterX, fZoomCenterY; | 214 SkScalar fZoomCenterX, fZoomCenterY; |
| 214 | 215 |
| 215 //Stores global settings | 216 //Stores global settings |
| 216 SkOSMenu* fAppMenu; // We pass ownership to SkWindow, when we call addMenu | 217 SkOSMenu* fAppMenu; // We pass ownership to SkWindow, when we call addMenu |
| 217 //Stores slide specific settings | 218 //Stores slide specific settings |
| 218 SkOSMenu* fSlideMenu; // We pass ownership to SkWindow, when we call addMenu | 219 SkOSMenu* fSlideMenu; // We pass ownership to SkWindow, when we call addMenu |
| 219 | 220 |
| 220 void loadView(SkView*); | 221 void loadView(SkView*); |
| 221 void updateTitle(); | 222 void updateTitle(); |
| 222 bool getRawTitle(SkString*); | 223 bool getRawTitle(SkString*); |
| 223 | 224 |
| 224 bool zoomIn(); | 225 bool zoomIn(); |
| 225 bool zoomOut(); | 226 bool zoomOut(); |
| 226 void updatePointer(int x, int y); | 227 void updatePointer(int x, int y); |
| 227 void magnify(SkCanvas* canvas); | 228 void magnify(SkCanvas* canvas); |
| 228 void showZoomer(SkCanvas* canvas); | 229 void showZoomer(SkCanvas* canvas); |
| 229 void updateMatrix(); | 230 void updateMatrix(); |
| 230 void postAnimatingEvent(); | 231 void postAnimatingEvent(); |
| 231 int findByTitle(const char*); | 232 int findByTitle(const char*); |
| 232 void listTitles(); | 233 void listTitles(); |
| 233 SkSize tileSize() const; | 234 SkSize tileSize() const; |
| 234 bool sendAnimatePulse(); | 235 bool sendAnimatePulse(); |
| 235 | 236 |
| 236 typedef SkOSWindow INHERITED; | 237 typedef SkOSWindow INHERITED; |
| 237 }; | 238 }; |
| 238 | 239 |
| 239 #endif | 240 #endif |
| OLD | NEW |