aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'gpu')
-rw-r--r--gpu/include/GrContext.h25
-rw-r--r--gpu/include/GrGpu.h19
-rw-r--r--gpu/src/GrContext.cpp15
-rw-r--r--gpu/src/GrGpu.cpp11
-rw-r--r--gpu/src/GrGpuGL.cpp26
-rw-r--r--gpu/src/GrGpuGL.h5
6 files changed, 3 insertions, 98 deletions
diff --git a/gpu/include/GrContext.h b/gpu/include/GrContext.h
index 2fecca5ebd..58c53ba27e 100644
--- a/gpu/include/GrContext.h
+++ b/gpu/include/GrContext.h
@@ -190,35 +190,16 @@ public:
* on failure.
*/
GrResource* createPlatformSurface(const GrPlatformSurfaceDesc& desc);
-
/**
- * DEPRECATED, WILL BE REMOVED SOON. USE createPlatformSurface.
- *
- * Wraps an externally-created rendertarget in a GrRenderTarget.
- * @param platformRenderTarget 3D API-specific render target identifier
- * e.g. in GL platforamRenderTarget is an FBO
- * id.
- * @param stencilBits the number of stencil bits that the render
- * target has.
- * @param isMultisampled specify whether the render target is
- * multisampled.
- * @param width width of the render target.
- * @param height height of the render target.
- */
- GrRenderTarget* createPlatformRenderTarget(intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width, int height);
-
- /**
- * DEPRECATED, WILL BE REMOVED SOON. USE createPlatformSurface.
- *
* Reads the current target object (e.g. FBO or IDirect3DSurface9*) and
* viewport state from the underlying 3D API and wraps it in a
* GrRenderTarget. The GrRenderTarget will not attempt to delete/destroy the
* underlying object in its destructor and it is up to caller to guarantee
* that it remains valid while the GrRenderTarget is used.
*
+ * Will not detect that the render target is also a texture. If you need
+ * to also use the render target as a GrTexture use createPlatformSurface.
+ *
* @return the newly created GrRenderTarget
*/
GrRenderTarget* createRenderTargetFrom3DApiState();
diff --git a/gpu/include/GrGpu.h b/gpu/include/GrGpu.h
index 1bb5c542e6..19b83512e6 100644
--- a/gpu/include/GrGpu.h
+++ b/gpu/include/GrGpu.h
@@ -109,20 +109,6 @@ public:
*/
GrTexture* createTexture(const GrTextureDesc& desc,
const void* srcData, size_t rowBytes);
- /**
- * Wraps an externally-created rendertarget in a GrRenderTarget.
- * @param platformRenderTarget handle to the the render target in the
- * underlying 3D API. Interpretation depends on
- * GrGpu subclass in use.
- * @param stencilBits number of stencil bits the target has
- * @param isMultisampled specify whether the RT is multisampled
- * @param width width of the render target
- * @param height height of the render target
- */
- GrRenderTarget* createPlatformRenderTarget(intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width, int height);
GrResource* createPlatformSurface(const GrPlatformSurfaceDesc& desc);
@@ -427,11 +413,6 @@ protected:
const void* srcData,
size_t rowBytes) = 0;
virtual GrResource* onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc) = 0;
- virtual GrRenderTarget* onCreatePlatformRenderTarget(
- intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width, int height) = 0;
virtual GrRenderTarget* onCreateRenderTargetFrom3DApiState() = 0;
virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
bool dynamic) = 0;
diff --git a/gpu/src/GrContext.cpp b/gpu/src/GrContext.cpp
index af777c1bf7..419d9d9eb5 100644
--- a/gpu/src/GrContext.cpp
+++ b/gpu/src/GrContext.cpp
@@ -379,22 +379,7 @@ GrResource* GrContext::createPlatformSurface(const GrPlatformSurfaceDesc& desc)
return fGpu->createPlatformSurface(desc);
}
-GrRenderTarget* GrContext::createPlatformRenderTarget(intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width, int height) {
-#if GR_DEBUG
- GrPrintf("Using deprecated createPlatformRenderTarget API.");
-#endif
- return fGpu->createPlatformRenderTarget(platformRenderTarget,
- stencilBits, isMultisampled,
- width, height);
-}
-
GrRenderTarget* GrContext::createRenderTargetFrom3DApiState() {
-#if GR_DEBUG
- GrPrintf("Using deprecated createRenderTargetFrom3DApiState API.");
-#endif
return fGpu->createRenderTargetFrom3DApiState();
}
diff --git a/gpu/src/GrGpu.cpp b/gpu/src/GrGpu.cpp
index a64a8dbedc..4fe7ccc30d 100644
--- a/gpu/src/GrGpu.cpp
+++ b/gpu/src/GrGpu.cpp
@@ -142,17 +142,6 @@ GrTexture* GrGpu::createTexture(const GrTextureDesc& desc,
return this->onCreateTexture(desc, srcData, rowBytes);
}
-GrRenderTarget* GrGpu::createPlatformRenderTarget(intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width, int height) {
- this->handleDirtyContext();
- return this->onCreatePlatformRenderTarget(platformRenderTarget,
- stencilBits,
- isMultisampled,
- width, height);
-}
-
GrRenderTarget* GrGpu::createRenderTargetFrom3DApiState() {
this->handleDirtyContext();
return this->onCreateRenderTargetFrom3DApiState();
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index 5a2d2bd042..2e3563ec70 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -615,32 +615,6 @@ GrResource* GrGpuGL::onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc)
}
}
-GrRenderTarget* GrGpuGL::onCreatePlatformRenderTarget(
- intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width,
- int height) {
- GrGLRenderTarget::GLRenderTargetIDs rtIDs;
- rtIDs.fStencilRenderbufferID = 0;
- rtIDs.fMSColorRenderbufferID = 0;
- rtIDs.fTexFBOID = 0;
- rtIDs.fOwnIDs = false;
- GrGLIRect viewport;
-
- // viewport is in GL coords (top >= bottom)
- viewport.fLeft = 0;
- viewport.fBottom = 0;
- viewport.fWidth = width;
- viewport.fHeight = height;
-
- rtIDs.fRTFBOID = (GrGLuint)platformRenderTarget;
- rtIDs.fTexFBOID = (GrGLuint)platformRenderTarget;
-
- return new GrGLRenderTarget(this, rtIDs, NULL, stencilBits,
- isMultisampled, viewport, NULL);
-}
-
GrRenderTarget* GrGpuGL::onCreateRenderTargetFrom3DApiState() {
GrGLRenderTarget::GLRenderTargetIDs rtIDs;
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index d48d69eccb..0d3e4b4fed 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -81,11 +81,6 @@ protected:
virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
bool dynamic);
virtual GrResource* onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc);
- virtual GrRenderTarget* onCreatePlatformRenderTarget(
- intptr_t platformRenderTarget,
- int stencilBits,
- bool isMultisampled,
- int width, int height);
virtual GrRenderTarget* onCreateRenderTargetFrom3DApiState();
virtual void onClear(const GrIRect* rect, GrColor color);