summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-03-29 16:26:50 -0700
committerJohn Reck <jreck@google.com>2012-03-29 16:26:50 -0700
commitb0534d9eee289a10ffd27d0383cc1e4dc0dd0bc2 (patch)
tree412a5e7729ee936c74b133ca33df13f8fb78248a /Source/WebCore
parentf77b0a4ca29a927a816ccd71b2a32b3d70200db0 (diff)
downloadexternal_webkit-b0534d9eee289a10ffd27d0383cc1e4dc0dd0bc2.zip
external_webkit-b0534d9eee289a10ffd27d0383cc1e4dc0dd0bc2.tar.gz
external_webkit-b0534d9eee289a10ffd27d0383cc1e4dc0dd0bc2.tar.bz2
Add missing paintingDisabled() checks
Bug: 6236131 Change-Id: I9fc4e166413ff70692f4414912c2613834387e33
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index bdc8005..7d6c809 100644
--- a/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -108,11 +108,15 @@ void GraphicsContext::platformDestroy()
void GraphicsContext::savePlatformState()
{
+ if (paintingDisabled())
+ return;
platformContext()->save();
}
void GraphicsContext::restorePlatformState()
{
+ if (paintingDisabled())
+ return;
platformContext()->restore();
}
@@ -301,36 +305,50 @@ void GraphicsContext::endTransparencyLayer()
void GraphicsContext::setupFillPaint(SkPaint* paint)
{
+ if (paintingDisabled())
+ return;
platformContext()->setupPaintFill(paint);
}
void GraphicsContext::setupStrokePaint(SkPaint* paint)
{
+ if (paintingDisabled())
+ return;
platformContext()->setupPaintStroke(paint, 0);
}
bool GraphicsContext::setupShadowPaint(SkPaint* paint, SkPoint* offset)
{
+ if (paintingDisabled())
+ return false;
return platformContext()->setupPaintShadow(paint, offset);
}
void GraphicsContext::setPlatformStrokeColor(const Color& c, ColorSpace)
{
+ if (paintingDisabled())
+ return;
platformContext()->setStrokeColor(c);
}
void GraphicsContext::setPlatformStrokeThickness(float f)
{
+ if (paintingDisabled())
+ return;
platformContext()->setStrokeThickness(f);
}
void GraphicsContext::setPlatformStrokeStyle(StrokeStyle style)
{
+ if (paintingDisabled())
+ return;
platformContext()->setStrokeStyle(style);
}
void GraphicsContext::setPlatformFillColor(const Color& c, ColorSpace)
{
+ if (paintingDisabled())
+ return;
platformContext()->setFillColor(c);
}
@@ -501,30 +519,40 @@ void GraphicsContext::setPlatformShouldAntialias(bool useAA)
void GraphicsContext::setPlatformFillGradient(Gradient* fillGradient)
{
+ if (paintingDisabled())
+ return;
SkShader* shader = extractShader(0, fillGradient);
platformContext()->setFillShader(shader);
}
void GraphicsContext::setPlatformFillPattern(Pattern* fillPattern)
{
+ if (paintingDisabled())
+ return;
SkShader* shader = extractShader(fillPattern, 0);
platformContext()->setFillShader(shader);
}
void GraphicsContext::setPlatformStrokeGradient(Gradient* strokeGradient)
{
+ if (paintingDisabled())
+ return;
SkShader* shader = extractShader(0, strokeGradient);
platformContext()->setStrokeShader(shader);
}
void GraphicsContext::setPlatformStrokePattern(Pattern* strokePattern)
{
+ if (paintingDisabled())
+ return;
SkShader* shader = extractShader(strokePattern, 0);
platformContext()->setStrokeShader(shader);
}
AffineTransform GraphicsContext::getCTM() const
{
+ if (paintingDisabled())
+ return AffineTransform();
const SkMatrix& m = platformContext()->getTotalMatrix();
return AffineTransform(SkScalarToDouble(m.getScaleX()), // a
SkScalarToDouble(m.getSkewY()), // b