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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 1983863002: Inflate dirty rect by 1 pixel on a high DPI display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullcheck on page() Created 4 years, 7 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/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 30354d5d92c7f19497b5aa323319effc4f928796..7555efbe2b9342af1215ffd32c5da3654fe2f907 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -269,6 +269,8 @@ void HTMLCanvasElement::didDraw(const FloatRect& rect)
clearCopiedImage();
if (layoutObject())
layoutObject()->setMayNeedPaintInvalidation();
+ if (m_context && m_context->is2d() && m_context->shouldAntialias() && page() && page()->deviceScaleFactor() > 1.0f)
+ m_dirtyRect.inflate(1);
m_dirtyRect.unite(rect);
if (m_context && m_context->is2d() && hasImageBuffer())
buffer()->didDraw(rect);

Powered by Google App Engine
This is Rietveld 408576698