Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
| 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 SkDevice_DEFINED | 8 #ifndef SkDevice_DEFINED |
| 9 #define SkDevice_DEFINED | 9 #define SkDevice_DEFINED |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 * possibly from SkCanvas' dtor. | 110 * possibly from SkCanvas' dtor. |
| 111 */ | 111 */ |
| 112 virtual void onDetachFromCanvas() { | 112 virtual void onDetachFromCanvas() { |
| 113 SkASSERT(fAttachedToCanvas); | 113 SkASSERT(fAttachedToCanvas); |
| 114 this->unlockPixels(); | 114 this->unlockPixels(); |
| 115 #ifdef SK_DEBUG | 115 #ifdef SK_DEBUG |
| 116 fAttachedToCanvas = false; | 116 fAttachedToCanvas = false; |
| 117 #endif | 117 #endif |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 bool shouldDisableLCD(const SkPaint&) const; | |
| 121 | |
| 122 protected: | 120 protected: |
| 123 enum Usage { | 121 enum Usage { |
| 124 kGeneral_Usage, | 122 kGeneral_Usage, |
| 125 kSaveLayer_Usage, // <! internal use only | 123 kSaveLayer_Usage, // <! internal use only |
| 126 kImageFilter_Usage // <! internal use only | 124 kImageFilter_Usage // <! internal use only |
| 127 }; | 125 }; |
| 128 | 126 |
| 129 struct TextFlags { | 127 struct TextFlags { |
| 130 uint32_t fFlags; // SkPaint::getFlags() | 128 uint32_t fFlags; // SkPaint::getFlags() |
| 131 }; | 129 }; |
| 132 | 130 |
| 131 uint32_t filterTextFlags(const SkPaint&) const; | |
|
reed1
2014/11/13 21:47:36
// Returns the text-related flags, possibly modifi
| |
| 132 | |
| 133 virtual bool onShouldDisableLCD(const SkPaint&) const { return false; } | 133 virtual bool onShouldDisableLCD(const SkPaint&) const { return false; } |
| 134 | 134 |
| 135 /** | 135 /** |
| 136 * | 136 * |
| 137 * DEPRECATED: This will be removed in a future change. Device subclasses | 137 * DEPRECATED: This will be removed in a future change. Device subclasses |
| 138 * should use the matrix and clip from the SkDraw passed to draw functions. | 138 * should use the matrix and clip from the SkDraw passed to draw functions. |
| 139 * | 139 * |
| 140 * Called with the correct matrix and clip before this device is drawn | 140 * Called with the correct matrix and clip before this device is drawn |
| 141 * to using those settings. If your subclass overrides this, be sure to | 141 * to using those settings. If your subclass overrides this, be sure to |
| 142 * call through to the base class as well. | 142 * call through to the base class as well. |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 SkDeviceProperties* fLeakyProperties; // will always exist. | 387 SkDeviceProperties* fLeakyProperties; // will always exist. |
| 388 | 388 |
| 389 #ifdef SK_DEBUG | 389 #ifdef SK_DEBUG |
| 390 bool fAttachedToCanvas; | 390 bool fAttachedToCanvas; |
| 391 #endif | 391 #endif |
| 392 | 392 |
| 393 typedef SkRefCnt INHERITED; | 393 typedef SkRefCnt INHERITED; |
| 394 }; | 394 }; |
| 395 | 395 |
| 396 #endif | 396 #endif |
| OLD | NEW |