From b097c4ffdce84568bfbf77af3038685271af1d8a Mon Sep 17 00:00:00 2001 From: "amanda@chromium.org" Date: Fri, 24 Oct 2008 19:28:43 +0000 Subject: Remove a reinterpret_cast that is not valid on the Mac Review URL: http://codereview.chromium.org/7980 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3935 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webwidget_impl.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webkit') 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(&context)); +#endif + IntRect dirty_rect(rect.x(), rect.y(), rect.width(), rect.height()); widget_->paint(&gc, dirty_rect); -- cgit v1.1