| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index c480a1f718dac47a5704979c47f8efd4bae8d050..2eca88b190dbf175f4bdcf2095b425fcb81ae8b1 100644
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -14,22 +14,24 @@
|
|
|
| #include "GrAARectRenderer.h"
|
| #include "GrBufferAllocPool.h"
|
| -#include "GrGpu.h"
|
| +#include "GrDistanceFieldTextContext.h"
|
| #include "GrDrawTargetCaps.h"
|
| -#include "GrIndexBuffer.h"
|
| +#include "GrGpu.h"
|
| #include "GrInOrderDrawBuffer.h"
|
| +#include "GrIndexBuffer.h"
|
| #include "GrOvalRenderer.h"
|
| #include "GrPathRenderer.h"
|
| #include "GrPathUtils.h"
|
| #include "GrResourceCache.h"
|
| #include "GrSoftwarePathRenderer.h"
|
| +#include "GrStencilAndCoverTextContext.h"
|
| #include "GrStencilBuffer.h"
|
| #include "GrTextStrike.h"
|
| -#include "SkRTConf.h"
|
| #include "SkRRect.h"
|
| +#include "SkRTConf.h"
|
| #include "SkStrokeRec.h"
|
| -#include "SkTLazy.h"
|
| #include "SkTLS.h"
|
| +#include "SkTLazy.h"
|
| #include "SkTrace.h"
|
|
|
| // It can be useful to set this to false to test whether a bug is caused by using the
|
| @@ -224,6 +226,17 @@ int GrContext::getGpuTextureCacheResourceCount() const {
|
| return fTextureCache->getCachedResourceCount();
|
| }
|
|
|
| +GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget,
|
| + const SkDeviceProperties&
|
| + leakyProperties) {
|
| + if (fGpu->caps()->pathRenderingSupport()) {
|
| + if (renderTarget->getStencilBuffer() && renderTarget->isMultisampled()) {
|
| + return SkNEW_ARGS(GrStencilAndCoverTextContext, (this, leakyProperties));
|
| + }
|
| + }
|
| + return SkNEW_ARGS(GrDistanceFieldTextContext, (this, leakyProperties));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|
| GrTexture* GrContext::findAndRefTexture(const GrTextureDesc& desc,
|
|
|