| 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 | |
| 37 SkTrackDevice(SkBitmap::Config config, int width, int height, bool isOpaque
= false) | |
| 38 : SkBitmapDevice(config, width, height, isOpaque) | |
| 39 , fTracker(NULL) {} | |
| 40 | |
| 41 SkTrackDevice(SkBitmap::Config config, int width, int height, bool isOpaque, | |
| 42 const SkDeviceProperties& deviceProperties) | |
| 43 : SkBitmapDevice(config, width, height, isOpaque, deviceProperties) | |
| 44 , fTracker(NULL) {} | |
| 45 #endif | |
| 46 | |
| 47 virtual ~SkTrackDevice() {} | 36 virtual ~SkTrackDevice() {} |
| 48 | 37 |
| 49 // Install a tracker - we can reuse the tracker between multiple devices, an
d the state of the | 38 // Install a tracker - we can reuse the tracker between multiple devices, an
d the state of the |
| 50 // tracker is preserved - number and location of poinbts, ... | 39 // tracker is preserved - number and location of poinbts, ... |
| 51 void installTracker(SkTracker* tracker) { | 40 void installTracker(SkTracker* tracker) { |
| 52 fTracker = tracker; | 41 fTracker = tracker; |
| 53 fTracker->newFrame(); | 42 fTracker->newFrame(); |
| 54 } | 43 } |
| 55 | 44 |
| 56 protected: | 45 protected: |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } | 171 } |
| 183 } | 172 } |
| 184 | 173 |
| 185 private: | 174 private: |
| 186 SkTracker* fTracker; | 175 SkTracker* fTracker; |
| 187 | 176 |
| 188 typedef SkBitmapDevice INHERITED; | 177 typedef SkBitmapDevice INHERITED; |
| 189 }; | 178 }; |
| 190 | 179 |
| 191 #endif // SkTrackDevice_DEFINED | 180 #endif // SkTrackDevice_DEFINED |
| OLD | NEW |