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

Issue 2578803002: Remove full-size bitmap copy on SkImage::scalePixels->IFG::decodeAndScale

Created:
4 years ago by aleksandar.stojiljkovic
Modified:
3 years, 11 months ago
CC:
chromium-reviews, krit, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, pdr+graphicswatchlist_chromium.org, jbroman, Justin Novosad, Rik, f(malita), blink-reviews, danakj+watch_chromium.org, ajuma+watch_chromium.org, Stephen Chennney, rwlbuis, reed1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove full-size bitmap copy on SkImage::scalePixels->IFG::decodeAndScale This and related skia patch [1] move pixmap scaling from SkImage::scalePixels to ImageFrameGenerator (IFG) decodeAndScale. In following cases this removes a full size decoded pixels copy: 1. GIF/WebP animation frames are owned by decoder 2. partially received and decoded images (single and multiple frames) as they also cannot be decoded to externally provided pixels. [1] dependent skia patch https://skia-review.googlesource.com/c/5960/ BUG=100170, 438323, 472630, 671821

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -12 lines) Patch
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp View 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h View 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 2 chunks +16 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp View 2 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
aleksandar.stojiljkovic
fmalita@, PTAL. Thanks.
4 years ago (2016-12-15 00:17:36 UTC) #2
f(malita)
+scroggo
4 years ago (2016-12-15 20:53:38 UTC) #4
aleksandar.stojiljkovic
On 2016/12/15 20:53:38, f(malita) wrote: > +scroggo scroggo@, since you are the reviewer in skia ...
3 years, 11 months ago (2017-01-09 21:06:08 UTC) #6
scroggo_chromium
On 2017/01/09 21:06:08, aleksandar.stojiljkovic wrote: > On 2016/12/15 20:53:38, f(malita) wrote: > > +scroggo > ...
3 years, 11 months ago (2017-01-12 15:01:28 UTC) #8
reed1
generate-scaled-pixels is problematic (at least in my mind), so I'd prefer we have a chat ...
3 years, 11 months ago (2017-01-12 15:15:53 UTC) #9
scroggo_chromium
On 2017/01/12 15:15:53, reed1 wrote: > generate-scaled-pixels is problematic (at least in my mind), so ...
3 years, 11 months ago (2017-01-12 15:34:11 UTC) #10
aleksandar.stojiljkovic
3 years, 11 months ago (2017-01-12 16:45:53 UTC) #11
On 2017/01/12 15:34:11, scroggo_chromium wrote:
> On 2017/01/12 15:15:53, reed1 wrote:
> > generate-scaled-pixels is problematic (at least in my mind), so I'd prefer
we
> > have a chat about it before landing code that relies on it.
> > 
> > Is everyone available today for a vc?
> 
> I am available today. (My calendar shows when I am unavailable.)

Some input for your discussion around Skia design here [1]
Now 1) getPixels (when info.getBounds() != getInfo().getBounds()) and 2)
generateScaledPixels are covering the same functionality so we could try using
getPixels and remove generateScaledPixels and computeScaled...

Subset decoding might be needed for
https://bugs.chromium.org/p/chromium/issues/detail?id=671821#c2 (Decode
sub-rects for images embedded in SkImageShader) but we could analyze that
separatelly.
 
[1]
https://skia-review.googlesource.com/c/6278/#message-b7e325cc1718fc3cb9c80117...

Powered by Google App Engine
This is Rietveld 408576698