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

Side by Side Diff: samplecode/SampleApp.h

Issue 1177323002: Use SkPaintFilterCanvas for SampleApp paint filtering (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review comments Created 5 years, 6 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') | no next file with comments »
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 protected: 139 protected:
140 void onDraw(SkCanvas* canvas) override; 140 void onDraw(SkCanvas* canvas) override;
141 bool onHandleKey(SkKey key) override; 141 bool onHandleKey(SkKey key) override;
142 bool onHandleChar(SkUnichar) override; 142 bool onHandleChar(SkUnichar) override;
143 void onSizeChange() override; 143 void onSizeChange() override;
144 144
145 SkCanvas* beforeChildren(SkCanvas*) override; 145 SkCanvas* beforeChildren(SkCanvas*) override;
146 void afterChildren(SkCanvas*) override; 146 void afterChildren(SkCanvas*) override;
147 void beforeChild(SkView* child, SkCanvas* canvas) override; 147 void beforeChild(SkView* child, SkCanvas* canvas) override;
148 void afterChild(SkView* child, SkCanvas* canvas) override;
149 148
150 bool onEvent(const SkEvent& evt) override; 149 bool onEvent(const SkEvent& evt) override;
151 bool onQuery(SkEvent* evt) override; 150 bool onQuery(SkEvent* evt) override;
152 151
153 virtual bool onDispatchClick(int x, int y, Click::State, void* owner, 152 virtual bool onDispatchClick(int x, int y, Click::State, void* owner,
154 unsigned modi) override; 153 unsigned modi) override;
155 bool onClick(Click* click) override; 154 bool onClick(Click* click) override;
156 virtual Click* onFindClickHandler(SkScalar x, SkScalar y, 155 virtual Click* onFindClickHandler(SkScalar x, SkScalar y,
157 unsigned modi) override; 156 unsigned modi) override;
158 157
159 private: 158 private:
160 class DefaultDeviceManager; 159 class DefaultDeviceManager;
161 160
162 int fCurrIndex; 161 int fCurrIndex;
163 162
164 SkPictureRecorder fRecorder; 163 SkPictureRecorder fRecorder;
165 SkAutoTDelete<SkSurface> fDeferredSurface; 164 SkAutoTDelete<SkSurface> fDeferredSurface;
166 SkAutoTDelete<SkDeferredCanvas> fDeferredCanvas; 165 SkAutoTDelete<SkDeferredCanvas> fDeferredCanvas;
166 SkAutoTDelete<SkCanvas> fFlagsFilterCanvas;
167 SkPath fClipPath; 167 SkPath fClipPath;
168 168
169 SkTouchGesture fGesture; 169 SkTouchGesture fGesture;
170 SkScalar fZoomLevel; 170 SkScalar fZoomLevel;
171 SkScalar fZoomScale; 171 SkScalar fZoomScale;
172 172
173 DeviceType fDeviceType; 173 DeviceType fDeviceType;
174 DeviceManager* fDevManager; 174 DeviceManager* fDevManager;
175 175
176 bool fSaveToPdf; 176 bool fSaveToPdf;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void updateTitle(); 225 void updateTitle();
226 bool getRawTitle(SkString*); 226 bool getRawTitle(SkString*);
227 227
228 bool zoomIn(); 228 bool zoomIn();
229 bool zoomOut(); 229 bool zoomOut();
230 void updatePointer(int x, int y); 230 void updatePointer(int x, int y);
231 void magnify(SkCanvas* canvas); 231 void magnify(SkCanvas* canvas);
232 void showZoomer(SkCanvas* canvas); 232 void showZoomer(SkCanvas* canvas);
233 void updateMatrix(); 233 void updateMatrix();
234 void postAnimatingEvent(); 234 void postAnimatingEvent();
235 void installDrawFilter(SkCanvas*);
236 int findByTitle(const char*); 235 int findByTitle(const char*);
237 void listTitles(); 236 void listTitles();
238 SkSize tileSize() const; 237 SkSize tileSize() const;
239 bool sendAnimatePulse(); 238 bool sendAnimatePulse();
240 239
241 typedef SkOSWindow INHERITED; 240 typedef SkOSWindow INHERITED;
242 }; 241 };
243 242
244 #endif 243 #endif
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698