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

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

Issue 562583002: Implement image-rendering:pixelated for accelerated 2D canvases. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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: Source/core/html/HTMLCanvasElement.cpp
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 7ce2ab15d2123fd7ffbe0fb1ff33a233e4d4e435..c744c7b36c9614b4b5fc983e83150b8baf44e214 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -119,6 +119,11 @@ RenderObject* HTMLCanvasElement::createRenderer(RenderStyle* style)
return HTMLElement::createRenderer(style);
}
+void HTMLCanvasElement::didRecalcStyle(StyleRecalcChange)
+{
+ m_imageBuffer->setNearestNeighbor(computedStyle()->imageRendering() == ImageRenderingPixelated);
+}
+
Node::InsertionNotificationRequest HTMLCanvasElement::insertedInto(ContainerNode* node)
{
setIsInCanvasSubtree(true);

Powered by Google App Engine
This is Rietveld 408576698