Title: [102277] branches/safari-534.53-branch/Source/WebKit2
Diff
Modified: branches/safari-534.53-branch/Source/WebKit2/ChangeLog (102276 => 102277)
--- branches/safari-534.53-branch/Source/WebKit2/ChangeLog 2011-12-07 22:47:29 UTC (rev 102276)
+++ branches/safari-534.53-branch/Source/WebKit2/ChangeLog 2011-12-07 22:48:49 UTC (rev 102277)
@@ -1,5 +1,26 @@
2011-12-07 Lucas Forschler <[email protected]>
+ Merge 99090
+
+ 2011-11-02 Anders Carlsson <[email protected]>
+
+ Plug-in snapshots are blurry in HiDPI
+ https://bugs.webkit.org/show_bug.cgi?id=71387
+ <rdar://problem/10385393>
+
+ Reviewed by Adam Roben.
+
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::snapshot):
+ Create the backing store in the right size and apply the contents scale factor
+ to the newly created graphics context.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::paint):
+ Pass the scale factor to ShareableBitmap::paint.
+
+2011-12-07 Lucas Forschler <[email protected]>
+
Merge 98892
2011-10-31 Anders Carlsson <[email protected]>
Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (102276 => 102277)
--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-12-07 22:47:29 UTC (rev 102276)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-12-07 22:48:49 UTC (rev 102277)
@@ -543,12 +543,20 @@
return 0;
ASSERT(m_isStarted);
-
- RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(m_frameRectInWindowCoordinates.size(), ShareableBitmap::SupportsAlpha);
+
+ IntSize backingStoreSize = m_pluginSize;
+ backingStoreSize.scale(contentsScaleFactor());
+
+ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(backingStoreSize, ShareableBitmap::SupportsAlpha);
OwnPtr<GraphicsContext> context = bitmap->createGraphicsContext();
+#if PLATFORM(MAC)
+ // FIXME: We should really call applyDeviceScaleFactor instead of scale, but that ends up calling into WKSI
+ // which we currently don't have initiated in the plug-in process.
+ context->scale(FloatSize(contentsScaleFactor(), contentsScaleFactor()));
+#endif
+
context->translate(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
-
platformPaint(context.get(), m_frameRectInWindowCoordinates, true);
return bitmap.release();
Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (102276 => 102277)
--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2011-12-07 22:47:29 UTC (rev 102276)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2011-12-07 22:48:49 UTC (rev 102277)
@@ -586,7 +586,7 @@
return;
if (m_snapshot) {
- m_snapshot->paint(*context, frameRect().location(), m_snapshot->bounds());
+ m_snapshot->paint(*context, contentsScaleFactor(), frameRect().location(), m_snapshot->bounds());
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes