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

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGShapePainter.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/SVGShapePainter.h" 5 #include "core/paint/SVGShapePainter.h"
6 6
7 #include "core/layout/svg/LayoutSVGResourceMarker.h" 7 #include "core/layout/svg/LayoutSVGResourceMarker.h"
8 #include "core/layout/svg/LayoutSVGShape.h" 8 #include "core/layout/svg/LayoutSVGShape.h"
9 #include "core/layout/svg/SVGLayoutSupport.h" 9 #include "core/layout/svg/SVGLayoutSupport.h"
10 #include "core/layout/svg/SVGMarkerData.h" 10 #include "core/layout/svg/SVGMarkerData.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 // It's expensive to track the transformed paint cull rect for each 244 // It's expensive to track the transformed paint cull rect for each
245 // marker so just disable culling. The shape paint call will already 245 // marker so just disable culling. The shape paint call will already
246 // be culled if it is outside the paint info cull rect. 246 // be culled if it is outside the paint info cull rect.
247 IntRect bounds(LayoutRect::infiniteIntRect()); 247 IntRect bounds(LayoutRect::infiniteIntRect());
248 PaintRecordBuilder builder(FloatRect(bounds), nullptr, &paintInfo.context); 248 PaintRecordBuilder builder(FloatRect(bounds), nullptr, &paintInfo.context);
249 PaintInfo markerPaintInfo(builder.context(), paintInfo); 249 PaintInfo markerPaintInfo(builder.context(), paintInfo);
250 markerPaintInfo.m_cullRect.m_rect = bounds; 250 markerPaintInfo.m_cullRect.m_rect = bounds;
251 251
252 SVGContainerPainter(marker).paint(markerPaintInfo); 252 SVGContainerPainter(marker).paint(markerPaintInfo);
253 canvas->PlaybackPaintRecord(builder.endRecording()); 253 builder.endRecording(*canvas);
254 254
255 canvas->restore(); 255 canvas->restore();
256 } 256 }
257 257
258 } // namespace blink 258 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698