From 2b1acd2cae1b77c4f7eb7223bf18d25c4f05eca2 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Thu, 23 Oct 2008 00:14:04 +0000 Subject: Use CG instead of Skia Review URL: http://codereview.chromium.org/8091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3801 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/port/platform/chromium/ScrollViewChromium.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webkit/port/platform/chromium/ScrollViewChromium.cpp b/webkit/port/platform/chromium/ScrollViewChromium.cpp index 4761e90..92eb67a 100644 --- a/webkit/port/platform/chromium/ScrollViewChromium.cpp +++ b/webkit/port/platform/chromium/ScrollViewChromium.cpp @@ -424,6 +424,7 @@ void ScrollView::ScrollViewPrivate::highlightInspectedNode( if (!inspected_node) return; +#if !PLATFORM(CG) SkPaint paint; paint.setARGB(122, 255, 225, 0); // Yellow @@ -440,6 +441,14 @@ void ScrollView::ScrollViewPrivate::highlightInspectedNode( // TODO(ojan): http://b/1143975 Draw the padding/border/margin boxes in // different colors. context->platformContext()->paintSkPaint(inspected_node->getRect(), paint); +#else + CGContextRef cg_context = context->platformContext(); + CGContextSaveGState(cg_context); + CGContextSetRGBFillColor(cg_context, 0.4784, 1.0, 0.8824, 1.0); + CGContextSetRGBStrokeColor(cg_context, 0.4784, 1.0, 0.8824, 1.0); + CGContextFillRect(cg_context, inspected_node->getRect()); + CGContextRestoreGState(cg_context); +#endif } #if defined(OS_WIN) -- cgit v1.1