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

Unified Diff: third_party/WebKit/Source/core/paint/BoxPainter.cpp

Issue 1463793002: Simplify ImageResource::canRender() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/paint/BoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
index c56ba6aef747f79079e4d69b08dc94241e8f2e73..709167ad0b937c0e80e5c6e5c41d0955b269d1d7 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -143,7 +143,7 @@ void BoxPainter::paintBackground(const PaintInfo& paintInfo, const LayoutRect& p
static bool isFillLayerOpaque(const FillLayer& layer, const LayoutObject& imageClient)
{
return layer.hasOpaqueImage(&imageClient)
- && layer.image()->canRender(imageClient, imageClient.style()->effectiveZoom())
+ && layer.image()->canRender()
&& !layer.image()->imageSize(&imageClient, imageClient.style()->effectiveZoom()).isEmpty()
&& layer.hasRepeatXY();
}
@@ -438,7 +438,7 @@ void BoxPainter::paintFillLayerExtended(const LayoutBoxModelObject& obj, const P
BackgroundImageGeometry geometry;
if (bgImage)
geometry.calculate(obj, paintInfo.paintContainer(), paintInfo.globalPaintFlags(), bgLayer, scrolledPaintRect);
- bool shouldPaintBackgroundImage = bgImage && bgImage->canRender(obj, obj.style()->effectiveZoom());
+ bool shouldPaintBackgroundImage = bgImage && bgImage->canRender();
// Paint the color first underneath all images, culled if background image occludes it.
// TODO(trchen): In the !bgLayer.hasRepeatXY() case, we could improve the culling test

Powered by Google App Engine
This is Rietveld 408576698