| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be found
in the LICENSE file. | 4 * Use of this source code is governed by a BSD-style license that can be found
in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef SkGlyphCache_DEFINED | 7 #ifndef SkGlyphCache_DEFINED |
| 8 #define SkGlyphCache_DEFINED | 8 #define SkGlyphCache_DEFINED |
| 9 | 9 |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // used to track (approx) how much ram is tied-up in this cache | 270 // used to track (approx) how much ram is tied-up in this cache |
| 271 size_t fMemoryUsed; | 271 size_t fMemoryUsed; |
| 272 | 272 |
| 273 AuxProcRec* fAuxProcList; | 273 AuxProcRec* fAuxProcList; |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 class SkAutoGlyphCache : public std::unique_ptr<SkGlyphCache, SkGlyphCache::Atta
chCacheFunctor> { | 276 class SkAutoGlyphCache : public std::unique_ptr<SkGlyphCache, SkGlyphCache::Atta
chCacheFunctor> { |
| 277 public: | 277 public: |
| 278 /** deprecated: use get() */ | 278 /** deprecated: use get() */ |
| 279 SkGlyphCache* getCache() const { return this->get(); } | 279 SkGlyphCache* getCache() const { return this->get(); } |
| 280 | 280 SkAutoGlyphCache() {} |
| 281 SkAutoGlyphCache(SkGlyphCache* cache) : INHERITED(cache) {} | 281 SkAutoGlyphCache(SkGlyphCache* cache) : INHERITED(cache) {} |
| 282 SkAutoGlyphCache(SkTypeface* typeface, const SkScalerContextEffects& effects
, | 282 SkAutoGlyphCache(SkTypeface* typeface, const SkScalerContextEffects& effects
, |
| 283 const SkDescriptor* desc) | 283 const SkDescriptor* desc) |
| 284 : INHERITED(SkGlyphCache::DetachCache(typeface, effects, desc)) | 284 : INHERITED(SkGlyphCache::DetachCache(typeface, effects, desc)) |
| 285 {} | 285 {} |
| 286 /** deprecated: always enables fake gamma */ | 286 /** deprecated: always enables fake gamma */ |
| 287 SkAutoGlyphCache(const SkPaint& paint, | 287 SkAutoGlyphCache(const SkPaint& paint, |
| 288 const SkSurfaceProps* surfaceProps, | 288 const SkSurfaceProps* surfaceProps, |
| 289 const SkMatrix* matrix) | 289 const SkMatrix* matrix) |
| 290 : INHERITED(paint.detachCache(surfaceProps, | 290 : INHERITED(paint.detachCache(surfaceProps, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 306 SkAutoGlyphCacheNoGamma(const SkPaint& paint, | 306 SkAutoGlyphCacheNoGamma(const SkPaint& paint, |
| 307 const SkSurfaceProps* surfaceProps, | 307 const SkSurfaceProps* surfaceProps, |
| 308 const SkMatrix* matrix) | 308 const SkMatrix* matrix) |
| 309 : SkAutoGlyphCache(paint, surfaceProps, SkPaint::kNone_ScalerContextFlag
s, matrix) | 309 : SkAutoGlyphCache(paint, surfaceProps, SkPaint::kNone_ScalerContextFlag
s, matrix) |
| 310 {} | 310 {} |
| 311 }; | 311 }; |
| 312 #define SkAutoGlyphCache(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCache) | 312 #define SkAutoGlyphCache(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCache) |
| 313 #define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamm
a) | 313 #define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamm
a) |
| 314 | 314 |
| 315 #endif | 315 #endif |
| OLD | NEW |