Changeset 60391 in webkit
- Timestamp:
- May 28, 2010 11:27:54 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r60388 r60391 1 2010-05-28 Stephen White <senorblanco@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [CHROMIUM] Chromium port should support image interpolation quality 6 https://bugs.webkit.org/show_bug.cgi?id=38686 7 8 * platform/chromium/test_expectations.txt: 9 Add failure expectations for resizing-based tests, so they can be 10 rebaselined by the bots. 11 1 12 2010-05-28 Csaba Osztrogonác <ossy@webkit.org> 2 13 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r60301 r60391 2860 2860 BUG45106 WIN : svg/text/text-text-04-t.svg = PASS CRASH 2861 2861 BUG45106 WIN : svg/text/text-text-05-t.svg = PASS CRASH 2862 2863 // These test need to rebaselined after 38686 lands. 2864 BUG_WK38686 WIN LINUX : fast/backgrounds/size/backgroundSize15.html = IMAGE 2865 BUG_WK38686 WIN LINUX : fast/backgrounds/size/contain-and-cover.html = IMAGE 2866 BUG_WK38686 WIN LINUX : fast/borders/svg-as-border-image.html = IMAGE 2867 BUG_WK38686 WIN LINUX : fast/repaint/backgroundSizeRepaint.html = IMAGE 2868 BUG_WK38686 WIN LINUX : scrollbars/listbox-scrollbar-combinations.html = IMAGE 2869 BUG_WK38686 WIN LINUX : scrollbars/overflow-scrollbar-combinations.html = IMAGE 2870 BUG_WK38686 WIN LINUX : svg/W3C-SVG-1.1/coords-viewattr-02-b.svg = IMAGE -
trunk/WebCore/ChangeLog
r60389 r60391 1 2010-05-28 Stephen White <senorblanco@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Implement GraphicsContext::setImageInterpolation() for the Chromium 6 port. This is preparatory work for bug 38233. A number of 7 background-resize tests will need a rebaseline, since the images are 8 taken during the initial "low quality" phase (<800ms). 9 10 [CHROMIUM] Chromium port should support image interpolation quality 11 https://bugs.webkit.org/show_bug.cgi?id=38686 12 13 Covered by fast/backgrounds/size/backgroundSize15.html, and others. 14 15 * platform/graphics/skia/GraphicsContextSkia.cpp: 16 Implement WebCore::GraphicsContext::setImageInterpolationQuality. 17 * platform/graphics/skia/ImageSkia.cpp: 18 (WebCore::computeResamplingMode): Only enable high quality 19 interpolation if it has been requested in the GraphicsContext. 20 (WebCore::drawResampledBitmap): Enable cacheing of resampled images 21 even if the size is not full (fix from Brett Wilson). 22 (WebCore::paintSkBitmap): Pass in the PlatformContextSkia to 23 computeResamplingMode, so it can query it for interpolation quality. 24 (WebCore::Image::drawPattern): Ibid. 25 * platform/graphics/skia/PlatformContextSkia.cpp: 26 (PlatformContextSkia::State::State): 27 (PlatformContextSkia::interpolationQuality): 28 (PlatformContextSkia::setInterpolationQuality): 29 * platform/graphics/skia/PlatformContextSkia.h: 30 Add a member fn and accessors to retain the image interpolation quality 31 in the platform context, and to save/restore it with the state. 32 1 33 2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> 2 34 -
trunk/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r58916 r60391 876 876 } 877 877 878 void GraphicsContext::setImageInterpolationQuality(InterpolationQuality )879 { 880 notImplemented();878 void GraphicsContext::setImageInterpolationQuality(InterpolationQuality q) 879 { 880 platformContext()->setInterpolationQuality(q); 881 881 } 882 882 -
trunk/WebCore/platform/graphics/skia/ImageSkia.cpp
r59487 r60391 65 65 }; 66 66 67 static ResamplingMode computeResamplingMode( const NativeImageSkia& bitmap, int srcWidth, int srcHeight, float destWidth, float destHeight)67 static ResamplingMode computeResamplingMode(PlatformContextSkia* platformContext, const NativeImageSkia& bitmap, int srcWidth, int srcHeight, float destWidth, float destHeight) 68 68 { 69 69 int destIWidth = static_cast<int>(destWidth); … … 131 131 132 132 // Everything else gets resampled. 133 return RESAMPLE_AWESOME; 133 // If the platform context permits high quality interpolation, use it. 134 if (platformContext->interpolationQuality() == InterpolationHigh) 135 return RESAMPLE_AWESOME; 136 137 return RESAMPLE_LINEAR; 134 138 } 135 139 … … 185 189 return; // Resized image does not intersect. 186 190 187 if (srcIsFull &&bitmap.shouldCacheResampling(191 if (srcIsFull || bitmap.shouldCacheResampling( 188 192 resizedImageRect.width(), 189 193 resizedImageRect.height(), … … 231 235 232 236 ResamplingMode resampling = platformContext->isPrinting() ? RESAMPLE_NONE : 233 computeResamplingMode( bitmap, srcRect.width(), srcRect.height(),237 computeResamplingMode(platformContext, bitmap, srcRect.width(), srcRect.height(), 234 238 SkScalarToFloat(destRect.width()), 235 239 SkScalarToFloat(destRect.height())); … … 337 341 resampling = RESAMPLE_LINEAR; 338 342 else { 339 resampling = computeResamplingMode( *bitmap,343 resampling = computeResamplingMode(context->platformContext(), *bitmap, 340 344 srcRect.width(), srcRect.height(), 341 345 destBitmapWidth, destBitmapHeight); -
trunk/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
r54859 r60391 100 100 // order in which they were pushed. 101 101 WTF::Vector<SkPath> m_antiAliasClipPaths; 102 WebCore::InterpolationQuality m_interpolationQuality; 102 103 103 104 private: … … 124 125 , m_dash(0) 125 126 , m_textDrawingMode(WebCore::cTextFill) 127 , m_interpolationQuality(WebCore::InterpolationHigh) 126 128 { 127 129 } … … 148 150 , m_clip(other.m_clip) 149 151 #endif 152 , m_interpolationQuality(other.m_interpolationQuality) 150 153 { 151 154 // Up the ref count of these. saveRef does nothing if 'this' is NULL. … … 540 543 } 541 544 545 WebCore::InterpolationQuality PlatformContextSkia::interpolationQuality() const 546 { 547 return m_state->m_interpolationQuality; 548 } 549 550 void PlatformContextSkia::setInterpolationQuality(WebCore::InterpolationQuality interpolationQuality) 551 { 552 m_state->m_interpolationQuality = interpolationQuality; 553 } 554 542 555 void PlatformContextSkia::setDashPathEffect(SkDashPathEffect* dash) 543 556 { -
trunk/WebCore/platform/graphics/skia/PlatformContextSkia.h
r54262 r60391 148 148 skia::PlatformCanvas* canvas() { return m_canvas; } 149 149 150 WebCore::InterpolationQuality interpolationQuality() const; 151 void setInterpolationQuality(WebCore::InterpolationQuality interpolationQuality); 152 150 153 // FIXME: This should be pushed down to GraphicsContext. 151 154 void drawRect(SkRect rect);
Note: See TracChangeset
for help on using the changeset viewer.