summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics
diff options
context:
space:
mode:
authorMike Reed <>2009-04-02 09:06:19 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-02 09:06:19 -0700
commit8ba88775fe9df1146de7683a6ef59e36e749b271 (patch)
treeb0fbd3182675259b9c1dcc4544b7bb44bab99baa /core/jni/android/graphics
parent10b4043c99dd93ba4db4f461f0761547170134ca (diff)
downloadframeworks_base-8ba88775fe9df1146de7683a6ef59e36e749b271.zip
frameworks_base-8ba88775fe9df1146de7683a6ef59e36e749b271.tar.gz
frameworks_base-8ba88775fe9df1146de7683a6ef59e36e749b271.tar.bz2
AI 144018: change path to return its internal cached bounds, making it much lighter-weight to get the bounds.
BUG=1748928 Automated import of CL 144018
Diffstat (limited to 'core/jni/android/graphics')
-rw-r--r--core/jni/android/graphics/Path.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/jni/android/graphics/Path.cpp b/core/jni/android/graphics/Path.cpp
index effb1c8..11c608c 100644
--- a/core/jni/android/graphics/Path.cpp
+++ b/core/jni/android/graphics/Path.cpp
@@ -75,9 +75,8 @@ public:
return result;
}
- static void computeBounds(JNIEnv* env, jobject clazz, SkPath* obj, jobject bounds, SkPath::BoundsType btype) {
- SkRect bounds_;
- obj->computeBounds(&bounds_, btype);
+ static void computeBounds(JNIEnv* env, jobject clazz, SkPath* obj, jobject bounds, int boundstype) {
+ const SkRect& bounds_ = obj->getBounds();
GraphicsJNI::rect_to_jrectf(bounds_, env, bounds);
}