Refactor CanvasAsyncBlobCreator to use StaticBitmapImage |
|||||
Issue descriptionHTMLCanvasElement and OffscreenCanvas toDataURL() and toBlob() functions essentially work as follows: - make a snapshot, - create an ImageData from snapshot, - send the ImageData to CanvasAsyncBlobCreator for encoding. However, CanvasAsyncBlobCreator is now using Skia encoders, which means we can remove the intermediate snapshot to ImageData conversion. By refactoring CanvasAsyncBlobCreator to do so, we gain a couple of benefits: the color information is plumbed automatically, the code gets significantly simplified, and we save memory and CPU cycles by removing ImageData from the pipeline.
,
Nov 20 2017
,
Nov 27 2017
,
Dec 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e0ab6ae54cc837abd96024dae5595a8d299e7b8 commit 6e0ab6ae54cc837abd96024dae5595a8d299e7b8 Author: Reza.Zakerinasab <zakerinasab@chromium.org> Date: Tue Dec 05 16:37:10 2017 Refactor CanvasAsyncBlobCreator to use StaticBitmapImage This change refactors CanvasAsyncBlobCreator to remove the intermediate ImageData object and use StaticBitmapImage directly. Bug: 787039 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;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 Change-Id: I8b49cfc455a50a06a83ebc3dc3c6f418346be4db Reviewed-on: https://chromium-review.googlesource.com/780279 Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Olivia Lai <xlai@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org> Cr-Commit-Position: refs/heads/master@{#521715} [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/core/html/HTMLCanvasElement.h [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp [modify] https://crrev.com/6e0ab6ae54cc837abd96024dae5595a8d299e7b8/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
,
Dec 5 2017
,
Apr 2 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by zakerinasab@chromium.org
, Nov 20 2017