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 |
11 #include "GrClip.h" | 11 #include "GrClip.h" |
12 #include "GrColor.h" | 12 #include "GrColor.h" |
13 #include "GrPaint.h" | 13 #include "GrPaint.h" |
14 #include "GrPathRendererChain.h" | 14 #include "GrPathRendererChain.h" |
15 #include "GrRenderTarget.h" | 15 #include "GrRenderTarget.h" |
16 #include "GrTextureProvider.h" | 16 #include "GrTextureProvider.h" |
17 #include "SkMatrix.h" | 17 #include "SkMatrix.h" |
18 #include "SkPathEffect.h" | 18 #include "SkPathEffect.h" |
19 #include "SkTypes.h" | 19 #include "SkTypes.h" |
20 | 20 |
| 21 struct GrBatchAtlasConfig; |
21 class GrBatchFontCache; | 22 class GrBatchFontCache; |
22 class GrCaps; | 23 class GrCaps; |
23 struct GrContextOptions; | 24 struct GrContextOptions; |
24 class GrDrawContext; | 25 class GrDrawContext; |
25 class GrDrawTarget; | 26 class GrDrawTarget; |
26 class GrFragmentProcessor; | 27 class GrFragmentProcessor; |
27 class GrGpu; | 28 class GrGpu; |
28 class GrGpuTraceMarker; | 29 class GrGpuTraceMarker; |
29 class GrIndexBuffer; | 30 class GrIndexBuffer; |
30 class GrLayerCache; | 31 class GrLayerCache; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 void printCacheStats() const; | 350 void printCacheStats() const; |
350 | 351 |
351 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ | 352 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ |
352 void dumpGpuStats(SkString*) const; | 353 void dumpGpuStats(SkString*) const; |
353 void printGpuStats() const; | 354 void printGpuStats() const; |
354 | 355 |
355 /** Specify the TextBlob cache limit. If the current cache exceeds this limi
t it will purge. | 356 /** Specify the TextBlob cache limit. If the current cache exceeds this limi
t it will purge. |
356 this is for testing only */ | 357 this is for testing only */ |
357 void setTextBlobCacheLimit_ForTesting(size_t bytes); | 358 void setTextBlobCacheLimit_ForTesting(size_t bytes); |
358 | 359 |
| 360 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe
r below should be |
| 361 to an array of 3 entries */ |
| 362 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); |
| 363 |
359 private: | 364 private: |
360 GrGpu* fGpu; | 365 GrGpu* fGpu; |
361 const GrCaps* fCaps; | 366 const GrCaps* fCaps; |
362 GrResourceCache* fResourceCache; | 367 GrResourceCache* fResourceCache; |
363 // this union exists because the inheritance of GrTextureProvider->GrResourc
eProvider | 368 // this union exists because the inheritance of GrTextureProvider->GrResourc
eProvider |
364 // is in a private header. | 369 // is in a private header. |
365 union { | 370 union { |
366 GrResourceProvider* fResourceProvider; | 371 GrResourceProvider* fResourceProvider; |
367 GrTextureProvider* fTextureProvider; | 372 GrTextureProvider* fTextureProvider; |
368 }; | 373 }; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 /** | 466 /** |
462 * A callback similar to the above for use by the TextBlobCache | 467 * A callback similar to the above for use by the TextBlobCache |
463 * TODO move textblob draw calls below context so we can use the call above. | 468 * TODO move textblob draw calls below context so we can use the call above. |
464 */ | 469 */ |
465 static void TextBlobCacheOverBudgetCB(void* data); | 470 static void TextBlobCacheOverBudgetCB(void* data); |
466 | 471 |
467 typedef SkRefCnt INHERITED; | 472 typedef SkRefCnt INHERITED; |
468 }; | 473 }; |
469 | 474 |
470 #endif | 475 #endif |
OLD | NEW |