| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 211 } |
| 212 if (resourceBytes) { | 212 if (resourceBytes) { |
| 213 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); | 213 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, | 217 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, |
| 218 const SkDeviceProperties& | 218 const SkDeviceProperties& |
| 219 leakyProperties, | 219 leakyProperties, |
| 220 bool enableDistanceFieldFonts) { | 220 bool enableDistanceFieldFonts) { |
| 221 if (fGpu->caps()->pathRenderingSupport() && renderTarget->isMultisampled())
{ | 221 if (fGpu->caps()->pathRenderingSupport() && |
| 222 renderTarget->isMultisampled(kStencil_GrSampleConfig)) { |
| 222 GrStencilBuffer* sb = renderTarget->renderTargetPriv().attachStencilBuff
er(); | 223 GrStencilBuffer* sb = renderTarget->renderTargetPriv().attachStencilBuff
er(); |
| 223 if (sb) { | 224 if (sb) { |
| 224 return GrStencilAndCoverTextContext::Create(this, leakyProperties); | 225 return GrStencilAndCoverTextContext::Create(this, leakyProperties); |
| 225 } | 226 } |
| 226 } | 227 } |
| 227 | 228 |
| 228 return GrDistanceFieldTextContext::Create(this, leakyProperties, enableDista
nceFieldFonts); | 229 return GrDistanceFieldTextContext::Create(this, leakyProperties, enableDista
nceFieldFonts); |
| 229 } | 230 } |
| 230 | 231 |
| 231 //////////////////////////////////////////////////////////////////////////////// | 232 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1997 } | 1998 } |
| 1998 } | 1999 } |
| 1999 | 2000 |
| 2000 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2001 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 2001 fGpu->removeGpuTraceMarker(marker); | 2002 fGpu->removeGpuTraceMarker(marker); |
| 2002 if (fDrawBuffer) { | 2003 if (fDrawBuffer) { |
| 2003 fDrawBuffer->removeGpuTraceMarker(marker); | 2004 fDrawBuffer->removeGpuTraceMarker(marker); |
| 2004 } | 2005 } |
| 2005 } | 2006 } |
| 2006 | 2007 |
| OLD | NEW |