Loading core/jni/android/graphics/Camera.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -96,10 +96,12 @@ static void Camera_getMatrix(JNIEnv* env, jobject obj, jlong matrixHandle) { } static void Camera_applyToCanvas(JNIEnv* env, jobject obj, jlong canvasHandle) { SkCanvas* canvas = reinterpret_cast<android::Canvas*>(canvasHandle)->asSkCanvas(); android::Canvas* canvas = reinterpret_cast<android::Canvas*>(canvasHandle); jlong viewHandle = env->GetLongField(obj, gNativeInstanceFieldID); Sk3DView* v = reinterpret_cast<Sk3DView*>(viewHandle); v->applyToCanvas(canvas); SkMatrix matrix; v->getMatrix(&matrix); canvas->concat(matrix); } static jfloat Camera_dotWithNormal(JNIEnv* env, jobject obj, Loading graphics/java/android/graphics/Camera.java +1 −9 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ import android.annotation.UnsupportedAppUsage; * {@link Canvas}. */ public class Camera { private Matrix mMatrix; /** * Creates a new camera, with empty transformations. */ Loading Loading @@ -151,14 +149,8 @@ public class Camera { * @param canvas The Canvas to set the transform matrix onto */ public void applyToCanvas(Canvas canvas) { if (canvas.isHardwareAccelerated()) { if (mMatrix == null) mMatrix = new Matrix(); getMatrix(mMatrix); canvas.concat(mMatrix); } else { nativeApplyToCanvas(canvas.getNativeCanvasWrapper()); } } public native float dotWithNormal(float dx, float dy, float dz); Loading Loading
core/jni/android/graphics/Camera.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -96,10 +96,12 @@ static void Camera_getMatrix(JNIEnv* env, jobject obj, jlong matrixHandle) { } static void Camera_applyToCanvas(JNIEnv* env, jobject obj, jlong canvasHandle) { SkCanvas* canvas = reinterpret_cast<android::Canvas*>(canvasHandle)->asSkCanvas(); android::Canvas* canvas = reinterpret_cast<android::Canvas*>(canvasHandle); jlong viewHandle = env->GetLongField(obj, gNativeInstanceFieldID); Sk3DView* v = reinterpret_cast<Sk3DView*>(viewHandle); v->applyToCanvas(canvas); SkMatrix matrix; v->getMatrix(&matrix); canvas->concat(matrix); } static jfloat Camera_dotWithNormal(JNIEnv* env, jobject obj, Loading
graphics/java/android/graphics/Camera.java +1 −9 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ import android.annotation.UnsupportedAppUsage; * {@link Canvas}. */ public class Camera { private Matrix mMatrix; /** * Creates a new camera, with empty transformations. */ Loading Loading @@ -151,14 +149,8 @@ public class Camera { * @param canvas The Canvas to set the transform matrix onto */ public void applyToCanvas(Canvas canvas) { if (canvas.isHardwareAccelerated()) { if (mMatrix == null) mMatrix = new Matrix(); getMatrix(mMatrix); canvas.concat(mMatrix); } else { nativeApplyToCanvas(canvas.getNativeCanvasWrapper()); } } public native float dotWithNormal(float dx, float dy, float dz); Loading