Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: src/gpu/gl/GrGLGpu.h

Issue 1403123002: Store texture target on GrGLTexture. This is in preparation for using texture targets other than 2D. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: working Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698