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

Side by Side Diff: experimental/PdfViewer/SkTrackDevice.h

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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 | « experimental/PdfViewer/SkNulCanvas.h ('k') | gm/gm_expectations.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 #ifndef SkTrackDevice_DEFINED 8 #ifndef SkTrackDevice_DEFINED
9 #define SkTrackDevice_DEFINED 9 #define SkTrackDevice_DEFINED
10 10
11 #include "SkBitmapDevice.h" 11 #include "SkBitmapDevice.h"
12 #include "SkTracker.h" 12 #include "SkTracker.h"
13 13
14 /** \class SkTrackDevice 14 /** \class SkTrackDevice
15 * 15 *
16 * A Track Device is used to track the callstack of an operation that affected some pixels. 16 * A Track Device is used to track the callstack of an operation that affected some pixels.
17 * It can be used with SampleApp to investigate bugs (CL not checked in yet). 17 * It can be used with SampleApp to investigate bugs (CL not checked in yet).
18 * 18 *
19 * every drawFoo is implemented as such: 19 * every drawFoo is implemented as such:
20 * before(); // - collects state of interesting pixels 20 * before(); // - collects state of interesting pixels
21 * INHERITED::drawFoo(...); 21 * INHERITED::drawFoo(...);
22 * after(); // - checks if pixels of interest, and issue a breakpoint. 22 * after(); // - checks if pixels of interest, and issue a breakpoint.
23 * 23 *
24 */ 24 */
25 // TODO: can this be derived from SkBaseDevice instead? 25 // TODO: can this be derived from SkBaseDevice instead?
26 class SkTrackDevice : public SkBitmapDevice { 26 class SkTrackDevice : public SkBitmapDevice {
27 public: 27 public:
28 SK_DECLARE_INST_COUNT(SkTrackDevice)
29
30 SkTrackDevice(const SkBitmap& bitmap) 28 SkTrackDevice(const SkBitmap& bitmap)
31 : INHERITED(bitmap, SkSurfaceProps(0, kUnknown_SkPixelGeometry)) 29 : INHERITED(bitmap, SkSurfaceProps(0, kUnknown_SkPixelGeometry))
32 , fTracker(NULL) { 30 , fTracker(NULL) {
33 } 31 }
34 32
35 virtual ~SkTrackDevice() {} 33 virtual ~SkTrackDevice() {}
36 34
37 // Install a tracker - we can reuse the tracker between multiple devices, an d the state of the 35 // Install a tracker - we can reuse the tracker between multiple devices, an d the state of the
38 // tracker is preserved - number and location of poinbts, ... 36 // tracker is preserved - number and location of poinbts, ...
39 void installTracker(SkTracker* tracker) { 37 void installTracker(SkTracker* tracker) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 170 }
173 } 171 }
174 172
175 private: 173 private:
176 SkTracker* fTracker; 174 SkTracker* fTracker;
177 175
178 typedef SkBitmapDevice INHERITED; 176 typedef SkBitmapDevice INHERITED;
179 }; 177 };
180 178
181 #endif // SkTrackDevice_DEFINED 179 #endif // SkTrackDevice_DEFINED
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkNulCanvas.h ('k') | gm/gm_expectations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698