| 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 | 9 |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |