Closed Bug 1243418 Opened 9 years ago Closed 9 years ago

Fix swapped boolean usage and interpretation in GLUploadHelpers::UploadImageDataToTexture

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: snorp, Assigned: snorp)

References

Details

Attachments

(1 file)

The 'aOverwrite' argument, when true, is meant to indicate that you are uploading to a texture that already has data in it. Both the callers and implementation seem to have swapped that meaning.
Comment on attachment 8712720 [details] [diff] [review] Fix up incorrect 'aOverwrite' usage and impl in GLUploadHelpers Review of attachment 8712720 [details] [diff] [review]: ----------------------------------------------------------------- The code is correct, but we should bother to clarify this, since it obviously wasn't clear enough before. ::: gfx/gl/GLUploadHelpers.cpp @@ +432,4 @@ > const nsIntRegion& aDstRegion, > GLuint& aTexture, > size_t* aOutUploadSize, > bool aOverwrite, Why don't we just call this aNeedsInit? Would that be clearer? ::: gfx/gl/TextureImageEGL.cpp @@ +213,5 @@ > aSurf, > region, > mTexture, > &uploadSize, > + mTextureState != Created, Pull this out into a named local, which should help with clarity here.
Attachment #8712720 - Flags: review?(jgilbert) → review+
Assignee: nobody → snorp
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Depends on: 1247272
This seems to have caused a regression related to hidpi support on OS X; filed bug 1247272.
Depends on: 1256576
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: