ReadPixelsIntoImageSurface pulls from bound framebuffer, not the screen

RESOLVED FIXED in mozilla17

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jgilbert, Assigned: jgilbert)

Tracking

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Actually, it looks like this is only the case on OGL Layers.
(Assignee)

Comment 2

5 years ago
Created attachment 652886 [details] [diff] [review]
Switch to ReadScreenIntoImageSurface for Layers pixel reads
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Attachment #652886 - Flags: review?(bgirard)
(Assignee)

Comment 3

5 years ago
Created attachment 652888 [details] [diff] [review]
Now without cruft from patches it was on top of...

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)
(Assignee)

Updated

5 years ago
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+
(Assignee)

Updated

5 years ago
Whiteboard: [rplus]
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/68f2ac456dbc
Whiteboard: [rplus]

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/68f2ac456dbc
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.