| Index: src/gpu/gl/GrGLGpu.h
|
| diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
|
| index dee201292e6576de533360e1451f82a30dc587bf..3fa498cce8c3c574bed29721063676c908d726c1 100644
|
| --- a/src/gpu/gl/GrGLGpu.h
|
| +++ b/src/gpu/gl/GrGLGpu.h
|
| @@ -273,6 +273,7 @@ private:
|
| GrGLenum* externalType) const;
|
| // helper for onCreateTexture and writeTexturePixels
|
| bool uploadTexData(const GrSurfaceDesc& desc,
|
| + GrGLenum target,
|
| bool isNewTexture,
|
| int left, int top, int width, int height,
|
| GrPixelConfig dataConfig,
|
| @@ -286,23 +287,29 @@ private:
|
| // the texture is already in GPU memory and that it's going to be updated
|
| // with new data.
|
| bool uploadCompressedTexData(const GrSurfaceDesc& desc,
|
| + GrGLenum target,
|
| const void* data,
|
| bool isNewTexture = true,
|
| int left = 0, int top = 0,
|
| int width = -1, int height = -1);
|
|
|
| bool createRenderTargetObjects(const GrSurfaceDesc&, GrGpuResource::LifeCycle lifeCycle,
|
| - GrGLuint texID, GrGLRenderTarget::IDDesc*);
|
| + GrGLenum textureTarget, GrGLuint texID,
|
| + GrGLRenderTarget::IDDesc*);
|
|
|
| enum TempFBOTarget {
|
| kSrc_TempFBOTarget,
|
| kDst_TempFBOTarget
|
| };
|
|
|
| - GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport,
|
| + // Binds a surface as a FBO for a copy operation. If the surface already owns an FBO ID then
|
| + // that ID is bound. If not the surface is temporarily bound to a FBO and that FBO is bound.
|
| + // This must be paired with a call to unbindSurfaceFBOForCopy().
|
| + void bindSurfaceFBOForCopy(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport,
|
| TempFBOTarget tempFBOTarget);
|
|
|
| - void unbindTextureFromFBO(GrGLenum fboTarget);
|
| + // Must be called if bindSurfaceFBOForCopy was used to bind a surface for copying.
|
| + void unbindTextureFBOForCopy(GrGLenum fboTarget, GrSurface* surface);
|
|
|
| SkAutoTUnref<GrGLContext> fGLContext;
|
|
|
|
|