summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-03-29 17:55:53 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-29 17:55:53 -0700
commiteb4d2ca0fc95f42c0530e8adfcd107ff5369c09f (patch)
treef58979a68e5e1d130fa897dd9f9aafb8835ef9a8 /Source
parent31d21da3d4d4229b7d45d497b63e65f7bf8a9ae5 (diff)
parentb0534d9eee289a10ffd27d0383cc1e4dc0dd0bc2 (diff)
downloadexternal_webkit-eb4d2ca0fc95f42c0530e8adfcd107ff5369c09f.zip
external_webkit-eb4d2ca0fc95f42c0530e8adfcd107ff5369c09f.tar.gz
external_webkit-eb4d2ca0fc95f42c0530e8adfcd107ff5369c09f.tar.bz2
Merge "Add missing paintingDisabled() checks"
Diffstat (limited to 'Source')
-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