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 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1735 return true; | 1735 return true; |
1736 } | 1736 } |
1737 | 1737 |
1738 void CanvasRenderingContext2D::didDraw(const FloatRect& dirtyRect) | 1738 void CanvasRenderingContext2D::didDraw(const FloatRect& dirtyRect) |
1739 { | 1739 { |
1740 if (dirtyRect.isEmpty()) | 1740 if (dirtyRect.isEmpty()) |
1741 return; | 1741 return; |
1742 | 1742 |
1743 // If we are drawing to hardware and we have a composited layer, just call c ontentChanged(). | 1743 // If we are drawing to hardware and we have a composited layer, just call c ontentChanged(). |
1744 if (isAccelerated()) { | 1744 if (isAccelerated()) { |
1745 RenderBox* renderBox = canvas()->renderBox(); | 1745 RenderBox* renderBox = canvas()->renderBox(); |
jamesr
2014/06/23 17:41:44
you aren't using this any more, no need to grab it
| |
1746 if (renderBox && renderBox->hasAcceleratedCompositing()) { | 1746 if (renderBox && renderBox->hasAcceleratedCompositing()) { |
abarth-chromium
2014/06/23 17:09:04
I wonder if we can replace this call to hasAcceler
| |
1747 renderBox->contentChanged(CanvasPixelsChanged); | 1747 platformLayer()->invalidateRect(dirtyRect); |
1748 canvas()->clearCopiedImage(); | 1748 canvas()->clearCopiedImage(); |
1749 canvas()->notifyObserversCanvasChanged(dirtyRect); | 1749 canvas()->notifyObserversCanvasChanged(dirtyRect); |
1750 return; | 1750 return; |
1751 } | 1751 } |
1752 } | 1752 } |
1753 | 1753 |
1754 canvas()->didDraw(dirtyRect); | 1754 canvas()->didDraw(dirtyRect); |
1755 } | 1755 } |
1756 | 1756 |
1757 GraphicsContext* CanvasRenderingContext2D::drawingContext() const | 1757 GraphicsContext* CanvasRenderingContext2D::drawingContext() const |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2351 c->setAlphaAsFloat(1.0); | 2351 c->setAlphaAsFloat(1.0); |
2352 c->clearShadow(); | 2352 c->clearShadow(); |
2353 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); | 2353 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); |
2354 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2354 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
2355 c->restore(); | 2355 c->restore(); |
2356 validateStateStack(); | 2356 validateStateStack(); |
2357 didDraw(dirtyRect); | 2357 didDraw(dirtyRect); |
2358 } | 2358 } |
2359 | 2359 |
2360 } // namespace WebCore | 2360 } // namespace WebCore |
OLD | NEW |