Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1102)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp

Issue 2208463003: First step of PaintInvalidator implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp b/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
index ce9b4d10f4cbb32a1d7af6c7e5b31699ddd50790..134d248e8cd68ef98193fd5b9a954a6cb8a5936b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.cpp
@@ -30,6 +30,7 @@
#include "core/html/HTMLCanvasElement.h"
#include "core/layout/LayoutView.h"
#include "core/page/Page.h"
+#include "core/paint/HTMLCanvasPaintInvalidator.h"
#include "core/paint/HTMLCanvasPainter.h"
namespace blink {
@@ -83,16 +84,9 @@ void LayoutHTMLCanvas::canvasSizeChanged()
setNeedsLayout(LayoutInvalidationReason::SizeChanged);
}
-PaintInvalidationReason LayoutHTMLCanvas::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState)
+PaintInvalidationReason LayoutHTMLCanvas::invalidatePaintIfNeeded(const PaintInvalidatorContext& context) const
{
- PaintInvalidationReason reason = LayoutBox::invalidatePaintIfNeeded(paintInvalidationState);
- HTMLCanvasElement* element = toHTMLCanvasElement(node());
- if (element->isDirty()) {
- element->doDeferredPaintInvalidation();
- if (reason < PaintInvalidationRectangle)
- reason = PaintInvalidationRectangle;
- }
- return reason;
+ return HTMLCanvasPaintInvalidator(*this, context).invalidatePaintIfNeeded();
}
CompositingReasons LayoutHTMLCanvas::additionalCompositingReasons() const
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutHTMLCanvas.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698