OLD | NEW |
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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 SK_DECLARE_INST_COUNT(SkTrackDevice) | 27 SK_DECLARE_INST_COUNT(SkTrackDevice) |
28 | 28 |
29 SkTrackDevice(const SkBitmap& bitmap) : SkBitmapDevice(bitmap) | 29 SkTrackDevice(const SkBitmap& bitmap) : SkBitmapDevice(bitmap) |
30 , fTracker(NULL) {} | 30 , fTracker(NULL) {} |
31 | 31 |
32 SkTrackDevice(const SkBitmap& bitmap, const SkDeviceProperties& deviceProper
ties) | 32 SkTrackDevice(const SkBitmap& bitmap, const SkDeviceProperties& deviceProper
ties) |
33 : SkBitmapDevice(bitmap, deviceProperties) | 33 : SkBitmapDevice(bitmap, deviceProperties) |
34 , fTracker(NULL) {} | 34 , fTracker(NULL) {} |
35 | 35 |
| 36 #ifdef SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG |
36 SkTrackDevice(SkBitmap::Config config, int width, int height, bool isOpaque
= false) | 37 SkTrackDevice(SkBitmap::Config config, int width, int height, bool isOpaque
= false) |
37 : SkBitmapDevice(config, width, height, isOpaque) | 38 : SkBitmapDevice(config, width, height, isOpaque) |
38 , fTracker(NULL) {} | 39 , fTracker(NULL) {} |
39 | 40 |
40 SkTrackDevice(SkBitmap::Config config, int width, int height, bool isOpaque, | 41 SkTrackDevice(SkBitmap::Config config, int width, int height, bool isOpaque, |
41 const SkDeviceProperties& deviceProperties) | 42 const SkDeviceProperties& deviceProperties) |
42 : SkBitmapDevice(config, width, height, isOpaque, deviceProperties) | 43 : SkBitmapDevice(config, width, height, isOpaque, deviceProperties) |
43 , fTracker(NULL) {} | 44 , fTracker(NULL) {} |
| 45 #endif |
44 | 46 |
45 virtual ~SkTrackDevice() {} | 47 virtual ~SkTrackDevice() {} |
46 | 48 |
47 // Install a tracker - we can reuse the tracker between multiple devices, an
d the state of the | 49 // Install a tracker - we can reuse the tracker between multiple devices, an
d the state of the |
48 // tracker is preserved - number and location of poinbts, ... | 50 // tracker is preserved - number and location of poinbts, ... |
49 void installTracker(SkTracker* tracker) { | 51 void installTracker(SkTracker* tracker) { |
50 fTracker = tracker; | 52 fTracker = tracker; |
51 fTracker->newFrame(); | 53 fTracker->newFrame(); |
52 } | 54 } |
53 | 55 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 182 } |
181 } | 183 } |
182 | 184 |
183 private: | 185 private: |
184 SkTracker* fTracker; | 186 SkTracker* fTracker; |
185 | 187 |
186 typedef SkBitmapDevice INHERITED; | 188 typedef SkBitmapDevice INHERITED; |
187 }; | 189 }; |
188 | 190 |
189 #endif // SkTrackDevice_DEFINED | 191 #endif // SkTrackDevice_DEFINED |
OLD | NEW |