diff options
author | 2011-11-07 13:29:52 +0000 | |
---|---|---|
committer | 2011-11-07 13:29:52 +0000 | |
commit | e269f210bdae0288643afaf8a579b22d3f6d5beb (patch) | |
tree | d6e312d7777405dd00ed7c9f6cfe7d107cf7d062 /src/gpu/GrGpu.cpp | |
parent | e826262939dac3e67cb5ce66d4b9faeb8e2538e6 (diff) |
Recommit r2611 with fix for gm
git-svn-id: http://skia.googlecode.com/svn/trunk@2614 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r-- | src/gpu/GrGpu.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index c5a8bfb927..b7d1395098 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -195,6 +195,25 @@ bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) { } } +GrTexture* GrGpu::createPlatformTexture(const GrPlatformTextureDesc& desc) { + this->handleDirtyContext(); + GrTexture* tex = this->onCreatePlatformTexture(desc); + // TODO: defer this and attach dynamically + GrRenderTarget* tgt = tex->asRenderTarget(); + if (NULL != tgt && + !this->attachStencilBufferToRenderTarget(tgt)) { + tex->unref(); + return NULL; + } else { + return tex; + } +} + +GrRenderTarget* GrGpu::createPlatformRenderTarget(const GrPlatformRenderTargetDesc& desc) { + this->handleDirtyContext(); + return this->onCreatePlatformRenderTarget(desc); +} + GrResource* GrGpu::createPlatformSurface(const GrPlatformSurfaceDesc& desc) { this->handleDirtyContext(); return this->onCreatePlatformSurface(desc); |