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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp

Issue 2791043002: Draw recorded content directly into the containing PaintCanvas, when possible. (Closed)
Patch Set: none Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * Copyright 2014 The Chromium Authors. All rights reserved. 4 * Copyright 2014 The Chromium Authors. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 SubtreeContentTransformScope contentTransformScope(contentTransform); 211 SubtreeContentTransformScope contentTransformScope(contentTransform);
212 212
213 PaintRecordBuilder builder(bounds); 213 PaintRecordBuilder builder(bounds);
214 for (LayoutObject* child = patternLayoutObject->firstChild(); child; 214 for (LayoutObject* child = patternLayoutObject->firstChild(); child;
215 child = child->nextSibling()) 215 child = child->nextSibling())
216 SVGPaintContext::paintResourceSubtree(builder.context(), child); 216 SVGPaintContext::paintResourceSubtree(builder.context(), child);
217 PaintRecorder paintRecorder; 217 PaintRecorder paintRecorder;
218 PaintCanvas* canvas = paintRecorder.beginRecording(bounds); 218 PaintCanvas* canvas = paintRecorder.beginRecording(bounds);
219 canvas->save(); 219 canvas->save();
220 canvas->concat(affineTransformToSkMatrix(tileTransform)); 220 canvas->concat(affineTransformToSkMatrix(tileTransform));
221 canvas->drawPicture(builder.endRecording()); 221 builder.endRecording(*canvas);
222 canvas->restore(); 222 canvas->restore();
223 return paintRecorder.finishRecordingAsPicture(); 223 return paintRecorder.finishRecordingAsPicture();
224 } 224 }
225 225
226 } // namespace blink 226 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/paint/SVGShapePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698