Changeset 167080 in webkit


Ignore:
Timestamp:
Apr 10, 2014 12:03:20 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[Cairo] Implement ShareableBitmap::paint() with scale factor
https://bugs.webkit.org/show_bug.cgi?id=64665

Patch by Owen Taylor <otaylor@redhat.com> on 2014-04-10
Reviewed by Martin Robinson.

  • Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r167077 r167080  
     12014-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
    1102014-04-10  Enrica Casucci  <enrica@apple.com>
    211
  • trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp

    r156700 r167080  
    6161void ShareableBitmap::paint(GraphicsContext& context, const IntPoint& dstPoint, const IntRect& srcRect)
    6262{
    63     RefPtr<cairo_surface_t> surface = createSurfaceFromData(data(), m_size);
    64     FloatRect destRect(dstPoint, srcRect.size());
    65     context.platformContext()->drawSurfaceToContext(surface.get(), destRect, srcRect, &context);
     63    paint(context, 1, dstPoint, srcRect);
    6664}
    6765
    6866void ShareableBitmap::paint(GraphicsContext& context, float scaleFactor, const IntPoint& dstPoint, const IntRect& srcRect)
    6967{
    70     if (scaleFactor != 1) {
    71         // See <https://bugs.webkit.org/show_bug.cgi?id=64665>.
    72         notImplemented();
    73         return;
    74     }
    75     paint(context, dstPoint, srcRect);
     68    RefPtr<cairo_surface_t> surface = createSurfaceFromData(data(), m_size);
     69    FloatRect destRect(dstPoint, srcRect.size());
     70    FloatRect srcRectScaled(srcRect);
     71    srcRectScaled.scale(scaleFactor);
     72    context.platformContext()->drawSurfaceToContext(surface.get(), destRect, srcRectScaled, &context);
    7673}
    7774
Note: See TracChangeset for help on using the changeset viewer.