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

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

Issue 1339183003: NOT FOR LANDING Experiment with allocating SVGImageForContainer on demand (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « Source/core/paint/BackgroundImageGeometry.cpp ('k') | Source/core/paint/ImagePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index 7f71256b4e99ebec735cec840f673ca1f3e08091..5ac03678c475df358dd8c02afdb9772265436461 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -16,8 +16,6 @@
#include "core/layout/LayoutTheme.h"
#include "core/layout/LayoutView.h"
#include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h"
-#include "core/style/BorderEdge.h"
-#include "core/style/ShadowList.h"
#include "core/paint/BackgroundImageGeometry.h"
#include "core/paint/BoxBorderPainter.h"
#include "core/paint/BoxDecorationData.h"
@@ -27,6 +25,9 @@
#include "core/paint/PaintInfo.h"
#include "core/paint/RoundedInnerRectClipper.h"
#include "core/paint/ThemePainter.h"
+#include "core/style/BorderEdge.h"
+#include "core/style/ShadowList.h"
+#include "core/svg/graphics/SVGImageForContainer.h"
#include "platform/LengthFunctions.h"
#include "platform/geometry/LayoutPoint.h"
#include "platform/geometry/LayoutRectOutsets.h"
@@ -470,6 +471,10 @@ void BoxPainter::paintFillLayerExtended(LayoutBoxModelObject& obj, const PaintIn
context->setColorFilter(ColorFilterLuminanceToAlpha);
InterpolationQuality previousInterpolationQuality = context->imageInterpolationQuality();
context->setImageInterpolationQuality(interpolationQuality);
+
+ if (image->isSVGImage())
+ image = SVGImageForContainer::create(toSVGImage(image.get()), geometry.tileSize(), obj.style()->effectiveZoom(), bgImage->url());
+
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "data", InspectorPaintImageEvent::data(obj, *bgImage));
context->drawTiledImage(image.get(), geometry.destRect(), geometry.phase(), geometry.tileSize(),
compositeOp, geometry.spaceSize());
« no previous file with comments | « Source/core/paint/BackgroundImageGeometry.cpp ('k') | Source/core/paint/ImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698