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

Issue 1846513002: Make HasRepresentation() work better for vector images. (Closed)

Created:
4 years, 8 months ago by Peter Kasting
Modified:
4 years, 8 months ago
Reviewers:
oshima, Evan Stade
CC:
chromium-reviews, rsesek+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@deinline_imageskiastorage
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make HasRepresentation() work better for vector images. Since vector images do not have an initial, preset group of representations loaded, if GetRepresentation() has not yet been called for a particular scale factor, HasRepresentation() will return false, even though a call to GetRepresentation() would succeed. This plumbs a new function that allow vector images to say that they can provide a representation at any scale factor, and thus HasRepresentation() can succeed as long as the image is not VECTOR_ICON_NONE. For the rationale that led to this, see the CL comments on https://codereview.chromium.org/1829353002/ . BUG=none TEST=none Committed: https://crrev.com/0c287a38f4d35d9e01cee7691a37b1ea0e85263a Cr-Commit-Position: refs/heads/master@{#384132}

Patch Set 1 #

Patch Set 2 : Merge correctly #

Patch Set 3 : De-inline #

Patch Set 4 : Add DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -1 line) Patch
M ui/gfx/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/image/image_skia.cc View 1 2 3 4 chunks +21 lines, -0 lines 0 comments Download
M ui/gfx/image/image_skia_source.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
A ui/gfx/image/image_skia_source.cc View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M ui/gfx/paint_vector_icon.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 11 (4 generated)
Peter Kasting
estade: OWNERS for paint_vector_icon.cc oshima: Review. Please verify that my understanding of how HasRepresentation() ought ...
4 years, 8 months ago (2016-03-30 03:29:49 UTC) #2
oshima
On 2016/03/30 03:29:49, Peter Kasting wrote: > estade: OWNERS for paint_vector_icon.cc > oshima: Review. Please ...
4 years, 8 months ago (2016-03-30 19:34:34 UTC) #3
Evan Stade
vector file lgtm
4 years, 8 months ago (2016-03-30 21:31:51 UTC) #4
Peter Kasting
On 2016/03/30 19:34:34, oshima wrote: > On 2016/03/30 03:29:49, Peter Kasting wrote: > > estade: ...
4 years, 8 months ago (2016-03-30 21:39:09 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1846513002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1846513002/60001
4 years, 8 months ago (2016-03-30 21:39:47 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 8 months ago (2016-03-30 23:04:23 UTC) #9
commit-bot: I haz the power
4 years, 8 months ago (2016-03-30 23:05:55 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/0c287a38f4d35d9e01cee7691a37b1ea0e85263a
Cr-Commit-Position: refs/heads/master@{#384132}

Powered by Google App Engine
This is Rietveld 408576698