summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/glue/webwidget_impl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/glue/webwidget_impl.cc b/webkit/glue/webwidget_impl.cc
index c93e75f..381c4b8 100644
--- a/webkit/glue/webwidget_impl.cc
+++ b/webkit/glue/webwidget_impl.cc
@@ -126,10 +126,15 @@ void WebWidgetImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
return;
if (!rect.IsEmpty()) {
+#if defined(OS_MACOSX)
+ CGContextRef context = canvas->getTopPlatformDevice().GetBitmapContext();
+ GraphicsContext gc(context);
+#else
PlatformContextSkia context(canvas);
-
// PlatformGraphicsContext is actually a pointer to PlatformContextSkia.
GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context));
+#endif
+
IntRect dirty_rect(rect.x(), rect.y(), rect.width(), rect.height());
widget_->paint(&gc, dirty_rect);