diff options
author | Derek Sollenberger <djsollen@google.com> | 2011-05-16 13:09:42 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2011-05-16 15:30:40 -0400 |
commit | d39d1affe82cb8c21d32baaa5fbb2d6afb806f8e (patch) | |
tree | 05f6bcaf8113b7428c7f8315ee8a540ad91940e1 /core/jni/android/graphics | |
parent | 7b06e3516ccd452224d9b160c8cf54c3b9f3597d (diff) | |
download | frameworks_base-d39d1affe82cb8c21d32baaa5fbb2d6afb806f8e.zip frameworks_base-d39d1affe82cb8c21d32baaa5fbb2d6afb806f8e.tar.gz frameworks_base-d39d1affe82cb8c21d32baaa5fbb2d6afb806f8e.tar.bz2 |
Updates resulting from the Skia merge (revision 1327)
Change-Id: I2a8f5869dbe95bb594f2ba5d7278f9b330e6f17a
Diffstat (limited to 'core/jni/android/graphics')
-rw-r--r-- | core/jni/android/graphics/Canvas.cpp | 14 | ||||
-rw-r--r-- | core/jni/android/graphics/NinePatchImpl.cpp | 6 |
2 files changed, 3 insertions, 17 deletions
diff --git a/core/jni/android/graphics/Canvas.cpp b/core/jni/android/graphics/Canvas.cpp index 9d9196e..17b0d3e 100644 --- a/core/jni/android/graphics/Canvas.cpp +++ b/core/jni/android/graphics/Canvas.cpp @@ -73,20 +73,6 @@ public: static jboolean isOpaque(JNIEnv* env, jobject jcanvas) { NPE_CHECK_RETURN_ZERO(env, jcanvas); SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, jcanvas); - - /* - Currently we cannot support transparency in GL-based canvas' at - the view level. Therefore we cannot base our answer on the device's - bitmap, but need to hard-code the answer. If we relax this - limitation in views, we can simplify the following code as well. - - Use the getViewport() call to find out if we're gl-based... - */ - if (canvas->getViewport(NULL)) { - return true; - } - - // normal technique, rely on the device's bitmap for the answer return canvas->getDevice()->accessBitmap(false).isOpaque(); } diff --git a/core/jni/android/graphics/NinePatchImpl.cpp b/core/jni/android/graphics/NinePatchImpl.cpp index ff24a87..a3e36ee 100644 --- a/core/jni/android/graphics/NinePatchImpl.cpp +++ b/core/jni/android/graphics/NinePatchImpl.cpp @@ -116,9 +116,9 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, paint = &defaultPaint; } - // if our canvas is GL, draw this as a mesh, which will be faster than - // in parts (which is faster for raster) - if (canvas && canvas->getViewport(NULL)) { + // if our SkCanvas were back by GL we should enable this and draw this as + // a mesh, which will be faster in most cases. + if (false) { SkNinePatch::DrawMesh(canvas, bounds, bitmap, chunk.xDivs, chunk.numXDivs, chunk.yDivs, chunk.numYDivs, |