summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GradientAndroid.cpp
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-04-29 10:47:10 -0400
committerMike Reed <reed@google.com>2009-04-29 11:30:19 -0400
commit8535e17115184dbb5e448b6364b88eb52df34482 (patch)
treee282875c82ad48dd67a46b0d4efbdcfebcc56ce2 /WebCore/platform/graphics/android/GradientAndroid.cpp
parent6a813290b2f6bb173cda985d26b231d3c539696d (diff)
downloadexternal_webkit-8535e17115184dbb5e448b6364b88eb52df34482.zip
external_webkit-8535e17115184dbb5e448b6364b88eb52df34482.tar.gz
external_webkit-8535e17115184dbb5e448b6364b88eb52df34482.tar.bz2
share xfermode and color routines with chrome port
Besides sharing those routines in SkiaUtils.cpp, also remove our (now redundant) android_setrect, etc. calls, since the type-conversion extras we added earlier take care of this by using constructors.
Diffstat (limited to 'WebCore/platform/graphics/android/GradientAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/GradientAndroid.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/GradientAndroid.cpp b/WebCore/platform/graphics/android/GradientAndroid.cpp
index b98c4a9..8334d1c 100644
--- a/WebCore/platform/graphics/android/GradientAndroid.cpp
+++ b/WebCore/platform/graphics/android/GradientAndroid.cpp
@@ -73,9 +73,7 @@ SkShader* Gradient::getShader(SkShader::TileMode mode)
this->getColor(0, &r, &g, &b, &a);
}
- SkPoint pts[2];
- android_setpt(&pts[0], m_p0);
- android_setpt(&pts[1], m_p1);
+ SkPoint pts[2] = { m_p0, m_p1 }; // convert to SkPoint
const size_t count = m_stops.size();
SkAutoMalloc storage(count * (sizeof(SkColor) + sizeof(SkScalar)));
@@ -121,7 +119,7 @@ void Gradient::fill(GraphicsContext* context, const FloatRect& rect)
paint.setAntiAlias(true);
paint.setShader(this->getShader(mode));
- android_gc2canvas(context)->drawRect(*android_setrect(&r, rect), paint);
+ android_gc2canvas(context)->drawRect(rect, paint);
}