Bug 22823 - REGRESSION (TOT): Canvas is broken in high dpi mode
Summary: REGRESSION (TOT): Canvas is broken in high dpi mode
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL: http://nerget.com/tests/canvas-high-d...
Keywords: InRadar
Depends on:
Reported: 2008-12-12 05:57 PST by Oliver Hunt
Modified: 2008-12-12 06:11 PST (History)
0 users

See Also:

Fix initial context scale (2.01 KB, patch)
2008-12-12 06:02 PST, Oliver Hunt
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-12-12 05:57:43 PST

I was working on another canvas issue and I realised the somewhere in the canvas refactorings of the past few months canvas lost the code that correctly scaled to handle high dpi display modes

1. Use Quartz Debug to change the display scale to 2x
2. Launch Safari (ToT) -- Safari must be launched *after* step 1
3. Go to http://nerget.com/tests/canvas-high-dpi.html
Comment 1 Oliver Hunt 2008-12-12 06:02:27 PST
Created attachment 25979 [details]
Fix initial context scale

Comment 2 Alexey Proskuryakov 2008-12-12 06:05:42 PST
Comment on attachment 25979 [details]
Fix initial context scale

+    m_imageBuffer->context()->scale(FloatSize(size.width()/unscaledSize.width(), size.height()/unscaledSize.height()));

Please add spaces around '/'.

+        transform.scale(size.width()/unscaledSize.width(), size.height()/unscaledSize.height());


Comment 3 Oliver Hunt 2008-12-12 06:11:48 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/html/HTMLCanvasElement.cpp
Committed r39240