| 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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 | 1518 |
| 1519 clipRectsToImageRect(FloatRect(FloatPoint(), imageSource->sourceSize()), &sr
cRect, &dstRect); | 1519 clipRectsToImageRect(FloatRect(FloatPoint(), imageSource->sourceSize()), &sr
cRect, &dstRect); |
| 1520 | 1520 |
| 1521 imageSource->adjustDrawRects(&srcRect, &dstRect); | 1521 imageSource->adjustDrawRects(&srcRect, &dstRect); |
| 1522 | 1522 |
| 1523 if (srcRect.isEmpty()) | 1523 if (srcRect.isEmpty()) |
| 1524 return; | 1524 return; |
| 1525 | 1525 |
| 1526 FloatRect dirtyRect = clipBounds; | 1526 FloatRect dirtyRect = clipBounds; |
| 1527 if (imageSource->isVideoElement()) { | 1527 if (imageSource->isVideoElement()) { |
| 1528 // TODO(dshwang): unify video code into below code to composite correctl
y; crbug.com/407079 |
| 1528 drawVideo(static_cast<HTMLVideoElement*>(imageSource), srcRect, dstRect)
; | 1529 drawVideo(static_cast<HTMLVideoElement*>(imageSource), srcRect, dstRect)
; |
| 1529 computeDirtyRect(dstRect, clipBounds, &dirtyRect); | 1530 computeDirtyRect(dstRect, clipBounds, &dirtyRect); |
| 1530 } else { | 1531 } else { |
| 1531 if (rectContainsTransformedRect(dstRect, clipBounds)) { | 1532 if (rectContainsTransformedRect(dstRect, clipBounds)) { |
| 1532 c->drawImage(image.get(), dstRect, srcRect, op, blendMode); | 1533 c->drawImage(image.get(), dstRect, srcRect, op, blendMode); |
| 1533 } else if (isFullCanvasCompositeMode(op)) { | 1534 } else if (isFullCanvasCompositeMode(op)) { |
| 1534 fullCanvasCompositedDrawImage(image.get(), dstRect, srcRect, op); | 1535 fullCanvasCompositedDrawImage(image.get(), dstRect, srcRect, op); |
| 1535 } else if (op == CompositeCopy) { | 1536 } else if (op == CompositeCopy) { |
| 1536 clearCanvas(); | 1537 clearCanvas(); |
| 1537 c->drawImage(image.get(), dstRect, srcRect, op, blendMode); | 1538 c->drawImage(image.get(), dstRect, srcRect, op, blendMode); |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2502 | 2503 |
| 2503 unsigned CanvasRenderingContext2D::hitRegionsCount() const | 2504 unsigned CanvasRenderingContext2D::hitRegionsCount() const |
| 2504 { | 2505 { |
| 2505 if (m_hitRegionManager) | 2506 if (m_hitRegionManager) |
| 2506 return m_hitRegionManager->getHitRegionsCount(); | 2507 return m_hitRegionManager->getHitRegionsCount(); |
| 2507 | 2508 |
| 2508 return 0; | 2509 return 0; |
| 2509 } | 2510 } |
| 2510 | 2511 |
| 2511 } // namespace blink | 2512 } // namespace blink |
| OLD | NEW |