- a/Source/WebKit2/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2014-04-10  Owen Taylor  <otaylor@redhat.com>
2
3
        [Cairo] Implement ShareableBitmap::paint() with scale factor
4
        https://bugs.webkit.org/show_bug.cgi?id=64665
5
6
        Reviewed by Martin Robinson.
7
8
        * Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
9
1
2014-04-10  Alexey Proskuryakov  <ap@apple.com>
10
2014-04-10  Alexey Proskuryakov  <ap@apple.com>
2
11
3
        Gtk build fix.
12
        Gtk build fix.
- a/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp -9 / +6 lines
Lines 60-78 std::unique_ptr<GraphicsContext> ShareableBitmap::createGraphicsContext() a/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp_sec1
60
60
61
void ShareableBitmap::paint(GraphicsContext& context, const IntPoint& dstPoint, const IntRect& srcRect)
61
void ShareableBitmap::paint(GraphicsContext& context, const IntPoint& dstPoint, const IntRect& srcRect)
62
{
62
{
63
    RefPtr<cairo_surface_t> surface = createSurfaceFromData(data(), m_size);
63
    paint(context, 1, dstPoint, srcRect);
64
    FloatRect destRect(dstPoint, srcRect.size());
65
    context.platformContext()->drawSurfaceToContext(surface.get(), destRect, srcRect, &context);
66
}
64
}
67
65
68
void ShareableBitmap::paint(GraphicsContext& context, float scaleFactor, const IntPoint& dstPoint, const IntRect& srcRect)
66
void ShareableBitmap::paint(GraphicsContext& context, float scaleFactor, const IntPoint& dstPoint, const IntRect& srcRect)
69
{
67
{
70
    if (scaleFactor != 1) {
68
    RefPtr<cairo_surface_t> surface = createSurfaceFromData(data(), m_size);
71
        // See <https://bugs.webkit.org/show_bug.cgi?id=64665>.
69
    FloatRect destRect(dstPoint, srcRect.size());
72
        notImplemented();
70
    FloatRect srcRectScaled(srcRect);
73
        return;
71
    srcRectScaled.scale(scaleFactor);
74
    }
72
    context.platformContext()->drawSurfaceToContext(surface.get(), destRect, srcRectScaled, &context);
75
    paint(context, dstPoint, srcRect);
76
}
73
}
77
74
78
PassRefPtr<cairo_surface_t> ShareableBitmap::createCairoSurface()
75
PassRefPtr<cairo_surface_t> ShareableBitmap::createCairoSurface()

Return to Bug 64665