This website requires JavaScript.
Explore
Help
Sign In
nephele
/
haikuwebkit
Watch
1
Star
0
Fork
You've already forked haikuwebkit
0
Code
Issues
Releases
Activity
haiku
haikuwebkit
/
LayoutTests
/
fast
/
canvas
/
canvas-resize-reset-pixelRa...
3 lines
33 B
Plaintext
Raw
Permalink
Normal View
History
Unescape
Escape
[Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS) https://bugs.webkit.org/show_bug.cgi?id=115310 Reviewed by Simon Fraser. Source/JavaScriptCore: Remove ENABLE_HIGH_DPI_CANVAS_macosx. * Configurations/FeatureDefines.xcconfig: Source/WebCore: Disable the automatic pixel doubling in canvas backing stores on high dpi devices. This will potentially make canvases look worse of high dpi displays, but only if they were ignoring devicePixelRatio. Since the majority of high dpi displays *do not* auto-double (including mobile devices and other desktop browsers), this provides consistency and less chance of unnecessary memory use. * Configurations/FeatureDefines.xcconfig: Remove ENABLE_HIGH_DPI_CANVAS_macosx. Source/WebKit/mac: Remove ENABLE_HIGH_DPI_CANVAS_macosx. * Configurations/FeatureDefines.xcconfig: Source/WebKit2: Remove ENABLE_HIGH_DPI_CANVAS_macosx. * Configurations/FeatureDefines.xcconfig: LayoutTests: No need for platform-specific results any more. * fast/canvas/2d.backingStorePixelRatio-expected.txt: * fast/canvas/2d.imageDataHD-expected.txt: * fast/canvas/canvas-resize-reset-pixelRatio-expected.txt: * platform/win/fast/canvas/2d.backingStorePixelRatio-expected.txt: Removed. * platform/win/fast/canvas/canvas-resize-reset-pixelRatio-expected.txt: Removed. Canonical link: https://commits.webkit.org/133750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-04-28 21:52:25 +00:00
High-DPI canvas is not enabled.
Source/WebCore: Reset the canvas backing store pixel ratio when the buffer resizes. The backing store was not being recreated using the current page pixel ratio when a resize occurred. https://bugs.webkit.org/show_bug.cgi?id=100608 Reviewed by Darin Adler. Test: fast/canvas/canvas-resize-reset-pixelRatio.html * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): Use targetDeviceScaleFactor. (WebCore::HTMLCanvasElement::reset): Do a clear only if the pixel ratios also match. Store the new pixel ratio in m_deviceScaleFactor. (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Added. * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::setSize): Return early only if the sizes and pixel ratios match. LayoutTests: Test the canvas backing store pixel ratio when the buffer resizes. https://bugs.webkit.org/show_bug.cgi?id=100608 Reviewed by Darin Adler. * fast/canvas/canvas-resize-reset-pixelRatio-expected.txt: Added. * fast/canvas/canvas-resize-reset-pixelRatio.html: Added. Canonical link: https://commits.webkit.org/119881@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-11-09 20:39:22 +00:00