On 09/24/2014 09:32 AM, L. David Baron wrote:
> Or, alternatively, it seems like the use case here would be 
> addressed by doing what the spec said before.  Is it really that 
> much harder to do?

No, it's not much harder.

> Is it just that we'd need to add another value to pass through
> various layers of code, and then support that value?

Correct -- we'd need to add a new enum value to GraphicsFilter, here...
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/GraphicsFilter.h
...and then we'd need to adjust all the code that depends on
GraphicsFilter enum-values to either have an "upscaling or
downscaling?" check (or in some cases, if we can't tell about
upscaling vs. downscaling at that point in the code, we'd need to
ensure that all upstream or downstream code includes such a check).

So: not particularly hard.  Just some extra logic / complexity in a
handful of places -- on the order of 10 places, perhaps, based on a
MXR search for GraphicsFilter::FILTER_NEAREST. (That turns up 6
comparisons with "==" and 3 "case" statements, where we'd likely need
to consider the new enum value as well, or convert out of it before we
hit that code.)

If "auto" downscaling actually makes a noticable difference for e.g.
favicons, then I'm fine with adding back the distinction.  (I'd be
interested in seeing examples of its benefits, though; that would help
make things more concrete.)

> (Also, I think 'crisp-edges' in the spec is intended to be 
> algorithms better than nearest neighbor.  I'm hesitant to unprefix 
> '-moz-crisp-edges' immediately, although we might consider just 
> removing it.)

I agree that we shouldn't unprefix -moz-crisp-edges.

I also don't think we should drop it quite yet, since it's the only
way authors have had to request this behavior (and no browser
release-version uses "pixelated" yet, so authors don't necessarily
know to use that keyword yet either. Though I expect they soon will,
given that this will be the only way to get NN-scaling in Chrome, once
it's released there.)

Maybe after we've shipped "pixelated" for a release, we can make the
call to unprefix or drop/hide -moz-crisp-edges.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to