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

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

Issue 15137009: Refactor shadow rendering logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge upstream changes Created 7 years, 7 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
« no previous file with comments | « Source/core/platform/graphics/DrawLooper.cpp ('k') | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsContext.h
diff --git a/Source/core/platform/graphics/GraphicsContext.h b/Source/core/platform/graphics/GraphicsContext.h
index 7c70d3f9201b1ef5de7000eb4ec7520400f3ac6d..0ad15282fc7eb5411c0a5cf4239761cff21385ac 100644
--- a/Source/core/platform/graphics/GraphicsContext.h
+++ b/Source/core/platform/graphics/GraphicsContext.h
@@ -30,6 +30,7 @@
#include "core/platform/chromium/TraceEvent.h"
#include "core/platform/graphics/DashArray.h"
+#include "core/platform/graphics/DrawLooper.h"
#include "core/platform/graphics/FloatRect.h"
#include "core/platform/graphics/Font.h"
#include "core/platform/graphics/GraphicsContextState.h"
@@ -316,10 +317,14 @@ public:
void beginLayerClippedToImage(const FloatRect&, const ImageBuffer*);
bool hasShadow() const;
- void setShadow(const FloatSize&, float blur, const Color&, ColorSpace);
-
- bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const;
- void clearShadow();
+ void setShadow(const FloatSize& offset, float blur, const Color&,
+ DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha);
+ void clearShadow() { clearDrawLooper(); }
+
+ // It is assumed that this draw looper is used only for shadows
+ // (i.e. a draw looper is set if and only if there is a shadow).
+ void setDrawLooper(DrawLooper&);
+ void clearDrawLooper();
void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);
void drawFocusRing(const Path&, int width, int offset, const Color&);
« no previous file with comments | « Source/core/platform/graphics/DrawLooper.cpp ('k') | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698