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 "GrCaps.h" | 11 #include "GrCaps.h" |
12 #include "GrClip.h" | 12 #include "GrClip.h" |
13 #include "GrColor.h" | 13 #include "GrColor.h" |
14 #include "GrPaint.h" | 14 #include "GrPaint.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 #include "../private/GrAuditTrail.h" | 20 #include "../private/GrAuditTrail.h" |
21 #include "../private/GrSingleOwner.h" | 21 #include "../private/GrSingleOwner.h" |
22 #include "../private/SkMutex.h" | 22 #include "../private/SkMutex.h" |
23 | 23 |
24 struct GrBatchAtlasConfig; | 24 struct GrBatchAtlasConfig; |
25 class GrBatchFontCache; | 25 class GrBatchFontCache; |
26 struct GrContextOptions; | 26 struct GrContextOptions; |
27 class GrContextThreadSafeProxy; | 27 class GrContextThreadSafeProxy; |
28 class GrDrawingManager; | 28 class GrDrawingManager; |
29 class GrDrawContext; | 29 class GrDrawContext; |
30 class GrDrawTarget; | |
31 class GrFragmentProcessor; | 30 class GrFragmentProcessor; |
32 class GrGpu; | 31 class GrGpu; |
33 class GrIndexBuffer; | 32 class GrIndexBuffer; |
34 class GrLayerCache; | 33 class GrLayerCache; |
35 class GrOvalRenderer; | 34 class GrOvalRenderer; |
36 class GrPath; | 35 class GrPath; |
37 class GrPipelineBuilder; | 36 class GrPipelineBuilder; |
38 class GrResourceEntry; | 37 class GrResourceEntry; |
39 class GrResourceCache; | 38 class GrResourceCache; |
40 class GrResourceProvider; | 39 class GrResourceProvider; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 GrGpu* getGpu() { return fGpu; } | 346 GrGpu* getGpu() { return fGpu; } |
348 const GrGpu* getGpu() const { return fGpu; } | 347 const GrGpu* getGpu() const { return fGpu; } |
349 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } | 348 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } |
350 GrLayerCache* getLayerCache() { return fLayerCache.get(); } | 349 GrLayerCache* getLayerCache() { return fLayerCache.get(); } |
351 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; } | 350 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; } |
352 bool abandoned() const; | 351 bool abandoned() const; |
353 GrResourceProvider* resourceProvider() { return fResourceProvider; } | 352 GrResourceProvider* resourceProvider() { return fResourceProvider; } |
354 const GrResourceProvider* resourceProvider() const { return fResourceProvide
r; } | 353 const GrResourceProvider* resourceProvider() const { return fResourceProvide
r; } |
355 GrResourceCache* getResourceCache() { return fResourceCache; } | 354 GrResourceCache* getResourceCache() { return fResourceCache; } |
356 | 355 |
357 // Called by tests that draw directly to the context via GrDrawTarget | 356 // Called by tests that draw directly to the context via GrDrawContext |
358 void getTestTarget(GrTestTarget*, GrRenderTarget* rt); | 357 void getTestTarget(GrTestTarget*, sk_sp<GrDrawContext>); |
359 | 358 |
360 /** Reset GPU stats */ | 359 /** Reset GPU stats */ |
361 void resetGpuStats() const ; | 360 void resetGpuStats() const ; |
362 | 361 |
363 /** Prints cache stats to the string if GR_CACHE_STATS == 1. */ | 362 /** Prints cache stats to the string if GR_CACHE_STATS == 1. */ |
364 void dumpCacheStats(SkString*) const; | 363 void dumpCacheStats(SkString*) const; |
365 void dumpCacheStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>*
values) const; | 364 void dumpCacheStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>*
values) const; |
366 void printCacheStats() const; | 365 void printCacheStats() const; |
367 | 366 |
368 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ | 367 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 SkAutoTUnref<const GrCaps> fCaps; | 497 SkAutoTUnref<const GrCaps> fCaps; |
499 uint32_t fContextUniqueID; | 498 uint32_t fContextUniqueID; |
500 | 499 |
501 friend class GrContext; | 500 friend class GrContext; |
502 friend class SkImage; | 501 friend class SkImage; |
503 | 502 |
504 typedef SkRefCnt INHERITED; | 503 typedef SkRefCnt INHERITED; |
505 }; | 504 }; |
506 | 505 |
507 #endif | 506 #endif |
OLD | NEW |