| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 return true; | 341 return true; |
| 342 } | 342 } |
| 343 return false; | 343 return false; |
| 344 } | 344 } |
| 345 | 345 |
| 346 void Image::drawPattern(GraphicsContext* context, | 346 void Image::drawPattern(GraphicsContext* context, |
| 347 const FloatRect& floatSrcRect, | 347 const FloatRect& floatSrcRect, |
| 348 const AffineTransform& patternTransform, | 348 const AffineTransform& patternTransform, |
| 349 const FloatPoint& phase, | 349 const FloatPoint& phase, |
| 350 ColorSpace styleColorSpace, | |
| 351 CompositeOperator compositeOp, | 350 CompositeOperator compositeOp, |
| 352 const FloatRect& destRect, | 351 const FloatRect& destRect, |
| 353 BlendMode blendMode) | 352 BlendMode blendMode) |
| 354 { | 353 { |
| 355 TRACE_EVENT0("skia", "Image::drawPattern"); | 354 TRACE_EVENT0("skia", "Image::drawPattern"); |
| 356 RefPtr<NativeImageSkia> bitmap = nativeImageForCurrentFrame(); | 355 RefPtr<NativeImageSkia> bitmap = nativeImageForCurrentFrame(); |
| 357 if (!bitmap) | 356 if (!bitmap) |
| 358 return; | 357 return; |
| 359 | 358 |
| 360 FloatRect normSrcRect = adjustForNegativeSize(floatSrcRect); | 359 FloatRect normSrcRect = adjustForNegativeSize(floatSrcRect); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode
)); | 437 paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode
)); |
| 439 | 438 |
| 440 paint.setFilterBitmap(resampling == RESAMPLE_LINEAR); | 439 paint.setFilterBitmap(resampling == RESAMPLE_LINEAR); |
| 441 if (useBicubicFilter) | 440 if (useBicubicFilter) |
| 442 paint.setFlags(paint.getFlags() | SkPaint::kBicubicFilterBitmap_Flag); | 441 paint.setFlags(paint.getFlags() | SkPaint::kBicubicFilterBitmap_Flag); |
| 443 | 442 |
| 444 context->drawRect(destRect, paint); | 443 context->drawRect(destRect, paint); |
| 445 } | 444 } |
| 446 | 445 |
| 447 } // namespace WebCore | 446 } // namespace WebCore |
| OLD | NEW |