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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 782693003: Implement image-rendering:pixelated for directly composited images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@composited
Patch Set: Add TestExpectation for slimmingpaint Created 6 years 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/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index cc99507e1de68605435e5354a08e4b47b46d917b..143314471c68cc4a5bb08db571fa9608b2f04084 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -1864,6 +1864,8 @@ void CompositedLayerMapping::updateImageContents()
// This is a no-op if the layer doesn't have an inner layer for the image.
m_graphicsLayer->setContentsToImage(image);
+ m_graphicsLayer->setFilterLevel(renderer()->style()->imageRendering() == ImageRenderingPixelated ? SkPaint::kNone_FilterLevel : SkPaint::kLow_FilterLevel);
+
// Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632
updateDrawsContent();
« no previous file with comments | « LayoutTests/fast/images/pixelated-composited-expected.html ('k') | Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698