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 15 matching lines...) Expand all Loading... |
26 #include "GrLayerCache.h" | 26 #include "GrLayerCache.h" |
27 #include "GrOvalRenderer.h" | 27 #include "GrOvalRenderer.h" |
28 #include "GrPathRenderer.h" | 28 #include "GrPathRenderer.h" |
29 #include "GrPathUtils.h" | 29 #include "GrPathUtils.h" |
30 #include "GrRenderTargetPriv.h" | 30 #include "GrRenderTargetPriv.h" |
31 #include "GrResourceCache.h" | 31 #include "GrResourceCache.h" |
32 #include "GrSoftwarePathRenderer.h" | 32 #include "GrSoftwarePathRenderer.h" |
33 #include "GrStencilAndCoverTextContext.h" | 33 #include "GrStencilAndCoverTextContext.h" |
34 #include "GrStrokeInfo.h" | 34 #include "GrStrokeInfo.h" |
35 #include "GrSurfacePriv.h" | 35 #include "GrSurfacePriv.h" |
| 36 #include "GrTextBlobCache.h" |
36 #include "GrTexturePriv.h" | 37 #include "GrTexturePriv.h" |
37 #include "GrTraceMarker.h" | 38 #include "GrTraceMarker.h" |
38 #include "GrTracing.h" | 39 #include "GrTracing.h" |
39 #include "SkDashPathPriv.h" | 40 #include "SkDashPathPriv.h" |
40 #include "SkConfig8888.h" | 41 #include "SkConfig8888.h" |
41 #include "SkGr.h" | 42 #include "SkGr.h" |
42 #include "SkRRect.h" | 43 #include "SkRRect.h" |
43 #include "SkStrokeRec.h" | 44 #include "SkStrokeRec.h" |
44 #include "SkTLazy.h" | 45 #include "SkTLazy.h" |
45 #include "SkTLS.h" | 46 #include "SkTLS.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 fAARectRenderer = SkNEW_ARGS(GrAARectRenderer, (fGpu)); | 130 fAARectRenderer = SkNEW_ARGS(GrAARectRenderer, (fGpu)); |
130 fOvalRenderer = SkNEW_ARGS(GrOvalRenderer, (fGpu)); | 131 fOvalRenderer = SkNEW_ARGS(GrOvalRenderer, (fGpu)); |
131 | 132 |
132 fDidTestPMConversions = false; | 133 fDidTestPMConversions = false; |
133 | 134 |
134 this->setupDrawBuffer(); | 135 this->setupDrawBuffer(); |
135 | 136 |
136 // GrBatchFontCache will eventually replace GrFontCache | 137 // GrBatchFontCache will eventually replace GrFontCache |
137 fBatchFontCache = SkNEW(GrBatchFontCache); | 138 fBatchFontCache = SkNEW(GrBatchFontCache); |
138 fBatchFontCache->init(this); | 139 fBatchFontCache->init(this); |
| 140 |
| 141 fTextBlobCache.reset(SkNEW(GrTextBlobCache)); |
139 } | 142 } |
140 | 143 |
141 GrContext::~GrContext() { | 144 GrContext::~GrContext() { |
142 if (NULL == fGpu) { | 145 if (NULL == fGpu) { |
143 return; | 146 return; |
144 } | 147 } |
145 | 148 |
146 this->flush(); | 149 this->flush(); |
147 | 150 |
148 for (int i = 0; i < fCleanUpData.count(); ++i) { | 151 for (int i = 0; i < fCleanUpData.count(); ++i) { |
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 } | 2016 } |
2014 } | 2017 } |
2015 | 2018 |
2016 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2019 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
2017 fGpu->removeGpuTraceMarker(marker); | 2020 fGpu->removeGpuTraceMarker(marker); |
2018 if (fDrawBuffer) { | 2021 if (fDrawBuffer) { |
2019 fDrawBuffer->removeGpuTraceMarker(marker); | 2022 fDrawBuffer->removeGpuTraceMarker(marker); |
2020 } | 2023 } |
2021 } | 2024 } |
2022 | 2025 |
OLD | NEW |