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

Issue 2797543002: Fix unreliable MediaStream capture from WebGL canvases (Closed)

Created:
3 years, 8 months ago by Justin Novosad
Modified:
3 years, 8 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3029
Project:
chromium
Visibility:
Public.

Description

Fix unreliable MediaStream capture from WebGL canvases When capturing a MediaStrem from a WebGL canvas that has the preserveDrawingBuffer option set to false, it is important to perform the frame capture before the canvas is cleared by the buffer swap mechanism. This change resolves the issue by performing the capture during the paint invalidation phase instead of during frame finalization. For canvases that are not visible on screen, there is no paint invalidation, which is a problem. So in that case, we fall back to doing the capture during frame finalization, which is okay in that case because there is no buffer swap. BUG=702446 Review-Url: https://codereview.chromium.org/2768683002 Cr-Commit-Position: refs/heads/master@{#460159} (cherry picked from commit 7b09536cad07c7983eac63eac07ecf82f53c65d1) Review-Url: https://codereview.chromium.org/2797543002 . Cr-Commit-Position: refs/branch-heads/3029@{#553} Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471} Committed: https://chromium.googlesource.com/chromium/src/+/d5af69c1ae0e600b758d1ae5dba6ead266826d13

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -26 lines) Patch
M content/browser/webrtc/webrtc_capture_from_element_browsertest.cc View 1 chunk +13 lines, -2 lines 0 comments Download
M content/test/data/media/canvas_capture_color.html View 4 chunks +72 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 2 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
Justin Novosad
3 years, 8 months ago (2017-04-03 19:55:13 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
d5af69c1ae0e600b758d1ae5dba6ead266826d13.

Powered by Google App Engine
This is Rietveld 408576698