Refactor WebGL texture uploading from DOM sources.
The current code was fragile, relying on only approximate answers about whether a canvas was accelerated or not. Refactor the upload paths for canvases and ImageBitmaps to properly make the decision about whether to take the GPU or CPU based upload path based on whether the resource they receive (usually an Image) is texture-backed. Replace TexImageCanvasByGPU and TexImageBitmapByGPU with a single TexImageViaGPU. More refactorings are possible, and will be built on this. This CL is being kept self-contained for backport to earlier releases. Tested with new conformance test in https://github.com/KhronosGroup/WebGL/pull/2706 . Bug: 878545 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I8a2653ef9f4a0cc6a36ba381941f5c30c94a57d8 Reviewed-on: https://chromium-review.googlesource.com/1217856 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by:Kai Ninomiya <kainino@chromium.org> Cr-Commit-Position: refs/heads/master@{#591096}
Showing
This diff is collapsed.
Please register or sign in to comment