| 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 fullCanvasCompositedStroke(path); | 1060 fullCanvasCompositedStroke(path); |
| 1061 didDraw(clipBounds); | 1061 didDraw(clipBounds); |
| 1062 } else if (state().m_globalComposite == CompositeCopy) { | 1062 } else if (state().m_globalComposite == CompositeCopy) { |
| 1063 clearCanvas(); | 1063 clearCanvas(); |
| 1064 c->strokePath(path); | 1064 c->strokePath(path); |
| 1065 didDraw(clipBounds); | 1065 didDraw(clipBounds); |
| 1066 } else { | 1066 } else { |
| 1067 FloatRect bounds = path.boundingRect(); | 1067 FloatRect bounds = path.boundingRect(); |
| 1068 inflateStrokeRect(bounds); | 1068 inflateStrokeRect(bounds); |
| 1069 FloatRect dirtyRect; | 1069 FloatRect dirtyRect; |
| 1070 if (computeDirtyRect(bounds, &dirtyRect)) { | 1070 if (computeDirtyRect(bounds, clipBounds, &dirtyRect)) { |
| 1071 c->strokePath(path); | 1071 c->strokePath(path); |
| 1072 didDraw(dirtyRect); | 1072 didDraw(dirtyRect); |
| 1073 } | 1073 } |
| 1074 } | 1074 } |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 void CanvasRenderingContext2D::stroke() | 1077 void CanvasRenderingContext2D::stroke() |
| 1078 { | 1078 { |
| 1079 strokeInternal(m_path); | 1079 strokeInternal(m_path); |
| 1080 } | 1080 } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 fullCanvasCompositedStroke(rect); | 1328 fullCanvasCompositedStroke(rect); |
| 1329 didDraw(clipBounds); | 1329 didDraw(clipBounds); |
| 1330 } else if (state().m_globalComposite == CompositeCopy) { | 1330 } else if (state().m_globalComposite == CompositeCopy) { |
| 1331 clearCanvas(); | 1331 clearCanvas(); |
| 1332 c->strokeRect(rect); | 1332 c->strokeRect(rect); |
| 1333 didDraw(clipBounds); | 1333 didDraw(clipBounds); |
| 1334 } else { | 1334 } else { |
| 1335 FloatRect boundingRect = rect; | 1335 FloatRect boundingRect = rect; |
| 1336 boundingRect.inflate(state().m_lineWidth / 2); | 1336 boundingRect.inflate(state().m_lineWidth / 2); |
| 1337 FloatRect dirtyRect; | 1337 FloatRect dirtyRect; |
| 1338 if (computeDirtyRect(boundingRect, &dirtyRect)) { | 1338 if (computeDirtyRect(boundingRect, clipBounds, &dirtyRect)) { |
| 1339 c->strokeRect(rect); | 1339 c->strokeRect(rect); |
| 1340 didDraw(dirtyRect); | 1340 didDraw(dirtyRect); |
| 1341 } | 1341 } |
| 1342 } | 1342 } |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 void CanvasRenderingContext2D::setShadow(float width, float height, float blur) | 1345 void CanvasRenderingContext2D::setShadow(float width, float height, float blur) |
| 1346 { | 1346 { |
| 1347 setShadow(FloatSize(width, height), blur, Color::transparent); | 1347 setShadow(FloatSize(width, height), blur, Color::transparent); |
| 1348 } | 1348 } |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 c->setAlphaAsFloat(1.0); | 2411 c->setAlphaAsFloat(1.0); |
| 2412 c->clearShadow(); | 2412 c->clearShadow(); |
| 2413 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); | 2413 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); |
| 2414 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2414 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
| 2415 c->restore(); | 2415 c->restore(); |
| 2416 | 2416 |
| 2417 didDraw(dirtyRect); | 2417 didDraw(dirtyRect); |
| 2418 } | 2418 } |
| 2419 | 2419 |
| 2420 } // namespace WebCore | 2420 } // namespace WebCore |
| OLD | NEW |