Issue 134040 in chromium: image-rendering: -webkit-optimize-contrast does not work

206 views
Skip to first unread message

chro...@googlecode.com

unread,
Jun 21, 2012, 7:39:38 PM6/21/12
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: OS-Mac Area-Undefined Pri-2 Type-Bug

New issue 134040 by ogle....@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Chrome Version : 20.0.1132.39
OS Version: OS X 10.6.8
URLs (if applicable) : http://phrogz.net/tmp/canvas_image_zoom.html
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5: FAIL
Firefox 4.x: OK
IE 7/8/9:

What steps will reproduce the problem?
1. add 'image-rendering: -webkit-optimize-contrast' to any image or canvas
2. Zoom in on image
3.

What is the expected result?
Pixelation

What happens instead?
interpolation

Please provide any additional information below. Attach a screenshot if
possible.

This was reported for windows only here:

http://code.google.com/p/chromium/issues/detail?id=106662

But apparently was introduced in chrome 18 for mac as well.

We use this in a canvas app for zoom purposes. This bug along with
http://code.google.com/p/chromium/issues/detail?id=124756 is really killing
us. See the demo here: https://alpha.easel.io/demo

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8)
AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.39 Safari/536.11



Attachments:
chrome20.png 38.8 KB
firefox.png 8.1 KB

chro...@googlecode.com

unread,
Jun 22, 2012, 12:58:40 AM6/22/12
to chromi...@chromium.org
Updates:
Labels: -Area-Undefined Area-WebKit WebKit-Rendering

Comment #1 on issue 134040 by tk...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Sep 16, 2012, 7:04:23 PM9/16/12
to chromi...@chromium.org

Comment #3 on issue 134040 by jhuck...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

This has also just been blogged about by Dominic Szablewski, creator of
ImpactJS:

http://www.phoboslab.org/log/2012/09/drawing-pixels-is-hard

His jsFiddle showing the issue in chrome:

http://jsfiddle.net/VAXrL/21/

This would also REALLY help with HTML5 game development. Safari, Firefox
and Opera all now support this. Chrome is the last holdout!


chro...@googlecode.com

unread,
Sep 17, 2012, 8:13:23 AM9/17/12
to chromi...@chromium.org

Comment #4 on issue 134040 by ashlaa...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Please note there is a standard way of doing this in the latest editor's
draft via CanvasRenderingContext2D.imageSmoothingEnabled:
http://dev.w3.org/html5/2dcontext/#dom-context-2d-imagesmoothingenabled
This is probably preferable to a webkit-specific CSS property.

chro...@googlecode.com

unread,
Sep 17, 2012, 12:45:32 PM9/17/12
to chromi...@chromium.org

Comment #5 on issue 134040 by jhuck...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Yup, imageSmoothingEnabled works specifically for drawing "images" on a
canvas. But it doesn't work for non-canvas apps such as DOM games like
this:

http://www.effectgames.com/games/crystalgalaxy/

Also, imageSmoothingEnabled has no effect for putImageData(), which I
specifically need it for, such as in applications like this:

http://www.effectgames.com/demos/canvascycle/

- Joe


chro...@googlecode.com

unread,
Oct 2, 2012, 11:20:35 AM10/2/12
to chromi...@chromium.org
Updates:
Owner: tabatk...@chromium.org

Comment #6 on issue 134040 by sch...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Tab, can you help triage this?

chro...@googlecode.com

unread,
Dec 14, 2012, 2:10:36 AM12/14/12
to chromi...@chromium.org

Comment #7 on issue 134040 by W.J.Godf...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Hi guys, I actually have a similar problem using imageSmoothingEnabled. My
page gets the Snaps. Issue report here -
http://code.google.com/p/chromium/issues/detail?id=166100&thanks=166100&ts=1355463121
Code hosted here (works in Firefox) -
http://www.korimovement.com/world/walking-jumping-sprite/

If you could comment on my Issue report, that would be nice.

chro...@googlecode.com

unread,
Jun 11, 2013, 5:03:02 PM6/11/13
to chromi...@chromium.org

Comment #12 on issue 134040 by ibenrun...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Also confirming this for:
-Chromium 25.0.1364.160 Ubuntu 13.04 (25.0.1364.160-0ubuntu3)
-Chrome Version 26.0.1410.63 (Linux 64-bit)

