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

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

Issue 1087893004: Change SkPictureBuilder strategy to not create nested recorders (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 8 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 | « no previous file | Source/platform/graphics/paint/SkPictureBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGMaskPainter.cpp
diff --git a/Source/core/paint/SVGMaskPainter.cpp b/Source/core/paint/SVGMaskPainter.cpp
index 1726d11ce10a95b25528553f45e0e3d49c6cd320..94d9f4a99cdce9a4502c2d780a84a72d8a83d4e5 100644
--- a/Source/core/paint/SVGMaskPainter.cpp
+++ b/Source/core/paint/SVGMaskPainter.cpp
@@ -8,6 +8,7 @@
#include "core/layout/PaintInfo.h"
#include "core/layout/svg/LayoutSVGResourceMasker.h"
#include "core/paint/CompositingRecorder.h"
+#include "core/paint/LayoutObjectDrawingRecorder.h"
#include "core/paint/TransformRecorder.h"
#include "platform/graphics/paint/CompositingDisplayItem.h"
#include "platform/graphics/paint/DisplayItemList.h"
@@ -70,13 +71,9 @@ void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
TransformRecorder recorder(*context, layoutObject, contentTransformation);
- if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
- ASSERT(context->displayItemList());
- context->displayItemList()->add(DrawingDisplayItem::create(layoutObject, DisplayItem::SVGMask, maskContentPicture));
- } else {
- DrawingDisplayItem maskPicture(layoutObject, DisplayItem::SVGMask, maskContentPicture);
- maskPicture.replay(*context);
- }
+ LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, LayoutRect::infiniteIntRect());
+ if (!drawingRecorder.canUseCachedDrawing())
+ context->drawPicture(maskContentPicture.get());
}
}
« no previous file with comments | « no previous file | Source/platform/graphics/paint/SkPictureBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698