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

Issue 201513003: Implement InterpolationMedium to filter animated images (Closed)

Created:
6 years, 9 months ago by Alpha Left Google
Modified:
6 years, 9 months ago
CC:
blink-reviews, ed+blinkwatch_opera.com, krit, gyuyoung.kim_webkit.org, jamesr, jbroman, zoltan1, dsinclair, bemjb+rendering_chromium.org, eae+blinkwatch, leviw+renderwatch, fs, danakj, dglazkov+blink, Rik, f(malita), adamk+blink_chromium.org, jchaffraix+rendering, pdr., kouhei+svg_chromium.org, Stephen Chennney, rwlbuis, reveman
Visibility:
Public.

Description

Implement InterpolationMedium to filter animated images Since r168759 we use bilinear filtering for animated images. There are complaints about the drop in image quality. However we don't want to spend a lot of CPU cycles doing high quality animations for upscaling. This change is a compromise for animated images: we do a cheaper mipmapping for downscaling and bilinear for upscaling. There is a noticable quality improvement. This change implements InterpolationMedium for GraphicsContext. It used to be equivalent to InterpolationLow and is now a higher quality option. All GraphicsContext::drawSomething() methods have |useLowQualityScale| removed. This gives a much cleaner code. I also discovered/fixed a couple small issues with interpolation levels: * It is apparent now that InterpolationDefault means InterpolationHigh on desktop and InterpolationLow on Android. * Default for canvas elements used to InterpolationMedium but it really meant InterpolationLow. * There is a bug for rendering images in canvas that InterpolationNone should be used but it has been InterpolationLow all along. I didn't fix in this change but added a FIXME. The new interpolation level does not affect non-animated images. There is no need to rebaseline any pixel test. I added a test GIF file that loops two identical frames. This is used to test the image quality. BUG=353251 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169585

Patch Set 1 #

Total comments: 24

Patch Set 2 : remove InterpolationQuality #

Patch Set 3 : only ode change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -102 lines) Patch
M Source/core/html/HTMLCanvasElement.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/ImageQualityController.h View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/rendering/ImageQualityController.cpp View 1 2 chunks +15 lines, -4 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 2 chunks +7 lines, -4 lines 0 comments Download
M Source/core/rendering/RenderHTMLCanvas.cpp View 1 1 chunk +7 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderImage.cpp View 1 1 chunk +5 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGImage.cpp View 1 1 chunk +6 lines, -3 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.h View 1 1 chunk +8 lines, -8 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.cpp View 1 6 chunks +17 lines, -50 lines 0 comments Download
M Source/platform/graphics/GraphicsContextState.cpp View 1 chunk +1 line, -5 lines 0 comments Download
M Source/platform/graphics/GraphicsTypes.h View 1 chunk +6 lines, -2 lines 0 comments Download
M Source/platform/graphics/ImageBuffer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/ImageBuffer.cpp View 1 2 chunks +2 lines, -3 lines 0 comments Download
M Source/platform/graphics/skia/NativeImageSkia.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/platform/graphics/skia/NativeImageSkia.cpp View 1 4 chunks +24 lines, -9 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Alpha Left Google
6 years, 9 months ago (2014-03-18 02:10:06 UTC) #1
Stephen Chennney
Any chance this could be a ref test? https://codereview.chromium.org/201513003/diff/1/Source/core/rendering/ImageQualityController.cpp File Source/core/rendering/ImageQualityController.cpp (right): https://codereview.chromium.org/201513003/diff/1/Source/core/rendering/ImageQualityController.cpp#newcode68 Source/core/rendering/ImageQualityController.cpp:68: // ...
6 years, 9 months ago (2014-03-18 12:56:31 UTC) #2
Stephen White
https://codereview.chromium.org/201513003/diff/1/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/201513003/diff/1/Source/core/html/HTMLCanvasElement.cpp#newcode306 Source/core/html/HTMLCanvasElement.cpp:306: void HTMLCanvasElement::paint(GraphicsContext* context, const LayoutRect& r, InterpolationQuality interpolationQuality) I ...
6 years, 9 months ago (2014-03-18 17:26:43 UTC) #3
Alpha Left Google
I'm not sure I can make a ref test. Because there's no other images rendered ...
6 years, 9 months ago (2014-03-18 22:59:12 UTC) #4
Stephen White
Looks good (assuming the bots are happy), but I'll leave for schenney@ to take a ...
6 years, 9 months ago (2014-03-19 13:57:56 UTC) #5
Stephen Chennney
All good. LGTM.
6 years, 9 months ago (2014-03-19 15:23:41 UTC) #6
Alpha Left Google
On 2014/03/19 15:23:41, Stephen Chenney wrote: > All good. LGTM. I'll submit this change without ...
6 years, 9 months ago (2014-03-19 19:42:01 UTC) #7
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 9 months ago (2014-03-19 19:52:18 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/201513003/40001
6 years, 9 months ago (2014-03-19 19:52:20 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-19 20:39:13 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-19 20:39:14 UTC) #11
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 9 months ago (2014-03-19 20:55:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/201513003/40001
6 years, 9 months ago (2014-03-19 20:55:17 UTC) #13
commit-bot: I haz the power
6 years, 9 months ago (2014-03-19 21:37:15 UTC) #14
Message was sent while issue was closed.
Change committed as 169585

Powered by Google App Engine
This is Rietveld 408576698