| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include "GrContext.h" | 8 #include "GrContext.h" |
| 9 #include "GrContextPriv.h" | 9 #include "GrContextPriv.h" |
| 10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 fDidTestPMConversions = false; | 91 fDidTestPMConversions = false; |
| 92 | 92 |
| 93 GrDrawTarget::Options dtOptions; | 93 GrDrawTarget::Options dtOptions; |
| 94 dtOptions.fClipBatchToBounds = options.fClipBatchToBounds; | 94 dtOptions.fClipBatchToBounds = options.fClipBatchToBounds; |
| 95 dtOptions.fDrawBatchBounds = options.fDrawBatchBounds; | 95 dtOptions.fDrawBatchBounds = options.fDrawBatchBounds; |
| 96 dtOptions.fMaxBatchLookback = options.fMaxBatchLookback; | 96 dtOptions.fMaxBatchLookback = options.fMaxBatchLookback; |
| 97 dtOptions.fMaxBatchLookahead = options.fMaxBatchLookahead; | 97 dtOptions.fMaxBatchLookahead = options.fMaxBatchLookahead; |
| 98 GrPathRendererChain::Options prcOptions; | 98 GrPathRendererChain::Options prcOptions; |
| 99 prcOptions.fDisableDistanceFieldRenderer = options.fDisableDistanceFieldPath
s; | 99 prcOptions.fDisableDistanceFieldRenderer = options.fDisableDistanceFieldPath
s; |
| 100 prcOptions.fAllowPathMaskCaching = options.fAllowPathMaskCaching; |
| 101 prcOptions.fDisableAllPathRenderers = options.fForceSWPathMasks; |
| 100 fDrawingManager.reset(new GrDrawingManager(this, dtOptions, prcOptions, opti
ons.fImmediateMode, | 102 fDrawingManager.reset(new GrDrawingManager(this, dtOptions, prcOptions, opti
ons.fImmediateMode, |
| 101 &fSingleOwner)); | 103 &fSingleOwner)); |
| 102 | 104 |
| 103 // GrBatchFontCache will eventually replace GrFontCache | 105 // GrBatchFontCache will eventually replace GrFontCache |
| 104 fBatchFontCache = new GrBatchFontCache(this); | 106 fBatchFontCache = new GrBatchFontCache(this); |
| 105 | 107 |
| 106 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); | 108 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); |
| 107 } | 109 } |
| 108 | 110 |
| 109 GrContext::~GrContext() { | 111 GrContext::~GrContext() { |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 ASSERT_SINGLE_OWNER | 834 ASSERT_SINGLE_OWNER |
| 833 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 835 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
| 834 } | 836 } |
| 835 | 837 |
| 836 ////////////////////////////////////////////////////////////////////////////// | 838 ////////////////////////////////////////////////////////////////////////////// |
| 837 | 839 |
| 838 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 840 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
| 839 ASSERT_SINGLE_OWNER | 841 ASSERT_SINGLE_OWNER |
| 840 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 842 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
| 841 } | 843 } |
| OLD | NEW |