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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.h

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 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 float, 141 float,
142 const FloatRect&, 142 const FloatRect&,
143 const FloatSize&, 143 const FloatSize&,
144 const FloatPoint&, 144 const FloatPoint&,
145 SkBlendMode, 145 SkBlendMode,
146 const FloatRect&, 146 const FloatRect&,
147 const FloatSize& repeatSpacing, 147 const FloatSize& repeatSpacing,
148 const KURL&); 148 const KURL&);
149 sk_sp<SkImage> imageForCurrentFrameForContainer(const KURL&, 149 sk_sp<SkImage> imageForCurrentFrameForContainer(const KURL&,
150 const IntSize& containerSize); 150 const IntSize& containerSize);
151
152 // Paints the current frame. If a PaintCanvas is passed, paints into that
153 // canvas and returns nullptr.
154 // Otherwise returns a pointer to the new PaintRecord.
151 sk_sp<PaintRecord> paintRecordForCurrentFrame(const FloatRect& bounds, 155 sk_sp<PaintRecord> paintRecordForCurrentFrame(const FloatRect& bounds,
152 const KURL&); 156 const KURL&,
157 PaintCanvas* = nullptr);
153 158
154 void drawInternal(PaintCanvas*, 159 void drawInternal(PaintCanvas*,
155 const PaintFlags&, 160 const PaintFlags&,
156 const FloatRect& fromRect, 161 const FloatRect& fromRect,
157 const FloatRect& toRect, 162 const FloatRect& toRect,
158 RespectImageOrientationEnum, 163 RespectImageOrientationEnum,
159 ImageClampingMode, 164 ImageClampingMode,
160 const KURL&); 165 const KURL&);
161 166
162 template <typename Func> 167 template <typename Func>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 207
203 ~ImageObserverDisabler() { m_image->setImageObserverDisabled(false); } 208 ~ImageObserverDisabler() { m_image->setImageObserverDisabled(false); }
204 209
205 private: 210 private:
206 Image* m_image; 211 Image* m_image;
207 }; 212 };
208 213
209 } // namespace blink 214 } // namespace blink
210 215
211 #endif // SVGImage_h 216 #endif // SVGImage_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGShapePainter.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698