aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpu/GrGpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r--src/gpu/GrGpu.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 0836ec8..52282ed 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -132,11 +132,6 @@ public:
GrRenderTarget* createPlatformRenderTarget(const GrPlatformRenderTargetDesc& desc);
/**
- * DEPRECATED. This will be removed.
- */
- GrResource* createPlatformSurface(const GrPlatformSurfaceDesc& desc);
-
- /**
* Creates a vertex buffer.
*
* @param size size in bytes of the vertex buffer
@@ -177,6 +172,11 @@ public:
const GrVertexBuffer* getUnitSquareVertexBuffer() const;
/**
+ * Resolves MSAA.
+ */
+ void resolveRenderTarget(GrRenderTarget* target);
+
+ /**
* Ensures that the current render target is actually set in the
* underlying 3D API. Used when client wants to use 3D API to directly
* render to the RT.
@@ -184,6 +184,13 @@ public:
void forceRenderTargetFlush();
/**
+ * If this returns true then a sequence that reads unpremultiplied pixels
+ * from a surface, writes back the same values, and reads them again will
+ * give the same pixel values back in both reads.
+ */
+ virtual bool canPreserveReadWriteUnpremulPixels() = 0;
+
+ /**
* readPixels with some configs may be slow. Given a desired config this
* function returns a fast-path config. The returned config must have the
* same components, component sizes, and not require conversion between
@@ -355,7 +362,7 @@ protected:
// stencil settings to clip drawing when stencil clipping is in effect
// and the client isn't using the stencil test.
- static const GrStencilSettings& gClipStencilSettings;
+ static const GrStencilSettings* GetClipStencilSettings();
GrGpuStats fStats;
@@ -401,7 +408,6 @@ protected:
size_t rowBytes) = 0;
virtual GrTexture* onCreatePlatformTexture(const GrPlatformTextureDesc& desc) = 0;
virtual GrRenderTarget* onCreatePlatformRenderTarget(const GrPlatformRenderTargetDesc& desc) = 0;
- virtual GrResource* onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc) = 0;
virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
bool dynamic) = 0;
virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
@@ -439,6 +445,9 @@ protected:
GrPixelConfig config, const void* buffer,
size_t rowBytes) = 0;
+ // overridden by API-specific derived class to perform the resolve
+ virtual void onResolveRenderTarget(GrRenderTarget* target) = 0;
+
// called to program the vertex data, indexCount will be 0 if drawing non-
// indexed geometry. The subclass may adjust the startVertex and/or
// startIndex since it may have already accounted for these in the setup.