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" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 fResourceCache = new GrResourceCache(fCaps); | 81 fResourceCache = new GrResourceCache(fCaps); |
82 fResourceCache->setOverBudgetCallback(OverBudgetCB, this); | 82 fResourceCache->setOverBudgetCallback(OverBudgetCB, this); |
83 fResourceProvider = new GrResourceProvider(fGpu, fResourceCache); | 83 fResourceProvider = new GrResourceProvider(fGpu, fResourceCache); |
84 | 84 |
85 fLayerCache.reset(new GrLayerCache(this)); | 85 fLayerCache.reset(new GrLayerCache(this)); |
86 | 86 |
87 fDidTestPMConversions = false; | 87 fDidTestPMConversions = false; |
88 | 88 |
89 GrDrawTarget::Options dtOptions; | 89 GrDrawTarget::Options dtOptions; |
90 dtOptions.fClipBatchToBounds = options.fClipBatchToBounds; | 90 dtOptions.fClipBatchToBounds = options.fClipBatchToBounds; |
91 dtOptions.fDrawBatchBounds = options.fDrawBatchBounds; | |
92 fDrawingManager.reset(new GrDrawingManager(this, dtOptions)); | 91 fDrawingManager.reset(new GrDrawingManager(this, dtOptions)); |
93 | 92 |
94 // GrBatchFontCache will eventually replace GrFontCache | 93 // GrBatchFontCache will eventually replace GrFontCache |
95 fBatchFontCache = new GrBatchFontCache(this); | 94 fBatchFontCache = new GrBatchFontCache(this); |
96 | 95 |
97 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); | 96 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); |
98 } | 97 } |
99 | 98 |
100 GrContext::~GrContext() { | 99 GrContext::~GrContext() { |
101 if (!fGpu) { | 100 if (!fGpu) { |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 | 625 |
627 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ | 626 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes)
{ |
628 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 627 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
629 } | 628 } |
630 | 629 |
631 ////////////////////////////////////////////////////////////////////////////// | 630 ////////////////////////////////////////////////////////////////////////////// |
632 | 631 |
633 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 632 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
634 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 633 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
635 } | 634 } |
OLD | NEW |