Closed Bug 942509 Opened 11 years ago Closed 11 years ago

Move Upload* helpers out of GLContext

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: bjacob, Assigned: bjacob)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

This part of GLContext.h: SurfaceFormat UploadImageDataToTexture(unsigned char* aData, int32_t aStride, gfxImageFormat aFormat, const nsIntRegion& aDstRegion, GLuint& aTexture, bool aOverwrite = false, bool aPixelBuffer = false, GLenum aTextureUnit = LOCAL_GL_TEXTURE0, GLenum aTextureTarget = LOCAL_GL_TEXTURE_2D); /** * Convenience wrapper around UploadImageDataToTexture for gfxASurfaces. */ SurfaceFormat UploadSurfaceToTexture(gfxASurface *aSurface, const nsIntRegion& aDstRegion, GLuint& aTexture, bool aOverwrite = false, const nsIntPoint& aSrcPoint = nsIntPoint(0, 0), bool aPixelBuffer = false, GLenum aTextureUnit = LOCAL_GL_TEXTURE0, GLenum aTextureTarget = LOCAL_GL_TEXTURE_2D); /** * Same as above, for DataSourceSurfaces. */ SurfaceFormat UploadSurfaceToTexture(gfx::DataSourceSurface *aSurface, const nsIntRegion& aDstRegion, GLuint& aTexture, bool aOverwrite = false, const nsIntPoint& aSrcPoint = nsIntPoint(0, 0), bool aPixelBuffer = false, GLenum aTextureUnit = LOCAL_GL_TEXTURE0, GLenum aTextureTarget = LOCAL_GL_TEXTURE_2D);
These new files will also receive more code: the TexImage2D() functions and friends, and the CanUpload*() getters.
Assignee: nobody → bjacob
Status: NEW → ASSIGNED
Attachment #8340773 - Flags: review?(jgilbert)
Comment on attachment 8340773 [details] [diff] [review] Move Upload* functions to new GLUploadHelpers files Looks like straight up code movement so I will steal this one if Jeff doesn't mind.
Attachment #8340773 - Flags: review?(jgilbert) → review+
This one is indeed quite straightforward. The only question which I'd expect to be raised is how much file proliferation we want to allow; this is what I tried to justify in comment 1 with > These new files will also receive more code: the TexImage2D() functions and friends, and the CanUpload*() getters. So that while this patch introduces more files, it will allow future patches not to.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: