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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 if (resourceBytes) { | 227 if (resourceBytes) { |
228 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); | 228 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); |
229 } | 229 } |
230 } | 230 } |
231 | 231 |
232 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, | 232 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, |
233 SkGpuDevice* gpuDevice, | 233 SkGpuDevice* gpuDevice, |
234 const SkDeviceProperties& | 234 const SkDeviceProperties& |
235 leakyProperties, | 235 leakyProperties, |
236 bool enableDistanceFieldFonts) { | 236 bool enableDistanceFieldFonts) { |
237 if (fGpu->caps()->pathRenderingSupport() && renderTarget->isMultisampled())
{ | 237 if (fGpu->caps()->pathRenderingSupport() && |
| 238 renderTarget->isMultisampled(GrRenderTarget::kStencil_BufferBit)) { |
238 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil
Attachment(); | 239 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil
Attachment(); |
239 if (sb) { | 240 if (sb) { |
240 return GrStencilAndCoverTextContext::Create(this, gpuDevice, leakyPr
operties); | 241 return GrStencilAndCoverTextContext::Create(this, gpuDevice, leakyPr
operties); |
241 } | 242 } |
242 } | 243 } |
243 | 244 |
244 #ifdef USE_BITMAP_TEXTBLOBS | 245 #ifdef USE_BITMAP_TEXTBLOBS |
245 return GrAtlasTextContext::Create(this, gpuDevice, leakyProperties); | 246 return GrAtlasTextContext::Create(this, gpuDevice, leakyProperties); |
246 #else | 247 #else |
247 return GrDistanceFieldTextContext::Create(this, gpuDevice, leakyProperties, | 248 return GrDistanceFieldTextContext::Create(this, gpuDevice, leakyProperties, |
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 } | 2032 } |
2032 } | 2033 } |
2033 | 2034 |
2034 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2035 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
2035 fGpu->removeGpuTraceMarker(marker); | 2036 fGpu->removeGpuTraceMarker(marker); |
2036 if (fDrawBuffer) { | 2037 if (fDrawBuffer) { |
2037 fDrawBuffer->removeGpuTraceMarker(marker); | 2038 fDrawBuffer->removeGpuTraceMarker(marker); |
2038 } | 2039 } |
2039 } | 2040 } |
2040 | 2041 |
OLD | NEW |