summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 19:28:43 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 19:28:43 +0000
commitb097c4ffdce84568bfbf77af3038685271af1d8a (patch)
treeb09be6352720639f615879f721b78bf422873279 /webkit
parent3cdb7af81de506be730544edcfe4a5547f0fdaea (diff)
downloadchromium_src-b097c4ffdce84568bfbf77af3038685271af1d8a.zip
chromium_src-b097c4ffdce84568bfbf77af3038685271af1d8a.tar.gz
chromium_src-b097c4ffdce84568bfbf77af3038685271af1d8a.tar.bz2
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
Diffstat (limited to 'webkit')
-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);