Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 127 users
Status: Fixed
Owner:
User never visited
Closed: Dec 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 353716



Sign in to add a comment
image-rendering: -webkit-optimize-contrast does not work
Reported by ogle....@gmail.com, Jun 21 2012 Back to list
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


 
chrome20.png
38.8 KB View Download
firefox.png
8.1 KB View Download
Comment 1 by tkent@chromium.org, Jun 22 2012
Labels: -Area-Undefined Area-WebKit WebKit-Rendering
Project Member Comment 2 by bugdroid1@chromium.org, Aug 10 2012
Labels: Action-NeedsReview
There were at least 5 stars on this issue, in the last 90 days, we should review.
Comment 3 by jhuck...@gmail.com, Sep 16 2012
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!

Comment 4 by ashlaa...@gmail.com, Sep 17 2012
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.
Comment 5 by jhuck...@gmail.com, Sep 17 2012
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

Owner: tabatkins@chromium.org
Tab, can you help triage this?
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.
Project Member Comment 8 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -WebKit-Rendering Cr-Content-Rendering Cr-Content
Project Member Comment 9 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 10 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content-Rendering Cr-Blink-Rendering
Confirming this for Chrome 27.0.1453.110, Mac OS 10.8.3

In Safari this works as expected.
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.
Cc: msrchandra@chromium.org
Labels: -OS-Mac -Cr-Blink OS-All M-29
Status: Untriaged
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.


134040.jpg
59.7 KB View Download
Comment 14 by pdknsk@gmail.com, Jun 25 2013
Another URL I noticed this with.

https://miiverse.nintendo.net/posts/AYIHAAABAADKUKFY4VzVRA
Comment 15 by k...@google.com, Oct 1 2013
Labels: -M-29 MovedFrom-29 29Untriaged
Moving all bugs marked as M-29 and Untriaged have no milestone.  Search on 29Untriaged.
Comment 16 by pdknsk@gmail.com, Oct 14 2013
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.
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.
Comment 18 by elri...@gmail.com, Jan 17 2014
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.
Comment 19 by m...@blixt.org, Feb 22 2014
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
Cc: schenney@chromium.org bsalomon@chromium.org
Labels: -Action-NeedsReview -MovedFrom-29 -29Untriaged Cr-Blink-CSS
Owner: ----
Needs triaging to find the right CSS image rendering group. CCing a few who may help.
Labels: Hotlist-ImportantForGames
Cc: vangelis@chromium.org junov@chromium.org
I suspect that the filtering used for the zoom is controlled by the compositor.
Comment 23 by elri...@gmail.com, May 22 2014
"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
Cc: senorblanco@chromium.org hclam@chromium.org
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. 

Has this been broken since the accelerated Canvas launch, then?
Blockedon: chromium:353716
Owner: junov@chromium.org
Status: Assigned
Looks like that at least for canvas it's a known issue.  See  issue 353716 . 

Justin, assigning to you for now for the canvas aspect. 
Comment 27 by hclam@chromium.org, May 23 2014
That's right. See this code here: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/rendering/RenderHTMLCanvas.cpp&l=70

It should be InterpolationNone instead of InterpolationLow.

Comment 28 by junov@chromium.org, May 26 2014
Owner: hclam@chromium.org
Alpha, looks like you know this area. Assigning to you.
Cc: noel@chromium.org mikelawther@chromium.org
Cc: jackhou@chromium.org
-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.
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!).
Comment 32 by elri...@gmail.com, Jun 27 2014
Really looking forwards to when this makes it into the main chrome
builds... thanx for fixing this Jack!
Thank you for this. Chrome's lack of support for pixelated resize has been the bane of my existence for what feels like years.
Comment 34 Deleted
Comment 35 Deleted
Is there a plan to implement image-rendering: crisp-edges any time soon?
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.
Project Member Comment 38 by bugdroid1@chromium.org, Jul 22 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=178653

