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

Unified Diff: Source/platform/graphics/GraphicsContextState.cpp

Issue 1093673002: Removing the dependency on GraphicsContext for drawing images in 2D canvas (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/GraphicsContextState.cpp
diff --git a/Source/platform/graphics/GraphicsContextState.cpp b/Source/platform/graphics/GraphicsContextState.cpp
index 02ba5f1d43b6f848a666e903efa16864753e143b..512a6c3d65c0852fea13e548596187f2bb4f4336 100644
--- a/Source/platform/graphics/GraphicsContextState.cpp
+++ b/Source/platform/graphics/GraphicsContextState.cpp
@@ -17,7 +17,6 @@ GraphicsContextState::GraphicsContextState()
, m_interpolationQuality(InterpolationDefault)
, m_saveCount(0)
, m_shouldAntialias(true)
- , m_shouldClampToSourceRect(true)
{
m_strokePaint.setStyle(SkPaint::kStroke_Style);
m_strokePaint.setStrokeWidth(SkFloatToScalar(m_strokeData.thickness()));
@@ -44,15 +43,13 @@ GraphicsContextState::GraphicsContextState(const GraphicsContextState& other)
, m_fillGradient(other.m_fillGradient)
, m_fillPattern(other.m_fillPattern)
, m_looper(other.m_looper)
- , m_dropShadowImageFilter(other.m_dropShadowImageFilter)
, m_textDrawingMode(other.m_textDrawingMode)
, m_alpha(other.m_alpha)
, m_colorFilter(other.m_colorFilter)
, m_compositeOperation(other.m_compositeOperation)
, m_interpolationQuality(other.m_interpolationQuality)
, m_saveCount(0)
- , m_shouldAntialias(other.m_shouldAntialias)
- , m_shouldClampToSourceRect(other.m_shouldClampToSourceRect) { }
+ , m_shouldAntialias(other.m_shouldAntialias) { }
void GraphicsContextState::copy(const GraphicsContextState& source)
{
@@ -173,23 +170,6 @@ void GraphicsContextState::clearDrawLooper()
m_fillPaint.setLooper(0);
}
-void GraphicsContextState::setDropShadowImageFilter(PassRefPtr<SkImageFilter> dropShadowImageFilter)
-{
- m_dropShadowImageFilter = dropShadowImageFilter;
-}
-
-void GraphicsContextState::clearDropShadowImageFilter()
-{
- m_dropShadowImageFilter.clear();
-}
-
-void GraphicsContextState::setAlphaAsFloat(float alpha)
-{
- m_alpha = clampedAlphaForBlending(alpha);
- m_strokePaint.setColor(applyAlpha(m_strokeColor.rgb()));
- m_fillPaint.setColor(applyAlpha(m_fillColor.rgb()));
-}
-
void GraphicsContextState::setLineDash(const DashArray& dashes, float dashOffset)
{
m_strokeData.setLineDash(dashes, dashOffset);

Powered by Google App Engine
This is Rietveld 408576698