skia2/include/gpu
ericrk f7b8b8affe Add wrapBackendTextureAsRenderTarget API
Skia's GrTextureProvider currently exposes two APIs for wrapping backend
objects:
 * wrapBackendTexture - wraps a texture into a GrTexture. Depending on
   flags, this GrTexture can be converted to a GrRenderTarget. Skia
   manages the render target objects it may create to provide a render
   target for the texture. This allows Skia to create stencil buffers
   if needed and manager MSAA resolves.
 * wrapBackendRenderTarget - wraps a FBO into a GrRenderTarget. This
   object cannot be converted to a GrTexture. Skia does not manage
   the render target objects for such a GrRenderTarget, and as such
   cannot attach stencil buffers or perform MSAA resolves on the
   created GrRenderTarget.

Given these two options, wrapBackendTexture provides more versatility
and allows Skia more room for optimization. Chrome currently uses
wrapBackendTexture for this reason.

While these two functions cover most cases, they do not provide a way
for Skia to wrap a texture into a render target (and gain the MSAA and
stencil buffer management), without also creating a GrTexture. This is
problematic in cases where a texture can be bound to a render target,
but cannot be textured from, as is the case in Chrome's limited support
for GL_TEXTURE_RECTANGLE.

To address this, a new function is created:
 * wrapBackendTextureAsRenderTarget - wraps a texture into a
   GrRenderTarget. As with wrapBackendTexture, the created render
   target objects are fully managed by Skia. Unlike wrapBackendTexture
   no GrTexture is created, and the created object will never be
   textured from.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709163003

Review URL: https://codereview.chromium.org/1709163003
2016-02-24 14:49:52 -08:00
..
effects added support for PLS path rendering 2016-01-30 09:59:10 -08:00
gl Revert of Include glGetMultisamplefv API (patchset #1 id:1 of https://codereview.chromium.org/1720963002/ ) 2016-02-24 08:19:04 -08:00
vk Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time. 2016-02-22 09:56:40 -05:00
GrBlend.h Create fragment processor for performing input color blend with child processor 2015-09-15 15:33:27 -07:00
GrCaps.h Revert of Include glGetMultisamplefv API (patchset #1 id:1 of https://codereview.chromium.org/1720963002/ ) 2016-02-24 08:19:04 -08:00
GrClip.h fix mozilla bug 2015-12-04 08:51:11 -08:00
GrColor.h Make skpaint->grpaint flow work for composing draws (verts and atlas) 2015-09-28 06:26:29 -07:00
GrConfig.h GrAuditTrail can now be enabled/disabled at runtime 2016-02-18 13:45:40 -08:00
GrContext.h Make copySurface work for texture dsts, return a bool, & add unit test. 2016-02-16 07:34:17 -08:00
GrContextOptions.h Add option to control maximum GrBatch lookback 2015-12-14 12:13:09 -08:00
GrCoordTransform.h some utils for rect and matrix 2015-03-13 06:08:28 -07:00
GrDrawContext.h Fix memory leak 2016-02-17 05:40:00 -08:00
GrFragmentProcessor.h Change prealloc number of child FPs be 1 rather than 2 2015-11-19 11:04:48 -05:00
GrGpuResource.h Add onMemoryDump to GrContext 2015-09-15 14:16:10 -07:00
GrGpuResourceRef.h apply mozilla patch 2015-11-10 04:55:08 -08:00
GrInvariantOutput.h Make skpaint->grpaint flow work for composing draws (verts and atlas) 2015-09-28 06:26:29 -07:00
GrPaint.h Don't create a GXPFactory when blend is SrcOver 2015-11-23 13:20:42 -08:00
GrProcessor.h Increase the amount of debug information printed out by batches 2015-11-16 09:06:59 -08:00
GrProcessorUnitTest.h Move SkTArray to include/private. 2016-02-17 13:13:44 -08:00
GrProgramElement.h Move SkTArray to include/private. 2016-02-17 13:13:44 -08:00
GrRenderTarget.h Dependencies are now added between the drawTargets in GrPipeline 2015-10-30 10:11:30 -07:00
GrResourceKey.h Fix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEY 2015-12-17 08:15:47 -08:00
GrShaderVar.h added support for PLS path rendering 2016-01-30 09:59:10 -08:00
GrSurface.h Cleaning up trailing spaces and typos. 2016-01-26 09:10:48 -08:00
GrTestUtils.h Take care fall-through case of switch in skia 2016-01-05 00:35:50 -08:00
GrTexture.h Simplify calculations in AADistanceFieldPathBatch::writePathVertices. 2016-02-22 11:10:33 -08:00
GrTextureAccess.h Add a class representing texture swizzle. 2016-01-08 13:20:12 -08:00
GrTextureParams.h Remove image usage type enum. Use GrTextureParams instead. 2015-10-12 10:39:46 -07:00
GrTextureProvider.h Add wrapBackendTextureAsRenderTarget API 2016-02-24 14:49:52 -08:00
GrTypes.h skia: Add support for CHROMIUM_image backed textures. 2016-02-10 16:32:35 -08:00
GrTypesPriv.h Use unorm shorts for texture coordinates when rendering text. 2016-02-22 11:25:32 -08:00
GrXferProcessor.h added support for PLS path rendering 2016-01-30 09:59:10 -08:00
SkGr.h Cleaning up trailing spaces and typos. 2016-01-26 09:10:48 -08:00
SkGrPixelRef.h Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed. 2016-01-11 11:14:17 -08:00
SkGrTexturePixelRef.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00