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

Side by Side Diff: samplecode/SampleApp.h

Issue 1763833002: Force tiles in SampleApp to integer boundaries. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | samplecode/SampleApp.cpp » ('j') | samplecode/SampleApp.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleApp.cpp » ('j') | samplecode/SampleApp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698