Chromium Code Reviews| 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 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1738 *dirtyRect = canvasRect; | 1738 *dirtyRect = canvasRect; |
| 1739 | 1739 |
| 1740 return true; | 1740 return true; |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 void CanvasRenderingContext2D::didDraw(const FloatRect& dirtyRect) | 1743 void CanvasRenderingContext2D::didDraw(const FloatRect& dirtyRect) |
| 1744 { | 1744 { |
| 1745 if (dirtyRect.isEmpty()) | 1745 if (dirtyRect.isEmpty()) |
| 1746 return; | 1746 return; |
| 1747 | 1747 |
| 1748 // If we are drawing to hardware and we have a composited layer, just invali date layer. | |
| 1749 if (isAccelerated() && platformLayer()) { | |
|
Stephen White
2014/07/17 15:28:19
Can we get rid of the platformLayer() override now
Justin Novosad
2014/07/17 17:07:21
We can't. That method is a virtual override from C
| |
| 1750 platformLayer()->invalidateRect(dirtyRect); | |
| 1751 canvas()->clearCopiedImage(); | |
| 1752 canvas()->notifyObserversCanvasChanged(dirtyRect); | |
| 1753 return; | |
| 1754 } | |
| 1755 | |
| 1756 canvas()->didDraw(dirtyRect); | 1748 canvas()->didDraw(dirtyRect); |
| 1757 } | 1749 } |
| 1758 | 1750 |
| 1759 GraphicsContext* CanvasRenderingContext2D::drawingContext() const | 1751 GraphicsContext* CanvasRenderingContext2D::drawingContext() const |
| 1760 { | 1752 { |
| 1761 if (isContextLost()) | 1753 if (isContextLost()) |
| 1762 return 0; | 1754 return 0; |
| 1763 return canvas()->drawingContext(); | 1755 return canvas()->drawingContext(); |
| 1764 } | 1756 } |
| 1765 | 1757 |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2446 | 2438 |
| 2447 unsigned CanvasRenderingContext2D::hitRegionsCount() const | 2439 unsigned CanvasRenderingContext2D::hitRegionsCount() const |
| 2448 { | 2440 { |
| 2449 if (m_hitRegionManager) | 2441 if (m_hitRegionManager) |
| 2450 return m_hitRegionManager->getHitRegionsCount(); | 2442 return m_hitRegionManager->getHitRegionsCount(); |
| 2451 | 2443 |
| 2452 return 0; | 2444 return 0; |
| 2453 } | 2445 } |
| 2454 | 2446 |
| 2455 } // namespace WebCore | 2447 } // namespace WebCore |
| OLD | NEW |