| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 image.get(), localMatrix, paint, | 298 image.get(), localMatrix, paint, |
| 299 FloatSize(repeatSpacing.width() / scale.width(), | 299 FloatSize(repeatSpacing.width() / scale.width(), |
| 300 repeatSpacing.height() / scale.height()))); | 300 repeatSpacing.height() / scale.height()))); |
| 301 context.drawRect(destRect, paint); | 301 context.drawRect(destRect, paint); |
| 302 } | 302 } |
| 303 | 303 |
| 304 if (currentFrameIsLazyDecoded()) | 304 if (currentFrameIsLazyDecoded()) |
| 305 PlatformInstrumentation::didDrawLazyPixelRef(imageID); | 305 PlatformInstrumentation::didDrawLazyPixelRef(imageID); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void Image::drawInColorSpace(SkCanvas* canvas, |
| 309 const SkPaint& paint, |
| 310 const FloatRect& dstRect, |
| 311 const FloatRect& srcRect, |
| 312 RespectImageOrientationEnum orientation, |
| 313 ImageClampingMode clamping, |
| 314 sk_sp<SkColorSpace>) { |
| 315 draw(canvas, paint, dstRect, srcRect, orientation, clamping); |
| 316 } |
| 317 |
| 308 PassRefPtr<Image> Image::imageForDefaultFrame() { | 318 PassRefPtr<Image> Image::imageForDefaultFrame() { |
| 309 RefPtr<Image> image(this); | 319 RefPtr<Image> image(this); |
| 310 | 320 |
| 311 return image.release(); | 321 return image.release(); |
| 312 } | 322 } |
| 313 | 323 |
| 314 bool Image::isTextureBacked() { | 324 bool Image::isTextureBacked() { |
| 315 sk_sp<SkImage> image = imageForCurrentFrame(); | 325 sk_sp<SkImage> image = imageForCurrentFrame(); |
| 316 return image ? image->isTextureBacked() : false; | 326 return image ? image->isTextureBacked() : false; |
| 317 } | 327 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 FloatRect subset = dest; | 370 FloatRect subset = dest; |
| 361 subset.setX((dest.x() - tile.x()) / scale.width()); | 371 subset.setX((dest.x() - tile.x()) / scale.width()); |
| 362 subset.setY((dest.y() - tile.y()) / scale.height()); | 372 subset.setY((dest.y() - tile.y()) / scale.height()); |
| 363 subset.setWidth(dest.width() / scale.width()); | 373 subset.setWidth(dest.width() / scale.width()); |
| 364 subset.setHeight(dest.height() / scale.height()); | 374 subset.setHeight(dest.height() / scale.height()); |
| 365 | 375 |
| 366 return subset; | 376 return subset; |
| 367 } | 377 } |
| 368 | 378 |
| 369 } // namespace blink | 379 } // namespace blink |
| OLD | NEW |