Changeset 116806 in webkit


Ignore:
Timestamp:
May 11, 2012 2:40:50 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

ImageSkia.cpp does not conform to style guidelines
https://bugs.webkit.org/show_bug.cgi?id=86219

Patch by Keyar Hood <keyar@chromium.org> on 2012-05-11
Reviewed by Stephen White.

No tests as this is purely style changees.

  • platform/graphics/skia/ImageSkia.cpp:

(WebCore::TransformDimensions):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImageSingleFrameSkia::draw):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116803 r116806  
     12012-05-11  Keyar Hood  <keyar@chromium.org>
     2
     3        ImageSkia.cpp does not conform to style guidelines
     4        https://bugs.webkit.org/show_bug.cgi?id=86219
     5
     6        Reviewed by Stephen White.
     7
     8        No tests as this is purely style changees.
     9
     10        * platform/graphics/skia/ImageSkia.cpp:
     11        (WebCore::TransformDimensions):
     12        (WebCore::BitmapImage::draw):
     13        (WebCore::BitmapImageSingleFrameSkia::draw):
     14
    1152012-05-11  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp

    r113373 r116806  
    254254// Transforms the given dimensions with the given matrix. Used to see how big
    255255// images will be once transformed.
    256 static void TransformDimensions(const SkMatrix& matrix, float srcWidth, float srcHeight, float* destWidth, float* destHeight) {
     256static void TransformDimensions(const SkMatrix& matrix, float srcWidth, float srcHeight, float* destWidth, float* destHeight)
     257{
    257258    // Transform 3 points to see how long each side of the bitmap will be.
    258     SkPoint src_points[3]; // (0, 0), (width, 0), (0, height).
    259     src_points[0].set(0, 0);
    260     src_points[1].set(SkFloatToScalar(srcWidth), 0);
    261     src_points[2].set(0, SkFloatToScalar(srcHeight));
     259    SkPoint srcPoints[3]; // (0, 0), (width, 0), (0, height).
     260    srcPoints[0].set(0, 0);
     261    srcPoints[1].set(SkFloatToScalar(srcWidth), 0);
     262    srcPoints[2].set(0, SkFloatToScalar(srcHeight));
    262263
    263264    // Now measure the length of the two transformed vectors relative to the
    264265    // transformed origin to see how big the bitmap will be. Note: for skews,
    265266    // this isn't the best thing, but we don't have skews.
    266     SkPoint dest_points[3];
    267     matrix.mapPoints(dest_points, src_points, 3);
    268     *destWidth = SkScalarToFloat((dest_points[1] - dest_points[0]).length());
    269     *destHeight = SkScalarToFloat((dest_points[2] - dest_points[0]).length());
     267    SkPoint destPoints[3];
     268    matrix.mapPoints(destPoints, srcPoints, 3);
     269    *destWidth = SkScalarToFloat((destPoints[1] - destPoints[0]).length());
     270    *destHeight = SkScalarToFloat((destPoints[2] - destPoints[0]).length());
    270271}
    271272
     
    429430    NativeImageSkia* bm = nativeImageForCurrentFrame();
    430431    if (!bm)
    431         return;  // It's too early and we don't have an image yet.
     432        return; // It's too early and we don't have an image yet.
    432433
    433434    FloatRect normDstRect = normalizeRect(dstRect);
     
    435436
    436437    if (normSrcRect.isEmpty() || normDstRect.isEmpty())
    437         return;  // Nothing to draw.
     438        return; // Nothing to draw.
    438439
    439440    paintSkBitmap(ctxt->platformContext(),
     
    459460
    460461    if (normSrcRect.isEmpty() || normDstRect.isEmpty())
    461         return;  // Nothing to draw.
     462        return; // Nothing to draw.
    462463
    463464    paintSkBitmap(ctxt->platformContext(),
     
    487488}
    488489
    489 }  // namespace WebCore
     490} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.