I believe a CSS property is ideal, even if it ends up being Chrome/webkit
specific due to 'webkit-***' being tacked onto the beginning. CSS designers
are used to dealing with that...And there currently is no good way to
disable non-canvas filtering on images currently...And there's no reason to
have to use the Canvas for simple images.

I have a website that upscales sprites without using the canvas, but in Mac
OSX/Linux versions of Chrom(e/ium) these giant images get blurred, which
ruins the whole feel of the website:
http://heaven-story.net/#characters

Firefox has adopted a CSS property, image-rendering, to control this:
https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering

Adopting this would make CSS designing a lot easier for many...CSS
designers already have to deal with all the browser-specific properties
(moz-***, ms-***, webkit-***) as it is, trying to dig up browser-specific
properties for Chrome that don't even exist doesn't help things.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Jun 19, 2013, 3:40:35 AM6/19/13
to chromi...@chromium.org
Updates:
Status: Untriaged
Cc: msrchan...@chromium.org
Labels: -OS-Mac -Cr-Blink OS-All M-29

Comment #13 on issue 134040 by msrchan...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Able to reproduce the issue. Verified with the URL provided in the
Comment#3, "http://jsfiddle.net/VAXrL/21/"

This is a Non-Regression Issue. Can be seen from M24 builds.
Attaching a screenshot.



Attachments:
134040.jpg 59.7 KB

chro...@googlecode.com

unread,
Jun 24, 2013, 11:24:28 PM6/24/13
to chromi...@chromium.org

Comment #14 on issue 134040 by pdknsk: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Another URL I noticed this with.

https://miiverse.nintendo.net/posts/AYIHAAABAADKUKFY4VzVRA

chro...@googlecode.com

unread,
Oct 14, 2013, 5:24:43 AM10/14/13
to chromi...@chromium.org

Comment #16 on issue 134040 by pdknsk: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

I have figured out this actually works, but only when downscaling, like so.

background-image: url(/image_2x.png); /* 100px x 100px */
background-size: 100%;
width: 50px;
height: 50px;
image-rendering: -webkit-optimize-contrast;

Without image-rendering, the downscaled image is blurry, sharp otherwise.

chro...@googlecode.com

unread,
Jan 9, 2014, 11:01:31 PM1/9/14
to chromi...@chromium.org

Comment #17 on issue 134040 by jeffrey....@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

As seen in http://jsfiddle.net/zda24/ this is broken in all upscaling
cases, not just canvas, currently; it's broken for canvas, img and
background-image. In Safari, canvas and img work, and in Firefox, img
works. (None seems to support background-image).

I know this used to work for img elements, but it appears to have broken
sometime recently.

chro...@googlecode.com

unread,
Jan 17, 2014, 11:37:10 AM1/17/14
to chromi...@chromium.org

Comment #18 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

So when are they going to fix this?
This used to work in chrome prior 2013, but then suddenly one day they
decided to drop support for correct pixeled upscaling.

chro...@googlecode.com

unread,
Feb 22, 2014, 4:55:13 PM2/22/14
to chromi...@chromium.org

Comment #19 on issue 134040 by andr...@blixt.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Note that the specs[1] now state 'image-rendering: pixelated' instead
of 'image-rendering: -webkit-optimize-contrast'.

There is still no way to make <canvas> not blur when using a Retina/HD
screen in Chrome 33, unless you render 2x2 pixels per pixel.

[1] http://dev.w3.org/csswg/css-images/#the-image-rendering

chro...@googlecode.com

unread,
May 21, 2014, 12:51:50 PM5/21/14
to chromi...@chromium.org
Updates:
Owner: ---
Cc: bsalo...@chromium.org schen...@chromium.org
Labels: -Action-NeedsReview -MovedFrom-29 -29Untriaged Cr-Blink-CSS

Comment #20 on issue 134040 by sch...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Needs triaging to find the right CSS image rendering group. CCing a few who
may help.

chro...@googlecode.com

unread,
May 22, 2014, 7:57:42 PM5/22/14
to chromi...@chromium.org

Comment #23 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

