diff options
Diffstat (limited to 'Source/WebCore/html')
-rw-r--r-- | Source/WebCore/html/HTMLCanvasElement.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/html/HTMLCanvasElement.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebCore/html/HTMLCanvasElement.cpp b/Source/WebCore/html/HTMLCanvasElement.cpp index 9f51f10..e67cbf9 100644 --- a/Source/WebCore/html/HTMLCanvasElement.cpp +++ b/Source/WebCore/html/HTMLCanvasElement.cpp @@ -45,6 +45,7 @@ #include "MIMETypeRegistry.h" #include "Page.h" #include "RenderHTMLCanvas.h" +#include "RenderLayer.h" #include "Settings.h" #include <math.h> #include <stdio.h> @@ -225,6 +226,11 @@ void HTMLCanvasElement::didDraw(const FloatRect& rect) return; m_dirtyRect.unite(r); +#if PLATFORM(ANDROID) + // We handle invals ourselves and don't want webkit to repaint if we + // have put the canvas on a layer + if (!ro->hasLayer()) +#endif ro->repaintRectangle(enclosingIntRect(m_dirtyRect)); } diff --git a/Source/WebCore/html/HTMLCanvasElement.h b/Source/WebCore/html/HTMLCanvasElement.h index 207c384..e485835 100644 --- a/Source/WebCore/html/HTMLCanvasElement.h +++ b/Source/WebCore/html/HTMLCanvasElement.h @@ -128,6 +128,10 @@ public: void makeRenderingResultsAvailable(); +#if PLATFORM(ANDROID) + void clearDirtyRect() { m_dirtyRect = FloatRect(); } +#endif + private: HTMLCanvasElement(const QualifiedName&, Document*); |