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

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

Issue 15137009: Refactor shadow rendering logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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/GraphicsContext.cpp ('k') | Source/core/rendering/EllipsisBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsContextState.h
diff --git a/Source/core/platform/graphics/GraphicsContextState.h b/Source/core/platform/graphics/GraphicsContextState.h
index 9d27ba4dbbfe376600305568a08769d2524b61cb..dbf98d60a432c29df4b308a69e008db5a9b025bb 100644
--- a/Source/core/platform/graphics/GraphicsContextState.h
+++ b/Source/core/platform/graphics/GraphicsContextState.h
@@ -36,6 +36,7 @@
#include "core/platform/graphics/Pattern.h"
#include "third_party/skia/include/core/SkColorPriv.h"
+#include "third_party/skia/include/core/SkDrawLooper.h"
#include "third_party/skia/include/effects/SkDashPathEffect.h"
#include "wtf/PassOwnPtr.h"
@@ -70,12 +71,10 @@ private:
, m_fillColorPacked(0xFF000000)
, m_fillColorSpace(ColorSpaceDeviceRGB)
, m_fillRule(RULE_NONZERO)
- , m_shadowBlur(0)
- , m_shadowColorSpace(ColorSpaceDeviceRGB)
+ , m_looper(0)
, m_textDrawingMode(TextModeFill)
, m_alpha(1)
, m_xferMode(SkXfermode::kSrcOver_Mode)
- , m_looper(0)
, m_compositeOperator(CompositeSourceOver)
, m_blendMode(BlendModeNormal)
, m_clip(SkRect::MakeEmpty())
@@ -110,14 +109,10 @@ private:
, m_fillRule(other.m_fillRule)
, m_fillGradient(other.m_fillGradient)
, m_fillPattern(other.m_fillPattern)
- , m_shadowBlur(other.m_shadowBlur)
- , m_shadowColor(other.m_shadowColor)
- , m_shadowOffset(other.m_shadowOffset)
- , m_shadowColorSpace(other.m_shadowColorSpace)
+ , m_looper(other.m_looper)
, m_textDrawingMode(other.m_textDrawingMode)
, m_alpha(other.m_alpha)
, m_xferMode(other.m_xferMode)
- , m_looper(other.m_looper)
, m_compositeOperator(other.m_compositeOperator)
, m_blendMode(other.m_blendMode)
, m_imageBufferClip(other.m_imageBufferClip)
@@ -179,11 +174,8 @@ private:
RefPtr<Gradient> m_fillGradient;
RefPtr<Pattern> m_fillPattern;
- // Shadow.
- float m_shadowBlur;
- Color m_shadowColor;
- FloatSize m_shadowOffset;
- ColorSpace m_shadowColorSpace;
+ // Shadow. (This will need tweaking if we use draw loopers for other things.)
+ SkDrawLooper* m_looper;
// Text. (See TextModeFill & friends.)
TextDrawingModeFlags m_textDrawingMode;
@@ -191,7 +183,6 @@ private:
// Common shader state.
float m_alpha;
SkXfermode::Mode m_xferMode;
- SkDrawLooper* m_looper;
// Compositing control, for the CSS and Canvas compositing spec.
CompositeOperator m_compositeOperator;
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext.cpp ('k') | Source/core/rendering/EllipsisBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698