"image-rendering: pixelated" doesn't work, nor does "image-rendering:
crisp-edges"....
For pixelated it says:
"When scaling the image up, the "nearest neighbor" or similar algorithm
must be used, so that the image appears to be simply composed of very large
pixels. When scaling down, this is the same as auto."

Are there any plans to fix this?
Proof: http://www.elrinth.com/sv/
The running MGS guy is supposed to scale pixeled not into a blurred mess.
I am using: 34.0.1847.137 m

chro...@googlecode.com

unread,
May 22, 2014, 9:50:21 PM5/22/14
to chromi...@chromium.org
Updates:
Cc: senorbla...@chromium.org hc...@chromium.org

Comment #24 on issue 134040 by vang...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Blink still only understands the -webkit-optimize-contrast property. Looks
like it should get passed all the way to the graphics context at which
point it sets a state in a skia SkPaint object:

https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp&rcl=1400145541&l=35

Not sure if that's respected .

It looks however like we have a couple of layout tests for it.

chro...@googlecode.com

unread,
May 26, 2014, 3:50:32 PM5/26/14
to chromi...@chromium.org
Updates:
Owner: hc...@chromium.org

Comment #28 on issue 134040 by ju...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Alpha, looks like you know this area. Assigning to you.

chro...@googlecode.com

unread,
Jun 26, 2014, 10:53:04 PM6/26/14
to chromi...@chromium.org
Updates:
Cc: no...@chromium.org mikelawt...@chromium.org

Comment #29 on issue 134040 by vang...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Jun 26, 2014, 11:47:08 PM6/26/14
to chromi...@chromium.org
Updates:
Cc: jack...@chromium.org

Comment #30 on issue 134040 by mikelawt...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

-webkit-optimise-contrast was originally specified in CSS Images Level 3,
and subsequently removed before the spec went to Candidate Rec. I did the
implementation in WebKit before it was removed from the spec.

