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

Side by Side Diff: third_party/WebKit/Source/core/paint/HTMLCanvasPaintInvalidator.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/paint/HTMLCanvasPaintInvalidator.h"
6
7 #include "core/html/HTMLCanvasElement.h"
8 #include "core/layout/LayoutHTMLCanvas.h"
9 #include "core/paint/BoxPaintInvalidator.h"
10 #include "core/paint/PaintInvalidator.h"
11
12 namespace blink {
13
14 PaintInvalidationReason HTMLCanvasPaintInvalidator::invalidatePaintIfNeeded()
15 {
16 PaintInvalidationReason reason = BoxPaintInvalidator(m_htmlCanvas, m_context ).invalidatePaintIfNeeded();
17
18 HTMLCanvasElement* element = toHTMLCanvasElement(m_htmlCanvas.node());
19 if (element->isDirty()) {
20 element->doDeferredPaintInvalidation();
21 if (reason < PaintInvalidationRectangle)
22 reason = PaintInvalidationRectangle;
23 }
24
25 return reason;
26 }
27
28 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698