summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 19:15:46 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 19:15:46 +0000
commit6c02000d1035efb908edf97dac10225e7b418c17 (patch)
tree523ee40f61aa5314824d6390e72cbb9876cadc6f /webkit/glue/webframe_impl.cc
parentae2f02eab0dc184f35ed0bee38f5ec13f96447b2 (diff)
downloadchromium_src-6c02000d1035efb908edf97dac10225e7b418c17.zip
chromium_src-6c02000d1035efb908edf97dac10225e7b418c17.tar.gz
chromium_src-6c02000d1035efb908edf97dac10225e7b418c17.tar.bz2
On the Mac, extract the CGContextRef to pass down to WebCore, since a blind
reinterpret_cast will fail miserably. Review URL: http://codereview.chromium.org/5613 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index f65bf9e..c68b9b5 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -1466,12 +1466,16 @@ void WebFrameImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
StatsScope<StatsRate> rendering_scope(rendering);
if (!rect.IsEmpty()) {
+ IntRect dirty_rect(rect.x(), rect.y(), rect.width(), rect.height());
+#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));
- IntRect dirty_rect(rect.x(), rect.y(), rect.width(), rect.height());
-
+#endif
if (frame_->document() && frameview()) {
frameview()->paint(&gc, dirty_rect);
} else {