| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
| 9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
| 10 | 10 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 this is for testing only */ | 347 this is for testing only */ |
| 348 void setTextBlobCacheLimit_ForTesting(size_t bytes); | 348 void setTextBlobCacheLimit_ForTesting(size_t bytes); |
| 349 | 349 |
| 350 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe
r below should be | 350 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe
r below should be |
| 351 to an array of 3 entries */ | 351 to an array of 3 entries */ |
| 352 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); | 352 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); |
| 353 | 353 |
| 354 /** Enumerates all cached GPU resources and dumps their memory to traceMemor
yDump. */ | 354 /** Enumerates all cached GPU resources and dumps their memory to traceMemor
yDump. */ |
| 355 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; | 355 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; |
| 356 | 356 |
| 357 /** Draw font cache texture to render target */ | 357 /** Get pointer to atlas texture for given mask format */ |
| 358 void drawFontCache(const SkRect& rect, GrMaskFormat format, const SkPaint& p
aint, | 358 GrTexture* getFontAtlasTexture(GrMaskFormat format); |
| 359 GrRenderTarget* target); | |
| 360 | 359 |
| 361 private: | 360 private: |
| 362 GrGpu* fGpu; | 361 GrGpu* fGpu; |
| 363 const GrCaps* fCaps; | 362 const GrCaps* fCaps; |
| 364 GrResourceCache* fResourceCache; | 363 GrResourceCache* fResourceCache; |
| 365 // this union exists because the inheritance of GrTextureProvider->GrResourc
eProvider | 364 // this union exists because the inheritance of GrTextureProvider->GrResourc
eProvider |
| 366 // is in a private header. | 365 // is in a private header. |
| 367 union { | 366 union { |
| 368 GrResourceProvider* fResourceProvider; | 367 GrResourceProvider* fResourceProvider; |
| 369 GrTextureProvider* fTextureProvider; | 368 GrTextureProvider* fTextureProvider; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 /** | 438 /** |
| 440 * A callback similar to the above for use by the TextBlobCache | 439 * A callback similar to the above for use by the TextBlobCache |
| 441 * TODO move textblob draw calls below context so we can use the call above. | 440 * TODO move textblob draw calls below context so we can use the call above. |
| 442 */ | 441 */ |
| 443 static void TextBlobCacheOverBudgetCB(void* data); | 442 static void TextBlobCacheOverBudgetCB(void* data); |
| 444 | 443 |
| 445 typedef SkRefCnt INHERITED; | 444 typedef SkRefCnt INHERITED; |
| 446 }; | 445 }; |
| 447 | 446 |
| 448 #endif | 447 #endif |
| OLD | NEW |