[haiku-webkit-commits] r317 - webkit/trunk/WebCore/platform/graphics/haiku

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Tue, 16 Mar 2010 14:26:03 +0000

Author: stippi
Date: Tue Mar 16 14:26:02 2010
New Revision: 317
URL: http://mmlr.dyndns.org/changeset/317

Log:
Implement obeying the image quality via passing the rendering options to
DrawBitmapAsync(). Seems to work just fine, i.e. scaled images look smooth.

Modified:
   webkit/trunk/WebCore/platform/graphics/haiku/ImageHaiku.cpp

Modified: webkit/trunk/WebCore/platform/graphics/haiku/ImageHaiku.cpp
==============================================================================
--- webkit/trunk/WebCore/platform/graphics/haiku/ImageHaiku.cpp Tue Mar 16 
14:24:49 2010        (r316)
+++ webkit/trunk/WebCore/platform/graphics/haiku/ImageHaiku.cpp Tue Mar 16 
14:26:02 2010        (r317)
@@ -111,7 +111,12 @@
     // Test using example site at
     // http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html
     ctxt->platformContext()->SetDrawingMode(B_OP_ALPHA);
-    ctxt->platformContext()->DrawBitmapAsync(image, srcRect, dstRect);
+    uint32 options = 0;
+    if (ctxt->imageInterpolationQuality() == InterpolationDefault
+        || ctxt->imageInterpolationQuality() > InterpolationLow) {
+        options |= B_FILTER_BITMAP_BILINEAR;
+    }
+    ctxt->platformContext()->DrawBitmapAsync(image, srcRect, dstRect, options);
     ctxt->restore();
 
     if (imageObserver())

Other related posts:

  • » [haiku-webkit-commits] r317 - webkit/trunk/WebCore/platform/graphics/haiku - webkit