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 #include "GrContext.h" | 9 #include "GrContext.h" |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this))); | 128 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this))); |
129 | 129 |
130 fAARectRenderer = SkNEW_ARGS(GrAARectRenderer, (fGpu)); | 130 fAARectRenderer = SkNEW_ARGS(GrAARectRenderer, (fGpu)); |
131 fOvalRenderer = SkNEW_ARGS(GrOvalRenderer, (fGpu)); | 131 fOvalRenderer = SkNEW_ARGS(GrOvalRenderer, (fGpu)); |
132 | 132 |
133 fDidTestPMConversions = false; | 133 fDidTestPMConversions = false; |
134 | 134 |
135 this->setupDrawBuffer(); | 135 this->setupDrawBuffer(); |
136 | 136 |
137 // GrBatchFontCache will eventually replace GrFontCache | 137 // GrBatchFontCache will eventually replace GrFontCache |
138 fBatchFontCache = SkNEW(GrBatchFontCache); | 138 fBatchFontCache = SkNEW_ARGS(GrBatchFontCache, (this)); |
139 fBatchFontCache->init(this); | |
140 | 139 |
141 fTextBlobCache.reset(SkNEW(GrTextBlobCache)); | 140 fTextBlobCache.reset(SkNEW(GrTextBlobCache)); |
142 } | 141 } |
143 | 142 |
144 GrContext::~GrContext() { | 143 GrContext::~GrContext() { |
145 if (NULL == fGpu) { | 144 if (NULL == fGpu) { |
146 return; | 145 return; |
147 } | 146 } |
148 | 147 |
149 this->flush(); | 148 this->flush(); |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2017 } | 2016 } |
2018 } | 2017 } |
2019 | 2018 |
2020 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2019 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
2021 fGpu->removeGpuTraceMarker(marker); | 2020 fGpu->removeGpuTraceMarker(marker); |
2022 if (fDrawBuffer) { | 2021 if (fDrawBuffer) { |
2023 fDrawBuffer->removeGpuTraceMarker(marker); | 2022 fDrawBuffer->removeGpuTraceMarker(marker); |
2024 } | 2023 } |
2025 } | 2024 } |
2026 | 2025 |
OLD | NEW |