| Index: src/gpu/gl/GrGLGpu.h
|
| diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
|
| index 6fd77fbe923eec9140ce990c2e178f01735769b4..6f7add6cd2676241609e85fd8a0eb8b40d595977 100644
|
| --- a/src/gpu/gl/GrGLGpu.h
|
| +++ b/src/gpu/gl/GrGLGpu.h
|
| @@ -102,11 +102,6 @@ public:
|
| const SkIRect& srcRect,
|
| const SkIPoint& dstPoint) override;
|
|
|
| - bool canCopySurface(const GrSurface* dst,
|
| - const GrSurface* src,
|
| - const SkIRect& srcRect,
|
| - const SkIPoint& dstPoint) override;
|
| -
|
| void xferBarrier(GrRenderTarget*, GrXferBarrierType) override;
|
|
|
| void buildProgramDesc(GrProgramDesc*,
|
| @@ -182,6 +177,19 @@ private:
|
|
|
| bool hasExtension(const char* ext) const { return fGLContext->hasExtension(ext); }
|
|
|
| + void copySurfaceAsDraw(GrSurface* dst,
|
| + GrSurface* src,
|
| + const SkIRect& srcRect,
|
| + const SkIPoint& dstPoint);
|
| + void copySurfaceAsCopyTexSubImage(GrSurface* dst,
|
| + GrSurface* src,
|
| + const SkIRect& srcRect,
|
| + const SkIPoint& dstPoint);
|
| + bool copySurfaceAsBlitFramebuffer(GrSurface* dst,
|
| + GrSurface* src,
|
| + const SkIRect& srcRect,
|
| + const SkIPoint& dstPoint);
|
| +
|
| static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
|
|
|
| class ProgramCache : public ::SkNoncopyable {
|
| @@ -190,7 +198,7 @@ private:
|
| ~ProgramCache();
|
|
|
| void abandon();
|
| - GrGLProgram* getProgram(const DrawArgs&);
|
| + GrGLProgram* refProgram(const DrawArgs&);
|
|
|
| private:
|
| enum {
|
| @@ -293,9 +301,10 @@ private:
|
|
|
| SkAutoTDelete<GrGLContext> fGLContext;
|
|
|
| + void createCopyProgram();
|
| +
|
| // GL program-related state
|
| ProgramCache* fProgramCache;
|
| - SkAutoTUnref<GrGLProgram> fCurrentProgram;
|
|
|
| ///////////////////////////////////////////////////////////////////////////
|
| ///@name Caching of GL State
|
| @@ -417,7 +426,17 @@ private:
|
| const GrGLVertexBuffer* vbuffer,
|
| const GrGLIndexBuffer* ibuffer);
|
|
|
| + /** Variants of the above that takes GL buffer IDs. Note that 0 does not imply that a
|
| + buffer won't be bound. The "default buffer" will be bound, which is used for client-side
|
| + array rendering. */
|
| + GrGLAttribArrayState* bindArrayAndBufferToDraw(GrGLGpu* gpu, GrGLuint vbufferID);
|
| + GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu,
|
| + GrGLuint vbufferID,
|
| + GrGLuint ibufferID);
|
| +
|
| private:
|
| + GrGLAttribArrayState* internalBind(GrGLGpu* gpu, GrGLuint vbufferID, GrGLuint* ibufferID);
|
| +
|
| GrGLuint fBoundVertexArrayID;
|
| GrGLuint fBoundVertexBufferID;
|
| bool fBoundVertexArrayIDIsValid;
|
| @@ -451,6 +470,15 @@ private:
|
| }
|
| } fHWBlendState;
|
|
|
| + /** IDs for copy surface program. */
|
| + struct {
|
| + GrGLuint fProgram;
|
| + GrGLint fTextureUniform;
|
| + GrGLint fTexCoordXformUniform;
|
| + GrGLint fPosXformUniform;
|
| + GrGLuint fArrayBuffer;
|
| + } fCopyProgram;
|
| +
|
| TriState fMSAAEnabled;
|
|
|
| GrStencilSettings fHWStencilSettings;
|
|
|