| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 fDrawState = SkNEW(GrDrawState); | 124 fDrawState = SkNEW(GrDrawState); |
| 125 fGpu->setDrawState(fDrawState); | 125 fGpu->setDrawState(fDrawState); |
| 126 | 126 |
| 127 fResourceCache = SkNEW_ARGS(GrResourceCache, (MAX_RESOURCE_CACHE_COUNT, | 127 fResourceCache = SkNEW_ARGS(GrResourceCache, (MAX_RESOURCE_CACHE_COUNT, |
| 128 MAX_RESOURCE_CACHE_BYTES)); | 128 MAX_RESOURCE_CACHE_BYTES)); |
| 129 fResourceCache->setOverbudgetCallback(OverbudgetCB, this); | 129 fResourceCache->setOverbudgetCallback(OverbudgetCB, this); |
| 130 | 130 |
| 131 fFontCache = SkNEW_ARGS(GrFontCache, (fGpu)); | 131 fFontCache = SkNEW_ARGS(GrFontCache, (fGpu)); |
| 132 | 132 |
| 133 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (fGpu))); | 133 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this))); |
| 134 | 134 |
| 135 fLastDrawWasBuffered = kNo_BufferedDraw; | 135 fLastDrawWasBuffered = kNo_BufferedDraw; |
| 136 | 136 |
| 137 fAARectRenderer = SkNEW(GrAARectRenderer); | 137 fAARectRenderer = SkNEW(GrAARectRenderer); |
| 138 fOvalRenderer = SkNEW(GrOvalRenderer); | 138 fOvalRenderer = SkNEW(GrOvalRenderer); |
| 139 | 139 |
| 140 fDidTestPMConversions = false; | 140 fDidTestPMConversions = false; |
| 141 | 141 |
| 142 this->setupDrawBuffer(); | 142 this->setupDrawBuffer(); |
| 143 | 143 |
| (...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 fDrawBuffer->removeGpuTraceMarker(marker); | 1933 fDrawBuffer->removeGpuTraceMarker(marker); |
| 1934 } | 1934 } |
| 1935 } | 1935 } |
| 1936 | 1936 |
| 1937 /////////////////////////////////////////////////////////////////////////////// | 1937 /////////////////////////////////////////////////////////////////////////////// |
| 1938 #if GR_CACHE_STATS | 1938 #if GR_CACHE_STATS |
| 1939 void GrContext::printCacheStats() const { | 1939 void GrContext::printCacheStats() const { |
| 1940 fResourceCache->printStats(); | 1940 fResourceCache->printStats(); |
| 1941 } | 1941 } |
| 1942 #endif | 1942 #endif |
| OLD | NEW |