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

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

Issue 19401002: Add call to setOverbudgetCallback in GrContext setup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return false; 112 return false;
113 } 113 }
114 114
115 fDrawState = SkNEW(GrDrawState); 115 fDrawState = SkNEW(GrDrawState);
116 fGpu->setDrawState(fDrawState); 116 fGpu->setDrawState(fDrawState);
117 117
118 118
119 fTextureCache = SkNEW_ARGS(GrResourceCache, 119 fTextureCache = SkNEW_ARGS(GrResourceCache,
120 (MAX_TEXTURE_CACHE_COUNT, 120 (MAX_TEXTURE_CACHE_COUNT,
121 MAX_TEXTURE_CACHE_BYTES)); 121 MAX_TEXTURE_CACHE_BYTES));
122 fTextureCache->setOverbudgetCallback(OverbudgetCB, this);
123
122 fFontCache = SkNEW_ARGS(GrFontCache, (fGpu)); 124 fFontCache = SkNEW_ARGS(GrFontCache, (fGpu));
123 125
124 fLastDrawWasBuffered = kNo_BufferedDraw; 126 fLastDrawWasBuffered = kNo_BufferedDraw;
125 127
126 fAARectRenderer = SkNEW(GrAARectRenderer); 128 fAARectRenderer = SkNEW(GrAARectRenderer);
127 fOvalRenderer = SkNEW(GrOvalRenderer); 129 fOvalRenderer = SkNEW(GrOvalRenderer);
128 130
129 fDidTestPMConversions = false; 131 fDidTestPMConversions = false;
130 132
131 this->setupDrawBuffer(); 133 this->setupDrawBuffer();
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 return NULL; 1680 return NULL;
1679 } 1681 }
1680 } 1682 }
1681 1683
1682 /////////////////////////////////////////////////////////////////////////////// 1684 ///////////////////////////////////////////////////////////////////////////////
1683 #if GR_CACHE_STATS 1685 #if GR_CACHE_STATS
1684 void GrContext::printCacheStats() const { 1686 void GrContext::printCacheStats() const {
1685 fTextureCache->printStats(); 1687 fTextureCache->printStats();
1686 } 1688 }
1687 #endif 1689 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698