Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp |
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
index de7a380d673a8cd3a323a79cf499aaecd6e609af..3657d2d345152277010f70305813022dc5a3afa5 100644 |
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
@@ -1743,15 +1743,12 @@ void CanvasRenderingContext2D::didDraw(const FloatRect& dirtyRect) |
if (dirtyRect.isEmpty()) |
return; |
- // If we are drawing to hardware and we have a composited layer, just call contentChanged(). |
- if (isAccelerated()) { |
- RenderBox* renderBox = canvas()->renderBox(); |
- if (renderBox && renderBox->hasAcceleratedCompositing()) { |
- renderBox->contentChanged(CanvasPixelsChanged); |
- canvas()->clearCopiedImage(); |
- canvas()->notifyObserversCanvasChanged(dirtyRect); |
- return; |
- } |
+ // If we are drawing to hardware and we have a composited layer, just invalidate layer. |
+ if (isAccelerated() && platformLayer()) { |
+ platformLayer()->invalidateRect(dirtyRect); |
+ canvas()->clearCopiedImage(); |
+ canvas()->notifyObserversCanvasChanged(dirtyRect); |
+ return; |
} |
canvas()->didDraw(dirtyRect); |