Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: src/gpu/GrContext.cpp

Issue 1498653002: Add option to control maximum GrBatch lookback (Closed) Base URL: https://skia.googlesource.com/skia.git@drect
Patch Set: fix rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; 91 dtOptions.fDrawBatchBounds = options.fDrawBatchBounds;
92 dtOptions.fMaxBatchLookback = options.fMaxBatchLookback;
92 fDrawingManager.reset(new GrDrawingManager(this, dtOptions)); 93 fDrawingManager.reset(new GrDrawingManager(this, dtOptions));
93 94
94 // GrBatchFontCache will eventually replace GrFontCache 95 // GrBatchFontCache will eventually replace GrFontCache
95 fBatchFontCache = new GrBatchFontCache(this); 96 fBatchFontCache = new GrBatchFontCache(this);
96 97
97 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this)); 98 fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this));
98 } 99 }
99 100
100 GrContext::~GrContext() { 101 GrContext::~GrContext() {
101 if (!fGpu) { 102 if (!fGpu) {
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 627
627 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { 628 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
628 fResourceCache->setLimits(maxTextures, maxTextureBytes); 629 fResourceCache->setLimits(maxTextures, maxTextureBytes);
629 } 630 }
630 631
631 ////////////////////////////////////////////////////////////////////////////// 632 //////////////////////////////////////////////////////////////////////////////
632 633
633 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 634 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
634 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 635 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
635 } 636 }
OLDNEW
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698