Recommit r2611 with fix for gm
git-svn-id: http://skia.googlecode.com/svn/trunk@2614 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index c5a8bfb..b7d1395 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -195,6 +195,25 @@
}
}
+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);