| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 } | 243 } |
| 244 if (resourceBytes) { | 244 if (resourceBytes) { |
| 245 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); | 245 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, | 249 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, |
| 250 const SkDeviceProperties& | 250 const SkDeviceProperties& |
| 251 leakyProperties, | 251 leakyProperties, |
| 252 bool enableDistanceFieldFonts) { | 252 bool enableDistanceFieldFonts) { |
| 253 if (fGpu->caps()->shaderCaps()->pathRenderingSupport() && renderTarget->isMu
ltisampled()) { | 253 if (fGpu->caps()->shaderCaps()->pathRenderingSupport() && |
| 254 renderTarget->isStencilBufferMultisampled()) { |
| 254 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil
Attachment(); | 255 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil
Attachment(); |
| 255 if (sb) { | 256 if (sb) { |
| 256 return GrStencilAndCoverTextContext::Create(this, leakyProperties); | 257 return GrStencilAndCoverTextContext::Create(this, leakyProperties); |
| 257 } | 258 } |
| 258 } | 259 } |
| 259 | 260 |
| 260 return GrAtlasTextContext::Create(this, leakyProperties, enableDistanceField
Fonts); | 261 return GrAtlasTextContext::Create(this, leakyProperties, enableDistanceField
Fonts); |
| 261 } | 262 } |
| 262 | 263 |
| 263 //////////////////////////////////////////////////////////////////////////////// | 264 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 ////////////////////////////////////////////////////////////////////////////// | 745 ////////////////////////////////////////////////////////////////////////////// |
| 745 | 746 |
| 746 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { | 747 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 747 fGpu->addGpuTraceMarker(marker); | 748 fGpu->addGpuTraceMarker(marker); |
| 748 } | 749 } |
| 749 | 750 |
| 750 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 751 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 751 fGpu->removeGpuTraceMarker(marker); | 752 fGpu->removeGpuTraceMarker(marker); |
| 752 } | 753 } |
| 753 | 754 |
| OLD | NEW |