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

Side by Side Diff: Source/core/paint/SVGMaskPainter.cpp

Issue 1315993004: Implement a paint offset cache for slimming paint v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase more (world moved in the past hour) 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 unified diff | Download patch
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/paint/SVGRootInlineBoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "config.h" 5 #include "config.h"
6 #include "core/paint/SVGMaskPainter.h" 6 #include "core/paint/SVGMaskPainter.h"
7 7
8 #include "core/layout/svg/LayoutSVGResourceMasker.h" 8 #include "core/layout/svg/LayoutSVGResourceMasker.h"
9 #include "core/paint/CompositingRecorder.h" 9 #include "core/paint/CompositingRecorder.h"
10 #include "core/paint/LayoutObjectDrawingRecorder.h" 10 #include "core/paint/LayoutObjectDrawingRecorder.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 } 70 }
71 71
72 void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay outObject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& ta rgetPaintInvalidationRect) 72 void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay outObject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& ta rgetPaintInvalidationRect)
73 { 73 {
74 ASSERT(context); 74 ASSERT(context);
75 75
76 AffineTransform contentTransformation; 76 AffineTransform contentTransformation;
77 RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(con tentTransformation, targetBoundingBox, context); 77 RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(con tentTransformation, targetBoundingBox, context);
78 78
79 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layout Object, DisplayItem::SVGMask)) 79 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layout Object, DisplayItem::SVGMask, LayoutPoint()))
80 return; 80 return;
81 81
82 LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayI tem::SVGMask, targetPaintInvalidationRect); 82 LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayI tem::SVGMask, targetPaintInvalidationRect, LayoutPoint());
83 context->save(); 83 context->save();
84 context->concatCTM(contentTransformation); 84 context->concatCTM(contentTransformation);
85 context->drawPicture(maskContentPicture.get()); 85 context->drawPicture(maskContentPicture.get());
86 context->restore(); 86 context->restore();
87 } 87 }
88 88
89 } 89 }
OLDNEW
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/paint/SVGRootInlineBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698