| Index: Source/WebKit/chromium/src/WebScrollbarThemePainter.cpp
|
| diff --git a/Source/WebKit/chromium/src/WebScrollbarThemePainter.cpp b/Source/WebKit/chromium/src/WebScrollbarThemePainter.cpp
|
| index 16601147eb442b718bdb5dcdb4a246affbb67f8d..11e08ad6a90aa747a3b0ba7b43164d79dc9be847 100644
|
| --- a/Source/WebKit/chromium/src/WebScrollbarThemePainter.cpp
|
| +++ b/Source/WebKit/chromium/src/WebScrollbarThemePainter.cpp
|
| @@ -48,81 +48,71 @@ void WebScrollbarThemePainter::paintScrollbarBackground(WebCanvas* canvas, const
|
| SkRect clip = SkRect::MakeXYWH(rect.x, rect.y, rect.width, rect.height);
|
| canvas->clipRect(clip);
|
|
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintScrollbarBackground(&context, m_scrollbar);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintTrackBackground(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintTrackBackground(&context, m_scrollbar, IntRect(rect));
|
| }
|
|
|
| void WebScrollbarThemePainter::paintBackTrackPart(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintTrackPiece(&context, m_scrollbar, IntRect(rect), WebCore::BackTrackPart);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintForwardTrackPart(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintTrackPiece(&context, m_scrollbar, IntRect(rect), WebCore::ForwardTrackPart);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintBackButtonStart(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintButton(&context, m_scrollbar, IntRect(rect), WebCore::BackButtonStartPart);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintBackButtonEnd(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintButton(&context, m_scrollbar, IntRect(rect), WebCore::BackButtonEndPart);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintForwardButtonStart(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintButton(&context, m_scrollbar, IntRect(rect), WebCore::ForwardButtonStartPart);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintForwardButtonEnd(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintButton(&context, m_scrollbar, IntRect(rect), WebCore::ForwardButtonEndPart);
|
| }
|
|
|
| void WebScrollbarThemePainter::paintTickmarks(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintTickmarks(&context, m_scrollbar, IntRect(rect));
|
| }
|
|
|
| void WebScrollbarThemePainter::paintThumb(WebCanvas* canvas, const WebRect& rect)
|
| {
|
| - PlatformContextSkia platformContext(canvas);
|
| - platformContext.setDrawingToImageBuffer(true);
|
| - GraphicsContext context(&platformContext);
|
| + GraphicsContext context(canvas);
|
| + context.platformContext()->setDrawingToImageBuffer(true);
|
| m_theme->paintThumb(&context, m_scrollbar, IntRect(rect));
|
| }
|
|
|
|
|