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

Side by Side Diff: samplecode/SampleApp.h

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More cleanup 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 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 * SampleApp ports can subclass this manager class if they want to: 67 * SampleApp ports can subclass this manager class if they want to:
68 * * filter the types of devices supported 68 * * filter the types of devices supported
69 * * customize plugging of SkBaseDevice objects into an SkCanvas 69 * * customize plugging of SkBaseDevice objects into an SkCanvas
70 * * customize publishing the results of draw to the OS window 70 * * customize publishing the results of draw to the OS window
71 * * manage GrContext / GrRenderTarget lifetimes 71 * * manage GrContext / GrRenderTarget lifetimes
72 */ 72 */
73 class DeviceManager : public SkRefCnt { 73 class DeviceManager : public SkRefCnt {
74 public: 74 public:
75 75
76 76
77 virtual void setUpBackend(SampleWindow* win, int msaaSampleCount) = 0; 77 virtual void setUpBackend(SampleWindow* win, int msaaSampleCount, bool t enBitColor) = 0;
78 78
79 virtual void tearDownBackend(SampleWindow* win) = 0; 79 virtual void tearDownBackend(SampleWindow* win) = 0;
80 80
81 // called before drawing. should install correct device 81 // called before drawing. should install correct device
82 // type on the canvas. Will skip drawing if returns false. 82 // type on the canvas. Will skip drawing if returns false.
83 virtual SkSurface* createSurface(DeviceType dType, SampleWindow* win) = 0; 83 virtual SkSurface* createSurface(DeviceType dType, SampleWindow* win) = 0;
84 84
85 // called after drawing, should get the results onto the 85 // called after drawing, should get the results onto the
86 // screen. 86 // screen.
87 virtual void publishCanvas(DeviceType dType, 87 virtual void publishCanvas(DeviceType dType,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 SkOSMenu::TriState fLCDState; 206 SkOSMenu::TriState fLCDState;
207 SkOSMenu::TriState fAAState; 207 SkOSMenu::TriState fAAState;
208 SkOSMenu::TriState fSubpixelState; 208 SkOSMenu::TriState fSubpixelState;
209 int fHintingState; 209 int fHintingState;
210 int fPixelGeometryIndex; 210 int fPixelGeometryIndex;
211 int fFilterQualityIndex; 211 int fFilterQualityIndex;
212 unsigned fFlipAxis; 212 unsigned fFlipAxis;
213 213
214 int fMSAASampleCount; 214 int fMSAASampleCount;
215 bool fTenBitColor;
215 216
216 SkScalar fZoomCenterX, fZoomCenterY; 217 SkScalar fZoomCenterX, fZoomCenterY;
217 218
218 //Stores global settings 219 //Stores global settings
219 SkOSMenu* fAppMenu; // We pass ownership to SkWindow, when we call addMenu 220 SkOSMenu* fAppMenu; // We pass ownership to SkWindow, when we call addMenu
220 //Stores slide specific settings 221 //Stores slide specific settings
221 SkOSMenu* fSlideMenu; // We pass ownership to SkWindow, when we call addMenu 222 SkOSMenu* fSlideMenu; // We pass ownership to SkWindow, when we call addMenu
222 223
223 void loadView(SkView*); 224 void loadView(SkView*);
224 void updateTitle(); 225 void updateTitle();
225 bool getRawTitle(SkString*); 226 bool getRawTitle(SkString*);
226 227
227 bool zoomIn(); 228 bool zoomIn();
228 bool zoomOut(); 229 bool zoomOut();
229 void updatePointer(int x, int y); 230 void updatePointer(int x, int y);
230 void magnify(SkCanvas* canvas); 231 void magnify(SkCanvas* canvas);
231 void showZoomer(SkCanvas* canvas); 232 void showZoomer(SkCanvas* canvas);
232 void updateMatrix(); 233 void updateMatrix();
233 void postAnimatingEvent(); 234 void postAnimatingEvent();
234 int findByTitle(const char*); 235 int findByTitle(const char*);
235 void listTitles(); 236 void listTitles();
236 SkSize tileSize() const; 237 SkSize tileSize() const;
237 bool sendAnimatePulse(); 238 bool sendAnimatePulse();
238 239
239 typedef SkOSWindow INHERITED; 240 typedef SkOSWindow INHERITED;
240 }; 241 };
241 242
242 #endif 243 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698