Closed Bug 783663 Opened 12 years ago Closed 12 years ago

ReadPixelsIntoImageSurface pulls from bound framebuffer, not the screen

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(1 file, 1 obsolete file)

ReadPixelsIntoImageSurface is just a wrapper that calls ReadPixels into a gfxImageSurface. While this is fine, it is used in Layers as if it always reads from the screen, which is not the case.
Actually, it looks like this is only the case on OGL Layers.
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Attachment #652886 - Flags: review?(bgirard)
Accidentally built this on top of another patch. Here's the rebased version.
Attachment #652886 - Attachment is obsolete: true
Attachment #652886 - Flags: review?(bgirard)
Attachment #652888 - Flags: review?(bgirard)
Blocks: 783674
Comment on attachment 652888 [details] [diff] [review]
Now without cruft from patches it was on top of...

Review of attachment 652888 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/opengl/CanvasLayerOGL.cpp
@@ +208,5 @@
>          GetTempSurface(size, gfxASurface::ImageFormatARGB32);
>  
> +      updatedAreaImageSurface->Flush();
> +      mCanvasGLContext->ReadScreenIntoImageSurface(updatedAreaImageSurface);
> +      updatedAreaImageSurface->MarkDirty();

Good catch with the flush/markdirty.
Attachment #652888 - Flags: review?(bgirard) → review+
Whiteboard: [rplus]
https://hg.mozilla.org/mozilla-central/rev/68f2ac456dbc
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: