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

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 1144203004: Allow certain SP recorder classes to defer their "begin" operation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/ScrollRecorder.cpp ('k') | Source/platform/graphics/paint/ClipRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 7091c0cc4998e97a9c4a3a633b0bddb4827d95db..7541d3e2d1c2d1f1701ae4ca103a2bcc90ef27d8 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -291,9 +291,9 @@ void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const Fl
ClipRecorder clipRecorder(paintContext, *this, DisplayItem::ClipNodeImage, LayoutRect(enclosingIntRect(dstRect)));
bool hasCompositing = compositeOp != SkXfermode::kSrcOver_Mode;
- OwnPtr<CompositingRecorder> compositingRecorder;
+ CompositingRecorder compositingRecorder(paintContext, *this);
if (hasCompositing || opacity < 1)
- compositingRecorder = adoptPtr(new CompositingRecorder(paintContext, *this, compositeOp, opacity));
+ compositingRecorder.begin(compositeOp, opacity);
// We can only draw the entire frame, clipped to the rect we want. So compute where the top left
// of the image would be if we were drawing without clipping, and translate accordingly.
« no previous file with comments | « Source/core/paint/ScrollRecorder.cpp ('k') | Source/platform/graphics/paint/ClipRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698