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

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

Issue 2052563002: Add Settings::useDefaultImageInterpolationQuality and use it in repaint tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaseline some pixel tests containing scaled images Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ImageQualityController.cpp
diff --git a/third_party/WebKit/Source/core/layout/ImageQualityController.cpp b/third_party/WebKit/Source/core/layout/ImageQualityController.cpp
index 1635d905fdd9a0deb90658a8823f9c395b64d04c..429c944a4d78b12385518496691ca5351f6ad2a6 100644
--- a/third_party/WebKit/Source/core/layout/ImageQualityController.cpp
+++ b/third_party/WebKit/Source/core/layout/ImageQualityController.cpp
@@ -32,6 +32,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
@@ -166,6 +167,11 @@ bool ImageQualityController::shouldPaintAtLowQuality(const LayoutObject& object,
if (object.style()->imageRendering() == ImageRenderingOptimizeContrast)
return true;
+ if (LocalFrame* frame = object.frame()) {
+ if (frame->settings() && frame->settings()->useDefaultImageInterpolationQuality())
+ return false;
+ }
+
// Look ourselves up in the hashtables.
ObjectLayerSizeMap::iterator i = m_objectLayerSizeMap.find(&object);
LayerSizeMap* innerMap = nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698