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

Issue 1373253004: Fix bug testing SkCodec for ICO (Closed)

Created:
5 years, 2 months ago by scroggo
Modified:
5 years, 2 months ago
Reviewers:
msarett
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix bug testing SkCodec for ICO Looking in Gold, I see some ICO images that only show the upper left corner of the originals. It is happening because we use different ways of deciding what the dimensions are: In CodecSrc::size(), we use an SkScaledCodec to get the dimensions, even when fMode is not kScaledCodec_Mode. In CodecSrc::draw(), we only use SkScaledCodec in kScaledCodec_Mode. My recent CL to combine SkScanlineDecoder with SkCodec revealed this bug, because now SkScaledCodec::NewFromStream will succeed on ICO. (Previously, it failed because we do not yet have a scanline decoder for ICO (skbug.com/4404). Now that they are combined, we would need to specially flag ICO to stop returning an SkScaledCodec.) Switch size() to use the correct type of codec. Committed: https://skia.googlesource.com/skia/+/7fac5af5e9310826721ff416bdbe71294d607b2a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -8 lines) Patch
M dm/DMSrcSink.cpp View 1 chunk +10 lines, -8 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
scroggo
Matt, I think this is a good change regardless, but we could independently fix the ...
5 years, 2 months ago (2015-09-30 18:17:53 UTC) #2
msarett
lgtm
5 years, 2 months ago (2015-09-30 18:19:57 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373253004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373253004/1
5 years, 2 months ago (2015-09-30 18:26:08 UTC) #5
commit-bot: I haz the power
5 years, 2 months ago (2015-09-30 18:33:17 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/7fac5af5e9310826721ff416bdbe71294d607b2a

Powered by Google App Engine
This is Rietveld 408576698