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 25 matching lines...) Expand all Loading... |
36 class GrResourceEntry; | 36 class GrResourceEntry; |
37 class GrResourceCache; | 37 class GrResourceCache; |
38 class GrResourceProvider; | 38 class GrResourceProvider; |
39 class GrTestTarget; | 39 class GrTestTarget; |
40 class GrTextBlobCache; | 40 class GrTextBlobCache; |
41 class GrTextContext; | 41 class GrTextContext; |
42 class GrTextureParams; | 42 class GrTextureParams; |
43 class GrVertexBuffer; | 43 class GrVertexBuffer; |
44 class GrStrokeInfo; | 44 class GrStrokeInfo; |
45 class GrSoftwarePathRenderer; | 45 class GrSoftwarePathRenderer; |
| 46 class SkTraceMemoryDump; |
46 | 47 |
47 class SK_API GrContext : public SkRefCnt { | 48 class SK_API GrContext : public SkRefCnt { |
48 public: | 49 public: |
49 /** | 50 /** |
50 * Creates a GrContext for a backend context. | 51 * Creates a GrContext for a backend context. |
51 */ | 52 */ |
52 static GrContext* Create(GrBackend, GrBackendContext, const GrContextOptions
& options); | 53 static GrContext* Create(GrBackend, GrBackendContext, const GrContextOptions
& options); |
53 static GrContext* Create(GrBackend, GrBackendContext); | 54 static GrContext* Create(GrBackend, GrBackendContext); |
54 | 55 |
55 /** | 56 /** |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 void printGpuStats() const; | 352 void printGpuStats() const; |
352 | 353 |
353 /** Specify the TextBlob cache limit. If the current cache exceeds this limi
t it will purge. | 354 /** Specify the TextBlob cache limit. If the current cache exceeds this limi
t it will purge. |
354 this is for testing only */ | 355 this is for testing only */ |
355 void setTextBlobCacheLimit_ForTesting(size_t bytes); | 356 void setTextBlobCacheLimit_ForTesting(size_t bytes); |
356 | 357 |
357 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe
r below should be | 358 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe
r below should be |
358 to an array of 3 entries */ | 359 to an array of 3 entries */ |
359 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); | 360 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); |
360 | 361 |
| 362 /** Enumerates all cached GPU resources and dumps their memory to traceMemor
yDump. */ |
| 363 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; |
| 364 |
361 private: | 365 private: |
362 GrGpu* fGpu; | 366 GrGpu* fGpu; |
363 const GrCaps* fCaps; | 367 const GrCaps* fCaps; |
364 GrResourceCache* fResourceCache; | 368 GrResourceCache* fResourceCache; |
365 // this union exists because the inheritance of GrTextureProvider->GrResourc
eProvider | 369 // this union exists because the inheritance of GrTextureProvider->GrResourc
eProvider |
366 // is in a private header. | 370 // is in a private header. |
367 union { | 371 union { |
368 GrResourceProvider* fResourceProvider; | 372 GrResourceProvider* fResourceProvider; |
369 GrTextureProvider* fTextureProvider; | 373 GrTextureProvider* fTextureProvider; |
370 }; | 374 }; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 /** | 483 /** |
480 * A callback similar to the above for use by the TextBlobCache | 484 * A callback similar to the above for use by the TextBlobCache |
481 * TODO move textblob draw calls below context so we can use the call above. | 485 * TODO move textblob draw calls below context so we can use the call above. |
482 */ | 486 */ |
483 static void TextBlobCacheOverBudgetCB(void* data); | 487 static void TextBlobCacheOverBudgetCB(void* data); |
484 | 488 |
485 typedef SkRefCnt INHERITED; | 489 typedef SkRefCnt INHERITED; |
486 }; | 490 }; |
487 | 491 |
488 #endif | 492 #endif |
OLD | NEW |