Chromium Code Reviews
DescriptionFixed WebglRenderingContextBase toImageData
Previously, WebglRenderingContextBase::toImageData(), which is used by convertToBlob,
wrongly used DrawingBuffer::transferToStaticBitmapImage() to obtain the image data.
This results in black image when toImageData() is called back-to-back, because
transferToStaticBitmapImage() discards the backbuffer when preserveDrawingBuffer
(a user-set flag) is false.
The new implementation in this patch follows what HTMLCanvasElement::toImageData do;
but it removes all unnecessary steps in HTMLCanvasElement that deals with
ImageBuffer(Surface) and other extra steps that do not apply to OffscreenCanvas,
and also handles the additional situation when toImageData can be called on
worker thread.
BUG=657531
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/7922f33fe97e510c7259ebc077bd04ea2657e704
Cr-Commit-Position: refs/heads/master@{#441511}
Patch Set 1 #Patch Set 2 : expected image #Patch Set 3 : fix #Patch Set 4 : fix error #
Total comments: 4
Messages
Total messages: 19 (13 generated)
|