------------------------------------------------------------------
r178653 | jackhou@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
-----------------------------------------------------------------
Comment 39 by m...@blixt.org, Jul 22 2014
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.
Screen Shot 2014-07-22 at 10.52.48 AM.png
1.2 MB View Download
Screen Shot 2014-07-22 at 10.44.21 AM.png
1.3 MB View Download
Screen Shot 2014-07-22 at 10.52.30 AM.png
955 KB View Download
Comment 40 by m...@blixt.org, Jul 22 2014
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.
You could try switching on "Experimental Web Platform Features" which definitely enables pixelated. (I'm not sure if Experimental Canvas Features does).

Otherwise r178653 should make it into Canary in the next few days. You can check the version of blink/webkit in Canary here: http://omahaproxy.appspot.com/
Comment 42 by m...@blixt.org, Jul 23 2014
@jack: In the screenshots, "Experimental Web Platform Features" was also enabled. As you can see in the screenshots, most of the canvas elements were pixelated (they're all upscaled, so they would be blurry otherwise), showing that the feature is enabled — the error I'm seeing is that a few of them are not pixelated despite the fact that pixelated does work in most cases.

If the screenshots are not sufficient information to go on, I'll try to reproduce the bug in a standalone application. But like I said above, it seems the bug appears for canvases of certain sizes (canvas of original size 256x256 worked, but not 324x426).
Sounds like a difference between accelerated and software canvases.  Are we propagating the interpolation factor to the compositor correctly?
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?
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?
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.
Comment 47 by junov@chromium.org, Aug 21 2014
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).
Comment 48 by junov@chromium.org, Sep 10 2014
Owner: jackhou@chromium.org
WIP: https://codereview.chromium.org/562583002/
Comment 49 by junov@chromium.org, Sep 10 2014
Cc: pbomm...@chromium.org
 Issue 411144  has been merged into this issue.
Project Member Comment 50 by bugdroid1@chromium.org, Sep 25 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=182649

------------------------------------------------------------------
r182649 | jackhou@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=vsevik@chromium.org,eseidel@chromium.org,timloh@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=317991, 106662 , 260739 , 134040 

Review URL: https://codereview.chromium.org/604683003
-----------------------------------------------------------------
Comment 51 by noel@chromium.org, Sep 25 2014
> 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.

Comment 52 by noel@chromium.org, Sep 25 2014
And I should add, for some definition of "easy" ... :0 
Project Member Comment 53 by bugdroid1@chromium.org, Sep 30 2014
Labels: merge-merged-2125
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=182882

------------------------------------------------------------------
r182882 | jackhou@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=vsevik@chromium.org,eseidel@chromium.org,timloh@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=317991, 106662 , 260739 , 134040 
> 
> Review URL: https://codereview.chromium.org/604683003

TBR=jackhou@chromium.org

Review URL: https://codereview.chromium.org/612273002
-----------------------------------------------------------------
Any updates on a fix/version for this? Seems like it is just on the edge of making it out.
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/
Project Member Comment 56 by bugdroid1@chromium.org, Dec 3 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=186368

------------------------------------------------------------------
r186368 | jackhou@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
-----------------------------------------------------------------
Project Member Comment 57 by bugdroid1@chromium.org, Dec 4 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10c9af41a73ac7db787d64344630f8200925cfe5

commit 10c9af41a73ac7db787d64344630f8200925cfe5
Author: jackhou <jackhou@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

Cc: nyerramilli@chromium.org tkonch...@chromium.org
 Issue 260739  has been merged into this issue.
Cc: bsalo...@google.com tomhud...@chromium.org
 Issue 106662  has been merged into this issue.
Project Member Comment 60 by bugdroid1@chromium.org, Dec 18 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=187428

------------------------------------------------------------------
r187428 | jackhou@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
-----------------------------------------------------------------
Project Member Comment 61 by bugdroid1@chromium.org, Dec 19 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=187505

------------------------------------------------------------------
r187505 | jackhou@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
-----------------------------------------------------------------
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.
Status: Fixed
Comment 64 by elri...@gmail.com, Dec 19 2014
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.
You're probably just to quick, 41.0.2254.0 looks like it'll include the change (its blink revision is 187517, the change is 187504. See omahaproxy.appspot.com).
Comment 66 Deleted
Comment 67 by elri...@gmail.com, Dec 19 2014
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.
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;
}


Comment 69 by elri...@gmail.com, Dec 22 2014
confirmed working then! :) thank you
Labels: -Cr-Blink-Rendering Cr-Blink-Layout
Migrate from Cr-Blink-Rendering to Cr-Blink-Layout
Sign in to add a comment