|
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
Total comments: 24
|
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
|
Total messages: 14 (0 generated)
|