New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 766018 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 634542



Sign in to add a comment

Refactor ImageDataInCanvasColorSettings()

Project Member Reported by zakerinasab@chromium.org, Sep 18 2017

Issue description

ImageData::ImageDataInCanvasColorSettings() creates an extra copy of data ...
- when no color conversion is needed.
- when image data uses U16 storage format and data must get converted from Little Endian to Big Endian.

Refactor this function to remove the extra copy.
 
Update: the case when no color conversion is needed still needs to copy the data as the call site (BaseRenderingContext2D::putImageData) wants to consume the data by putting it in an ImageBuffer.
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48eb6e065cce65ff57d7eb1c193f4b50ef34c5b8

commit 48eb6e065cce65ff57d7eb1c193f4b50ef34c5b8
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue Sep 19 03:02:42 2017

Avoid data copy in ImageData for BE<->LE conversions

ImageData::ImageDataInCanvasColorSettings() creates an extra copy of data when image data uses U16 storage format and data must get converted from Little Endian to Big Endian. This change refactors this function to remove this extra copy.

Bug:  766018 
Change-Id: I54b90f79887be884449d0d4739c990e21bc6aa5b
Reviewed-on: https://chromium-review.googlesource.com/670520
Reviewed-by: Xida Chen <xidachen@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502768}
[modify] https://crrev.com/48eb6e065cce65ff57d7eb1c193f4b50ef34c5b8/third_party/WebKit/Source/core/html/ImageData.cpp

Status: Fixed (was: Assigned)
Blocking: 634542

Sign in to add a comment