OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrContext.h" | 9 #include "GrContext.h" |
10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
11 #include "GrDrawingManager.h" | 11 #include "GrDrawingManager.h" |
12 #include "GrDrawContext.h" | 12 #include "GrDrawContext.h" |
13 #include "GrLayerCache.h" | 13 #include "GrLayerCache.h" |
14 #include "GrResourceCache.h" | 14 #include "GrResourceCache.h" |
15 #include "GrResourceProvider.h" | 15 #include "GrResourceProvider.h" |
16 #include "GrSoftwarePathRenderer.h" | 16 #include "GrSoftwarePathRenderer.h" |
17 #include "GrSurfacePriv.h" | 17 #include "GrSurfacePriv.h" |
18 #include "GrTextBlobCache.h" | |
19 | 18 |
20 #include "SkConfig8888.h" | 19 #include "SkConfig8888.h" |
21 #include "SkGrPriv.h" | 20 #include "SkGrPriv.h" |
22 | 21 |
23 #include "effects/GrConfigConversionEffect.h" | 22 #include "effects/GrConfigConversionEffect.h" |
| 23 #include "text/GrTextBlobCache.h" |
24 | 24 |
25 #define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this) | 25 #define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this) |
26 #define RETURN_IF_ABANDONED if (fDrawingManager->abandoned()) { return; } | 26 #define RETURN_IF_ABANDONED if (fDrawingManager->abandoned()) { return; } |
27 #define RETURN_FALSE_IF_ABANDONED if (fDrawingManager->abandoned()) { return fal
se; } | 27 #define RETURN_FALSE_IF_ABANDONED if (fDrawingManager->abandoned()) { return fal
se; } |
28 #define RETURN_NULL_IF_ABANDONED if (fDrawingManager->abandoned()) { return null
ptr; } | 28 #define RETURN_NULL_IF_ABANDONED if (fDrawingManager->abandoned()) { return null
ptr; } |
29 | 29 |
30 //////////////////////////////////////////////////////////////////////////////// | 30 //////////////////////////////////////////////////////////////////////////////// |
31 | 31 |
32 GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext)
{ | 32 GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext)
{ |
33 GrContextOptions defaultOptions; | 33 GrContextOptions defaultOptions; |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 | 626 |
627 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ | 627 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ |
628 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 628 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
629 } | 629 } |
630 | 630 |
631 ////////////////////////////////////////////////////////////////////////////// | 631 ////////////////////////////////////////////////////////////////////////////// |
632 | 632 |
633 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 633 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
634 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 634 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
635 } | 635 } |
OLD | NEW |