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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 fResourceProvider = new GrResourceProvider(fGpu, fResourceCache); | 88 fResourceProvider = new GrResourceProvider(fGpu, fResourceCache); |
89 | 89 |
90 fLayerCache.reset(new GrLayerCache(this)); | 90 fLayerCache.reset(new GrLayerCache(this)); |
91 | 91 |
92 fDidTestPMConversions = false; | 92 fDidTestPMConversions = false; |
93 | 93 |
94 GrDrawTarget::Options dtOptions; | 94 GrDrawTarget::Options dtOptions; |
95 dtOptions.fClipBatchToBounds = options.fClipBatchToBounds; | 95 dtOptions.fClipBatchToBounds = options.fClipBatchToBounds; |
96 dtOptions.fDrawBatchBounds = options.fDrawBatchBounds; | 96 dtOptions.fDrawBatchBounds = options.fDrawBatchBounds; |
97 dtOptions.fMaxBatchLookback = options.fMaxBatchLookback; | 97 dtOptions.fMaxBatchLookback = options.fMaxBatchLookback; |
98 fDrawingManager.reset(new GrDrawingManager(this, dtOptions, &fSingleOwner)); | 98 fDrawingManager.reset(new GrDrawingManager(this, dtOptions)); |
99 | 99 |
100 // GrBatchFontCache will eventually replace GrFontCache | 100 // GrBatchFontCache will eventually replace GrFontCache |
101 fBatchFontCache = new GrBatchFontCache(this); | 101 fBatchFontCache = new GrBatchFontCache(this); |
102 | 102 |
103 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); | 103 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); |
104 } | 104 } |
105 | 105 |
106 GrContext::~GrContext() { | 106 GrContext::~GrContext() { |
107 ASSERT_SINGLE_OWNER | 107 ASSERT_SINGLE_OWNER |
108 | 108 |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 ASSERT_SINGLE_OWNER | 658 ASSERT_SINGLE_OWNER |
659 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 659 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
660 } | 660 } |
661 | 661 |
662 ////////////////////////////////////////////////////////////////////////////// | 662 ////////////////////////////////////////////////////////////////////////////// |
663 | 663 |
664 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 664 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
665 ASSERT_SINGLE_OWNER | 665 ASSERT_SINGLE_OWNER |
666 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 666 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
667 } | 667 } |
OLD | NEW |