OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
10 * | 10 * |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 FloatRect srcRect = normalizeRect(FloatRect(sx, sy, sw, sh)); | 1387 FloatRect srcRect = normalizeRect(FloatRect(sx, sy, sw, sh)); |
1388 FloatRect dstRect = normalizeRect(FloatRect(dx, dy, dw, dh)); | 1388 FloatRect dstRect = normalizeRect(FloatRect(dx, dy, dw, dh)); |
1389 | 1389 |
1390 clipRectsToImageRect(FloatRect(FloatPoint(), imageSource->elementSize()), &s
rcRect, &dstRect); | 1390 clipRectsToImageRect(FloatRect(FloatPoint(), imageSource->elementSize()), &s
rcRect, &dstRect); |
1391 | 1391 |
1392 imageSource->adjustDrawRects(&srcRect, &dstRect); | 1392 imageSource->adjustDrawRects(&srcRect, &dstRect); |
1393 | 1393 |
1394 if (srcRect.isEmpty()) | 1394 if (srcRect.isEmpty()) |
1395 return; | 1395 return; |
1396 | 1396 |
1397 if (shouldDisableDeferral(imageSource) || image->imageForCurrentFrame()->isT
extureBacked()) | 1397 if (shouldDisableDeferral(imageSource) || image->isTextureBacked()) |
1398 canvas()->disableDeferral(); | 1398 canvas()->disableDeferral(); |
1399 | 1399 |
1400 validateStateStack(); | 1400 validateStateStack(); |
1401 | 1401 |
1402 draw( | 1402 draw( |
1403 [this, &imageSource, &image, &srcRect, dstRect](SkCanvas* c, const SkPai
nt* paint) // draw lambda | 1403 [this, &imageSource, &image, &srcRect, dstRect](SkCanvas* c, const SkPai
nt* paint) // draw lambda |
1404 { | 1404 { |
1405 drawImageInternal(c, imageSource, image.get(), srcRect, dstRect, pai
nt); | 1405 drawImageInternal(c, imageSource, image.get(), srcRect, dstRect, pai
nt); |
1406 }, | 1406 }, |
1407 [this, &dstRect](const SkIRect& clipBounds) // overdraw test lambda | 1407 [this, &dstRect](const SkIRect& clipBounds) // overdraw test lambda |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2333 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) | 2333 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) |
2334 return; | 2334 return; |
2335 if (alpha < 0xFF) | 2335 if (alpha < 0xFF) |
2336 return; | 2336 return; |
2337 } | 2337 } |
2338 | 2338 |
2339 canvas()->buffer()->willOverwriteCanvas(); | 2339 canvas()->buffer()->willOverwriteCanvas(); |
2340 } | 2340 } |
2341 | 2341 |
2342 } // namespace blink | 2342 } // namespace blink |
OLD | NEW |