| 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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 [this, &dstRect](const SkIRect& clipBounds) // overdraw test lambda | 1409 [this, &dstRect](const SkIRect& clipBounds) // overdraw test lambda |
| 1410 { | 1410 { |
| 1411 return rectContainsTransformedRect(dstRect, clipBounds); | 1411 return rectContainsTransformedRect(dstRect, clipBounds); |
| 1412 }, dstRect, CanvasRenderingContext2DState::ImagePaintType, | 1412 }, dstRect, CanvasRenderingContext2DState::ImagePaintType, |
| 1413 imageSource->isOpaque() ? CanvasRenderingContext2DState::OpaqueImage : C
anvasRenderingContext2DState::NonOpaqueImage); | 1413 imageSource->isOpaque() ? CanvasRenderingContext2DState::OpaqueImage : C
anvasRenderingContext2DState::NonOpaqueImage); |
| 1414 | 1414 |
| 1415 validateStateStack(); | 1415 validateStateStack(); |
| 1416 | 1416 |
| 1417 bool isExpensive = false; | 1417 bool isExpensive = false; |
| 1418 | 1418 |
| 1419 if (ExpensiveCanvasHeuristicParameters::SVGImageSourcesAreExpensive && image
&& image->isSVGImage()) | 1419 if (ExpensiveCanvasHeuristicParameters::SVGImageSourcesAreExpensive && image
Source->isSVGSource()) |
| 1420 isExpensive = true; | 1420 isExpensive = true; |
| 1421 | 1421 |
| 1422 if (imageSource->elementSize().width() * imageSource->elementSize().height()
> canvas()->width() * canvas()->height() * ExpensiveCanvasHeuristicParameters::
ExpensiveImageSizeRatio) | 1422 if (imageSource->elementSize().width() * imageSource->elementSize().height()
> canvas()->width() * canvas()->height() * ExpensiveCanvasHeuristicParameters::
ExpensiveImageSizeRatio) |
| 1423 isExpensive = true; | 1423 isExpensive = true; |
| 1424 | 1424 |
| 1425 if (isExpensive) { | 1425 if (isExpensive) { |
| 1426 ImageBuffer* buffer = canvas()->buffer(); | 1426 ImageBuffer* buffer = canvas()->buffer(); |
| 1427 if (buffer) | 1427 if (buffer) |
| 1428 buffer->setHasExpensiveOp(); | 1428 buffer->setHasExpensiveOp(); |
| 1429 } | 1429 } |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2335 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) | 2335 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) |
| 2336 return; | 2336 return; |
| 2337 if (alpha < 0xFF) | 2337 if (alpha < 0xFF) |
| 2338 return; | 2338 return; |
| 2339 } | 2339 } |
| 2340 | 2340 |
| 2341 canvas()->buffer()->willOverwriteCanvas(); | 2341 canvas()->buffer()->willOverwriteCanvas(); |
| 2342 } | 2342 } |
| 2343 | 2343 |
| 2344 } // namespace blink | 2344 } // namespace blink |
| OLD | NEW |