Loading core/jni/android/graphics/Canvas.cpp +0 −15 Original line number Diff line number Diff line Loading @@ -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(); } Loading @@ -104,7 +90,6 @@ public: static void setViewport(JNIEnv* env, jobject, SkCanvas* canvas, int width, int height) { canvas->setViewport(width, height); } static void setBitmap(JNIEnv* env, jobject, SkCanvas* canvas, Loading core/jni/android/graphics/NinePatchImpl.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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, Loading Loading
core/jni/android/graphics/Canvas.cpp +0 −15 Original line number Diff line number Diff line Loading @@ -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(); } Loading @@ -104,7 +90,6 @@ public: static void setViewport(JNIEnv* env, jobject, SkCanvas* canvas, int width, int height) { canvas->setViewport(width, height); } static void setBitmap(JNIEnv* env, jobject, SkCanvas* canvas, Loading
core/jni/android/graphics/NinePatchImpl.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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, Loading