'optimise-contrast' as a value name did not survive to the Level 4 spec,
and has been replaced by 'pixelated'. 'pixelated' was implemented by Jack
last week
(https://src.chromium.org/viewvc/blink?view=revision&revision=176839), and
works in Chrome Canary now if you enable
chrome://flags/#enable-experimental-web-platform-features. We intend to
enable it without needing the flag soon, but you can test it now, for
example on the page mentioned in the report:
http://phrogz.net/tmp/canvas_image_zoom.html

We may decide to continue to support -webkit-optimise-contrast as an alias
for pixelated, but I do not recommend anybody rely on this. The Blink
project wants to remove vendor prefixed things, and as
-webkit-optimise-contrast has never worked in Chrome (save for Chrome Mac
for a very short period) we would not regress by simply removing it.

chro...@googlecode.com

unread,
Jun 26, 2014, 11:55:07 PM6/26/14
to chromi...@chromium.org

Comment #31 on issue 134040 by mikelawt...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

And just to clarify the observations in earlier comments that
-webkit-optimise-contrast used to work in Chrome - it only ever worked for
CoreGraphics backends in WebKit. Supporting more graphics backends turned
into a yak shave that wasn't deemed worth it at the time. So it only ever
worked for Chrome Mac until we switched away from CG to Skia.

In Blink, we only support one graphics backend (Skia) and so there were
practically no yaks involved in making 'pixelated' work (yay!).

chro...@googlecode.com

unread,
Jun 27, 2014, 6:42:28 AM6/27/14
to chromi...@chromium.org

Comment #32 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Really looking forwards to when this makes it into the main chrome
builds... thanx for fixing this Jack!

chro...@googlecode.com

unread,
Jul 2, 2014, 2:10:38 PM7/2/14
to chromi...@chromium.org

Comment #33 on issue 134040 by webmas...@crystala.net: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Thank you for this. Chrome's lack of support for pixelated resize has been
the bane of my existence for what feels like years.

chro...@googlecode.com

unread,
Jul 2, 2014, 2:19:38 PM7/2/14
to chromi...@chromium.org

Comment #34 on issue 134040 by webmas...@crystala.net: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Also, will there ever be pixelated downsize? I tried pixelated on an
upsized image and it worked, but the downsized image was still blurry. I'm
on a Mac Retina, though.

chro...@googlecode.com

unread,
Jul 2, 2014, 4:48:22 PM7/2/14
to chromi...@chromium.org

Comment #35 on issue 134040 by webmas...@crystala.net: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Oh, please excuse my ignorance. It appears that pixelated applies only when
scaling up, according to the spec. Never mind me.

chro...@googlecode.com

unread,
Jul 2, 2014, 4:58:22 PM7/2/14
to chromi...@chromium.org

Comment #36 on issue 134040 by webmas...@crystala.net: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Is there a plan to implement image-rendering: crisp-edges any time soon?

chro...@googlecode.com

unread,
Jul 2, 2014, 11:42:46 PM7/2/14
to chromi...@chromium.org

Comment #37 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

You might want to follow the Intent to Ship thread for progress:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zSasd2LL8Mc

No plan for crisp-edges at the moment, but if you know of any use cases
that need it, feel free to add them to
https://code.google.com/p/chromium/issues/detail?id=317991.

chro...@googlecode.com

unread,
Jul 22, 2014, 11:14:21 AM7/22/14
to chromi...@chromium.org

Comment #38 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040#c38

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=178653

------------------------------------------------------------------
r178653 | jac...@chromium.org | 2014-07-22T14:23:41.686330Z

Changed paths:
M
http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/sdk/CSSMetadata.js?r1=178653&r2=178652&pathrev=178653
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=178653&r2=178652&pathrev=178653

Ship image-rendering: pixelated to stable.

This also adds the value to DevTools.

Intent to Ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zSasd2LL8Mc

BUG=317991,106662,260739,134040

Review URL: https://codereview.chromium.org/396063007
-----------------------------------------------------------------

chro...@googlecode.com

unread,
Jul 22, 2014, 11:52:21 AM7/22/14
to chromi...@chromium.org

Comment #39 on issue 134040 by andr...@blixt.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Are we sure this is working properly? I just tried out enabling
Experimental Canvas Features in Chrome v38.0.2096.0 dev (64-bit) on Mac OS
X, and I saw most canvases being pixelated, but some were still blurry. All
canvases use the same CSS rules, the only main difference I could find is
that the ones that were blurry had slightly larger sizes than the others.
See attached screenshots of the same scene in Firefox and Chrome.

The canvas with magenta outline is rendering fine in Chrome, while the one
with red outline (also hovered) is blurry.

The last screenshot shows the same bug without the hover so that you can
see it clearer.

There are no CSS rules that discern the two canvases from each other.

Attachments:
Screen Shot 2014-07-22 at 10.52.48 AM.png 1.2 MB
Screen Shot 2014-07-22 at 10.52.30 AM.png 955 KB
Screen Shot 2014-07-22 at 10.44.21 AM.png 1.3 MB

chro...@googlecode.com

unread,
Jul 22, 2014, 11:57:23 AM7/22/14
to chromi...@chromium.org

Comment #40 on issue 134040 by andr...@blixt.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

To clarify: note that the regions that are not blurry are part of other
canvases (the canvases are stacked on top of each other as part of layers,
using z-index in the style attribute). A canvas is either entirely blurred,
or entirely pixelated.

When zoomed out to 1:1 (or more), the canvases look fine, so it's not a
problem with the pixels in the canvas itself, only the resizing logic.

chro...@googlecode.com

unread,
Jul 22, 2014, 11:03:26 PM7/22/14
to chromi...@chromium.org

Comment #44 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Ah, I see. Currently the interpolation quality for pixelated is set here,
which I presume is the software path:
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/rendering/RenderHTMLCanvas.cpp&cl=GROK&l=76

Would you know where in the code I should be looking at to get this
propagated to the compositor?

chro...@googlecode.com

unread,
Jul 23, 2014, 12:43:20 AM7/23/14
to chromi...@chromium.org

Comment #45 on issue 134040 by jam...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

In the hardware accelerated path, the CanvasRenderingContext2D has a
composited layer through its canvas' buffer's Canvas2DImageBufferSurface.
The layer is of type WebExternalTextureLayer which doesn't currently expose
a filtering mode. The WebExternalTextureLayer is a wrapper for
cc::TextureLayer which is eventually drawn as a texture by the compositor.

One thing that's pretty annoying about OpenGL is that the filtering mode is
a property of the texture, not a property of the draw call, so to have it
drawn with a certain filtering mode you might have to coordinate with other
users of the texture (i.e. ganesh). junov@ - can you advise?

chro...@googlecode.com

unread,
Aug 21, 2014, 11:13:14 AM8/21/14
to chromi...@chromium.org

Comment #46 on issue 134040 by cengle...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Been about a month since any activity on this issue, any news on when this
should be updated? I'm scaling a webgl canvas with CSS and would like to
use this property to ensure it is nearest scaling.

chro...@googlecode.com

unread,
Aug 21, 2014, 12:25:38 PM8/21/14
to chromi...@chromium.org

Comment #47 on issue 134040 by ju...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
http://code.google.com/p/chromium/issues/detail?id=134040

Thanks for pinging. Adding a new field to cc::TextureLayer to control
filtering would be perfectly safe because Canvas2DLayerBridge already takes
the necessary precautions by assuming that the OpenGL texture's state may
have been altered by the compositor (which is already the case).

chro...@googlecode.com

unread,
Sep 25, 2014, 3:31:19 AM9/25/14
to chromi...@chromium.org

Comment #50 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040#c50

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=182649

------------------------------------------------------------------
r182649 | jac...@chromium.org | 2014-09-25T05:50:15.759817Z

Changed paths:
M
http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/sdk/CSSMetadata.js?r1=182649&r2=182648&pathrev=182649
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=182649&r2=182648&pathrev=182649

Revert of Ship image-rendering: pixelated to stable. (patchset #1 id:1 of
https://codereview.chromium.org/396063007/)

Reason for revert:
The bug affecting canvases also affects images that become compositor
layers. Unshipping until it's fixed.

Original issue's description:
> Ship image-rendering: pixelated to stable.

> This also adds the value to DevTools.

> Intent to Ship:
> https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zSasd2LL8Mc

> BUG=317991,106662,260739,134040

> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178653

TBR=vse...@chromium.org,ese...@chromium.org,tim...@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=317991,106662,260739,134040

Review URL: https://codereview.chromium.org/604683003
-----------------------------------------------------------------

chro...@googlecode.com

unread,
Sep 25, 2014, 5:20:23 AM9/25/14
to chromi...@chromium.org

Comment #51 on issue 134040 by no...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

> Reason for revert: The bug affecting canvases also affects images that
> become compositor layers. Unshipping until it's fixed.

Easy to fix I think, as we discussed off-line. Let me know.

chro...@googlecode.com

unread,
Sep 25, 2014, 5:22:24 AM9/25/14
to chromi...@chromium.org

Comment #52 on issue 134040 by no...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

And I should add, for some definition of "easy" ... :0

chro...@googlecode.com

unread,
Sep 29, 2014, 11:53:19 PM9/29/14
to chromi...@chromium.org
Updates:
Labels: merge-merged-2125

Comment #53 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040#c53

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=182882

------------------------------------------------------------------
r182882 | jac...@chromium.org | 2014-09-30T03:08:14.208416Z

Changed paths:
M
http://src.chromium.org/viewvc/blink/branches/chromium/2125/Source/devtools/front_end/sdk/CSSMetadata.js?r1=182882&r2=182881&pathrev=182882
M
http://src.chromium.org/viewvc/blink/branches/chromium/2125/Source/platform/RuntimeEnabledFeatures.in?r1=182882&r2=182881&pathrev=182882

Merge 182649 "Revert of Ship image-rendering: pixelated to stabl..."

> Revert of Ship image-rendering: pixelated to stable. (patchset #1 id:1 of
> https://codereview.chromium.org/396063007/)

> Reason for revert:
> The bug affecting canvases also affects images that become compositor
> layers. Unshipping until it's fixed.

> Original issue's description:
> > Ship image-rendering: pixelated to stable.
> >
> > This also adds the value to DevTools.
> >
> > Intent to Ship:
> >
> https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zSasd2LL8Mc
> >
> > BUG=317991,106662,260739,134040
> >
> > Committed:
> https://src.chromium.org/viewvc/blink?view=rev&revision=178653

> TBR=vse...@chromium.org,ese...@chromium.org,tim...@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=317991,106662,260739,134040

> Review URL: https://codereview.chromium.org/604683003

TBR=jac...@chromium.org

Review URL: https://codereview.chromium.org/612273002
-----------------------------------------------------------------

chro...@googlecode.com

unread,
Nov 1, 2014, 2:26:21 PM11/1/14
to chromi...@chromium.org

Comment #54 on issue 134040 by cengle...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

Any updates on a fix/version for this? Seems like it is just on the edge of
making it out.

chro...@googlecode.com

unread,
Nov 2, 2014, 5:08:55 PM11/2/14
to chromi...@chromium.org

Comment #55 on issue 134040 by jack...@google.com: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

Unfortunately it'll take some more work to get this rendering correctly for
GPU accelerated elements.

WIP for canvas here:
https://codereview.chromium.org/558083002/
https://codereview.chromium.org/562583002/

chro...@googlecode.com

unread,
Dec 3, 2014, 12:20:34 AM12/3/14
to chromi...@chromium.org

Comment #56 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040#c56

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=186368

------------------------------------------------------------------
r186368 | jac...@chromium.org | 2014-12-03T05:03:13.762514Z

Changed paths:
M
http://src.chromium.org/viewvc/blink/trunk/public/platform/WebExternalTextureMailbox.h?r1=186368&r2=186367&pathrev=186368

Add nearestNeighbor to WebExternalTextureMailbox.h

This is a pre-requisite for http://crrev.com/558083002

BUG=134040

Review URL: https://codereview.chromium.org/699103002
-----------------------------------------------------------------

chro...@googlecode.com

unread,
Dec 4, 2014, 12:57:50 AM12/4/14
to chromi...@chromium.org

Comment #57 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040#c57

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/10c9af41a73ac7db787d64344630f8200925cfe5

commit 10c9af41a73ac7db787d64344630f8200925cfe5
Author: jackhou <jac...@chromium.org>
Date: Thu Dec 04 05:24:44 2014

[cc] Add nearest neighbor filtering for TextureLayer.

Blink side is here (depends on this CL):
https://codereview.chromium.org/562583002/

This CL also depends on another blink side change here:
https://codereview.chromium.org/699103002/

BUG=134040

Review URL: https://codereview.chromium.org/558083002

Cr-Commit-Position: refs/heads/master@{#306768}

[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/blink/web_external_texture_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/blink/web_external_texture_layer_impl.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/delegated_frame_provider_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/heads_up_display_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/nine_patch_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/painted_scrollbar_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/texture_layer.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/texture_layer.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/texture_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/texture_layer_impl.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/texture_layer_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/ui_resource_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/layers/video_layer_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/output/gl_renderer.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/output/gl_renderer_draw_cache.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/output/gl_renderer_draw_cache.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/output/overlay_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/output/renderer_pixeltest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/quads/draw_quad_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/quads/texture_draw_quad.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/quads/texture_draw_quad.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/resources/resource_provider.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/resources/resource_provider_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/resources/texture_mailbox.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/resources/texture_mailbox.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/surfaces/surface_aggregator_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/test/render_pass_test_common.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/trees/layer_tree_host_impl.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/cc/trees/layer_tree_host_unittest_delegated.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/content/common/cc_messages.h
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/content/common/cc_messages_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/mojo/converters/surfaces/surfaces_type_converters.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/mojo/converters/surfaces/tests/surface_unittest.cc
[modify]
http://crrev.com/10c9af41a73ac7db787d64344630f8200925cfe5/mojo/services/public/interfaces/surfaces/quads.mojom

chro...@googlecode.com

unread,
Dec 7, 2014, 11:14:11 PM12/7/14
to chromi...@chromium.org
Updates:
Cc: nyerrami...@chromium.org tkonch...@chromium.org

Comment #58 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

Issue 260739 has been merged into this issue.

chro...@googlecode.com

unread,
Dec 7, 2014, 11:18:14 PM12/7/14
to chromi...@chromium.org
Updates:
Cc: tomh...@chromium.org bsalo...@google.com

Comment #59 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

Issue 106662 has been merged into this issue.

chro...@googlecode.com

unread,
Dec 17, 2014, 11:32:27 PM12/17/14
to chromi...@chromium.org

Comment #60 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040#c60

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=187428

------------------------------------------------------------------
r187428 | jac...@chromium.org | 2014-12-18T03:53:29.654145Z

Changed paths:
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-canvas-expected.txt?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-off-screen-expected.html?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-off-screen.html?r1=187428&r2=187427&pathrev=187428
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/Canvas2DLayerBridge.cpp?r1=187428&r2=187427&pathrev=187428
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/Canvas2DImageBufferSurface.h?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-canvas-expected.png?r1=187428&r2=187427&pathrev=187428
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/Canvas2DLayerBridge.h?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/virtual/gpu/fast/canvas/pixelated-expected.txt?r1=187428&r2=187427&pathrev=187428
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/ImageBuffer.h?r1=187428&r2=187427&pathrev=187428
M
http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLCanvasElement.cpp?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-resize.html?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/virtual/gpu/fast/canvas/pixelated-expected.png?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated.html?r1=187428&r2=187427&pathrev=187428
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/graphics/ImageBufferSurface.h?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-resize-expected.txt?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-canvas.html?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-expected.txt?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-resize-expected.png?r1=187428&r2=187427&pathrev=187428
A
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/pixelated-expected.png?r1=187428&r2=187427&pathrev=187428

Implement image-rendering:pixelated for accelerated 2D canvases.

This CL depends on a CC side change here:
https://codereview.chromium.org/558083002/

BUG=134040, 424025, 317991

Review URL: https://codereview.chromium.org/562583002
-----------------------------------------------------------------

chro...@googlecode.com

unread,
Dec 18, 2014, 11:55:32 PM12/18/14
to chromi...@chromium.org

Comment #61 on issue 134040 by bugdro...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040#c61

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=187505

------------------------------------------------------------------
r187505 | jac...@chromium.org | 2014-12-19T04:45:53.832093Z

Changed paths:
M
http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/sdk/CSSMetadata.js?r1=187505&r2=187504&pathrev=187505
M
http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=187505&r2=187504&pathrev=187505

Ship image-rendering: pixelated to stable.

This is effectively a revert of:
https://codereview.chromium.org/604683003
Which was itself a revert of the first attempt to ship pixelated:
https://codereview.chromium.org/396063007

It was reverted because pixelated did not work for accelerated elements.
This is now fixed.

Intent to ship thread:
https://groups.google.com/a/chromium.org/d/topic/blink-dev/zSasd2LL8Mc/discussion

BUG=134040,317991

Review URL: https://codereview.chromium.org/806413006

chro...@googlecode.com

unread,
Dec 19, 2014, 12:28:43 AM12/19/14
to chromi...@chromium.org

Comment #62 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

This is actually fixed now. If you use canary, please try it out over the
next few weeks and file any bugs. If all goes well, it'll be available in
M41.

chro...@googlecode.com

unread,
Dec 19, 2014, 12:40:19 AM12/19/14
to chromi...@chromium.org
Updates:
Status: Fixed

Comment #63 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Dec 19, 2014, 3:22:58 AM12/19/14
to chromi...@chromium.org

Comment #64 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

I can confirm, this still does not work in google canary. 41.0.2253.2
canary (64-bit)
Check www.elrinth.com, the character running should be pixelated. He is in
IE and Firefox, but not in google chrome.

chro...@googlecode.com

unread,
Dec 19, 2014, 6:50:49 PM12/19/14
to chromi...@chromium.org

Comment #66 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

I am using 41.0.2254.0 canary (64-bit)

chro...@googlecode.com

unread,
Dec 19, 2014, 6:53:48 PM12/19/14
to chromi...@chromium.org

Comment #67 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

I am using Version 41.0.2254.0 canary (64-bit)

image-rendering: -webkit-optimize-contrast;

still doesn't work for the animated gifs I have on my webpage.

chro...@googlecode.com

unread,
Dec 21, 2014, 9:43:10 PM12/21/14
to chromi...@chromium.org

Comment #68 on issue 134040 by jack...@chromium.org: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

Try image-rendering: pixelated. Or maybe something like this to support all
the browsers right now:

.pixelated {
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;

chro...@googlecode.com

unread,
Dec 22, 2014, 3:00:45 AM12/22/14
to chromi...@chromium.org

Comment #69 on issue 134040 by elri...@gmail.com: image-rendering:
-webkit-optimize-contrast does not work
https://code.google.com/p/chromium/issues/detail?id=134040

confirmed working then! :) thank you
Reply all
Reply to author
Forward
0 new messages