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

Unified Diff: Source/platform/graphics/GraphicsContext.h

Issue 669123002: Fixed Shadow blur for transparent objects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added opacity check Created 6 years, 2 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: Source/platform/graphics/GraphicsContext.h
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
index f3e837ba9e9bab5ed9918c0b6b6f68a24ee9733a..d941cc24cf22793b46ca3ff187fad9cae96dd92c 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -136,6 +136,8 @@ public:
SkDrawLooper* drawLooper() const { return immutableState()->drawLooper(); }
+ SkImageFilter* imageFilter() const { return immutableState()->imageFilter(); }
+
bool getTransformedClipBounds(FloatRect* bounds) const;
SkMatrix getTotalMatrix() const;
@@ -350,6 +352,11 @@ public:
void setDrawLooper(PassOwnPtr<DrawLooperBuilder>);
void clearDrawLooper();
+ // It is assumed that this image filter is used only for shadows
+ // (i.e. an image filter is set if and only if there is a shadow).
+ void setImageFilter(PassRefPtr<SkImageFilter>);
Stephen White 2014/10/23 01:45:47 Make these private?
Justin Novosad 2014/10/23 02:29:21 Yes, and while you are at it, make the drawLooper
sugoi1 2014/10/23 17:43:17 Can't, they're also use for text shadows.
sugoi1 2014/10/23 17:43:17 Done.
+ void clearImageFilter();
+
void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);
void drawFocusRing(const Path&, int width, int offset, const Color&);
@@ -401,6 +408,7 @@ public:
const SkRect& destRect,
CompositeOperator,
WebBlendMode,
+ bool isOpaque,
bool isLazyDecoded = false,
bool isDataComplete = true) const;
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext.cpp » ('j') | Source/platform/graphics/GraphicsContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698