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

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

Issue 2753633003: Implement SVGImage::applyShader() (Closed)
Patch Set: rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.h
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.h b/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
index eeb8487e30777736dbe4afb264511ce6917c0328..2b6fc9d7781f9148982c6a1170c7524f59b49487 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.h
@@ -29,6 +29,7 @@
#include "core/CoreExport.h"
#include "platform/graphics/Image.h"
+#include "platform/graphics/paint/PaintRecord.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
#include "third_party/skia/include/core/SkRefCnt.h"
@@ -127,7 +128,7 @@ class CORE_EXPORT SVGImage final : public Image {
ImageClampingMode) override;
void drawForContainer(PaintCanvas*,
const PaintFlags&,
- const FloatSize,
+ const FloatSize&,
float,
const FloatRect&,
const FloatRect&,
@@ -144,6 +145,10 @@ class CORE_EXPORT SVGImage final : public Image {
const KURL&);
sk_sp<SkImage> imageForCurrentFrameForContainer(const KURL&,
const IntSize& containerSize);
+ sk_sp<PaintRecord> paintRecordForCurrentFrame(const FloatRect& srcRect,
+ const FloatRect& dstRect,
+ const KURL&);
+
void drawInternal(PaintCanvas*,
const PaintFlags&,
const FloatRect& fromRect,
@@ -152,6 +157,19 @@ class CORE_EXPORT SVGImage final : public Image {
ImageClampingMode,
const KURL&);
+ template <typename Func>
+ void forContainer(const FloatSize&, Func&&);
+
+ bool applyShader(PaintFlags&, const SkMatrix& localMatrix) override;
+ bool applyShaderForContainer(const FloatSize&,
+ float zoom,
+ const KURL&,
+ PaintFlags&,
+ const SkMatrix& localMatrix);
+ bool applyShaderInternal(PaintFlags&,
+ const SkMatrix& localMatrix,
+ const KURL&);
+
void stopAnimation();
void scheduleTimelineRewind();
void flushPendingTimelineRewind();

Powered by Google App Engine
This is Rietveld 408576698