Loading core/jni/android_view_GLES20Canvas.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ static void android_view_GLES20Canvas_setMatrix(JNIEnv* env, jobject clazz, jlong rendererPtr, jlong matrixPtr) { OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixPtr); renderer->setMatrix(matrix); renderer->setMatrix(matrix ? *matrix : SkMatrix::I()); } static void android_view_GLES20Canvas_getMatrix(JNIEnv* env, jobject clazz, Loading @@ -387,7 +387,7 @@ static void android_view_GLES20Canvas_concatMatrix(JNIEnv* env, jobject clazz, jlong rendererPtr, jlong matrixPtr) { OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixPtr); renderer->concatMatrix(matrix); renderer->concatMatrix(*matrix); } // ---------------------------------------------------------------------------- Loading Loading @@ -430,7 +430,7 @@ static void android_view_GLES20Canvas_drawBitmapMatrix(JNIEnv* env, jobject claz OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixPtr); SkPaint* paint = reinterpret_cast<SkPaint*>(paintPtr); renderer->drawBitmap(bitmap, matrix, paint); renderer->drawBitmap(bitmap, *matrix, paint); } static void android_view_GLES20Canvas_drawBitmapData(JNIEnv* env, jobject clazz, Loading libs/hwui/DisplayList.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -80,10 +80,6 @@ void DisplayListData::cleanupResources() { delete paths.itemAt(i); } for (size_t i = 0; i < matrices.size(); i++) { delete matrices.itemAt(i); } bitmapResources.clear(); ownedBitmapResources.clear(); patchResources.clear(); Loading @@ -91,7 +87,6 @@ void DisplayListData::cleanupResources() { paints.clear(); regions.clear(); paths.clear(); matrices.clear(); layers.clear(); } Loading libs/hwui/DisplayList.h +0 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,6 @@ public: Vector<const SkPath*> paths; SortedVector<const SkPath*> sourcePaths; Vector<const SkRegion*> regions; Vector<const SkMatrix*> matrices; Vector<Layer*> layers; uint32_t functorCount; bool hasDrawOps; Loading libs/hwui/DisplayListOp.h +12 −12 Original line number Diff line number Diff line Loading @@ -472,7 +472,7 @@ private: class SetMatrixOp : public StateOp { public: SetMatrixOp(const SkMatrix* matrix) SetMatrixOp(const SkMatrix& matrix) : mMatrix(matrix) {} virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { Loading @@ -480,22 +480,22 @@ public: } virtual void output(int level, uint32_t logFlags) const { if (mMatrix) { OP_LOG("SetMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(mMatrix)); } else { if (mMatrix.isIdentity()) { OP_LOGS("SetMatrix (reset)"); } else { OP_LOG("SetMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix)); } } virtual const char* name() { return "SetMatrix"; } private: const SkMatrix* mMatrix; const SkMatrix mMatrix; }; class ConcatMatrixOp : public StateOp { public: ConcatMatrixOp(const SkMatrix* matrix) ConcatMatrixOp(const SkMatrix& matrix) : mMatrix(matrix) {} virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { Loading @@ -503,13 +503,13 @@ public: } virtual void output(int level, uint32_t logFlags) const { OP_LOG("ConcatMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(mMatrix)); OP_LOG("ConcatMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix)); } virtual const char* name() { return "ConcatMatrix"; } private: const SkMatrix* mMatrix; const SkMatrix mMatrix; }; class ClipOp : public StateOp { Loading Loading @@ -746,10 +746,10 @@ protected: class DrawBitmapMatrixOp : public DrawBoundedOp { public: DrawBitmapMatrixOp(const SkBitmap* bitmap, const SkMatrix* matrix, const SkPaint* paint) DrawBitmapMatrixOp(const SkBitmap* bitmap, const SkMatrix& matrix, const SkPaint* paint) : DrawBoundedOp(paint), mBitmap(bitmap), mMatrix(matrix) { mLocalBounds.set(0, 0, bitmap->width(), bitmap->height()); const mat4 transform(*matrix); const mat4 transform(matrix); transform.mapRect(mLocalBounds); } Loading @@ -758,7 +758,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw bitmap %p matrix " SK_MATRIX_STRING, mBitmap, SK_MATRIX_ARGS(mMatrix)); OP_LOG("Draw bitmap %p matrix " SK_MATRIX_STRING, mBitmap, SK_MATRIX_ARGS(&mMatrix)); } virtual const char* name() { return "DrawBitmapMatrix"; } Loading @@ -770,7 +770,7 @@ public: private: const SkBitmap* mBitmap; const SkMatrix* mMatrix; const SkMatrix mMatrix; }; class DrawBitmapRectOp : public DrawBoundedOp { Loading libs/hwui/DisplayListRenderer.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -141,14 +141,12 @@ void DisplayListRenderer::skew(float sx, float sy) { StatefulBaseRenderer::skew(sx, sy); } void DisplayListRenderer::setMatrix(const SkMatrix* matrix) { matrix = refMatrix(matrix); void DisplayListRenderer::setMatrix(const SkMatrix& matrix) { addStateOp(new (alloc()) SetMatrixOp(matrix)); StatefulBaseRenderer::setMatrix(matrix); } void DisplayListRenderer::concatMatrix(const SkMatrix* matrix) { matrix = refMatrix(matrix); void DisplayListRenderer::concatMatrix(const SkMatrix& matrix) { addStateOp(new (alloc()) ConcatMatrixOp(matrix)); StatefulBaseRenderer::concatMatrix(matrix); } Loading Loading @@ -203,10 +201,9 @@ status_t DisplayListRenderer::drawBitmap(const SkBitmap* bitmap, float left, flo return DrawGlInfo::kStatusDone; } status_t DisplayListRenderer::drawBitmap(const SkBitmap* bitmap, const SkMatrix* matrix, status_t DisplayListRenderer::drawBitmap(const SkBitmap* bitmap, const SkMatrix& matrix, const SkPaint* paint) { bitmap = refBitmap(bitmap); matrix = refMatrix(matrix); paint = refPaint(paint); addDrawOp(new (alloc()) DrawBitmapMatrixOp(bitmap, matrix, paint)); Loading Loading
core/jni/android_view_GLES20Canvas.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ static void android_view_GLES20Canvas_setMatrix(JNIEnv* env, jobject clazz, jlong rendererPtr, jlong matrixPtr) { OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixPtr); renderer->setMatrix(matrix); renderer->setMatrix(matrix ? *matrix : SkMatrix::I()); } static void android_view_GLES20Canvas_getMatrix(JNIEnv* env, jobject clazz, Loading @@ -387,7 +387,7 @@ static void android_view_GLES20Canvas_concatMatrix(JNIEnv* env, jobject clazz, jlong rendererPtr, jlong matrixPtr) { OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixPtr); renderer->concatMatrix(matrix); renderer->concatMatrix(*matrix); } // ---------------------------------------------------------------------------- Loading Loading @@ -430,7 +430,7 @@ static void android_view_GLES20Canvas_drawBitmapMatrix(JNIEnv* env, jobject claz OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr); SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixPtr); SkPaint* paint = reinterpret_cast<SkPaint*>(paintPtr); renderer->drawBitmap(bitmap, matrix, paint); renderer->drawBitmap(bitmap, *matrix, paint); } static void android_view_GLES20Canvas_drawBitmapData(JNIEnv* env, jobject clazz, Loading
libs/hwui/DisplayList.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -80,10 +80,6 @@ void DisplayListData::cleanupResources() { delete paths.itemAt(i); } for (size_t i = 0; i < matrices.size(); i++) { delete matrices.itemAt(i); } bitmapResources.clear(); ownedBitmapResources.clear(); patchResources.clear(); Loading @@ -91,7 +87,6 @@ void DisplayListData::cleanupResources() { paints.clear(); regions.clear(); paths.clear(); matrices.clear(); layers.clear(); } Loading
libs/hwui/DisplayList.h +0 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,6 @@ public: Vector<const SkPath*> paths; SortedVector<const SkPath*> sourcePaths; Vector<const SkRegion*> regions; Vector<const SkMatrix*> matrices; Vector<Layer*> layers; uint32_t functorCount; bool hasDrawOps; Loading
libs/hwui/DisplayListOp.h +12 −12 Original line number Diff line number Diff line Loading @@ -472,7 +472,7 @@ private: class SetMatrixOp : public StateOp { public: SetMatrixOp(const SkMatrix* matrix) SetMatrixOp(const SkMatrix& matrix) : mMatrix(matrix) {} virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { Loading @@ -480,22 +480,22 @@ public: } virtual void output(int level, uint32_t logFlags) const { if (mMatrix) { OP_LOG("SetMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(mMatrix)); } else { if (mMatrix.isIdentity()) { OP_LOGS("SetMatrix (reset)"); } else { OP_LOG("SetMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix)); } } virtual const char* name() { return "SetMatrix"; } private: const SkMatrix* mMatrix; const SkMatrix mMatrix; }; class ConcatMatrixOp : public StateOp { public: ConcatMatrixOp(const SkMatrix* matrix) ConcatMatrixOp(const SkMatrix& matrix) : mMatrix(matrix) {} virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { Loading @@ -503,13 +503,13 @@ public: } virtual void output(int level, uint32_t logFlags) const { OP_LOG("ConcatMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(mMatrix)); OP_LOG("ConcatMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix)); } virtual const char* name() { return "ConcatMatrix"; } private: const SkMatrix* mMatrix; const SkMatrix mMatrix; }; class ClipOp : public StateOp { Loading Loading @@ -746,10 +746,10 @@ protected: class DrawBitmapMatrixOp : public DrawBoundedOp { public: DrawBitmapMatrixOp(const SkBitmap* bitmap, const SkMatrix* matrix, const SkPaint* paint) DrawBitmapMatrixOp(const SkBitmap* bitmap, const SkMatrix& matrix, const SkPaint* paint) : DrawBoundedOp(paint), mBitmap(bitmap), mMatrix(matrix) { mLocalBounds.set(0, 0, bitmap->width(), bitmap->height()); const mat4 transform(*matrix); const mat4 transform(matrix); transform.mapRect(mLocalBounds); } Loading @@ -758,7 +758,7 @@ public: } virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw bitmap %p matrix " SK_MATRIX_STRING, mBitmap, SK_MATRIX_ARGS(mMatrix)); OP_LOG("Draw bitmap %p matrix " SK_MATRIX_STRING, mBitmap, SK_MATRIX_ARGS(&mMatrix)); } virtual const char* name() { return "DrawBitmapMatrix"; } Loading @@ -770,7 +770,7 @@ public: private: const SkBitmap* mBitmap; const SkMatrix* mMatrix; const SkMatrix mMatrix; }; class DrawBitmapRectOp : public DrawBoundedOp { Loading
libs/hwui/DisplayListRenderer.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -141,14 +141,12 @@ void DisplayListRenderer::skew(float sx, float sy) { StatefulBaseRenderer::skew(sx, sy); } void DisplayListRenderer::setMatrix(const SkMatrix* matrix) { matrix = refMatrix(matrix); void DisplayListRenderer::setMatrix(const SkMatrix& matrix) { addStateOp(new (alloc()) SetMatrixOp(matrix)); StatefulBaseRenderer::setMatrix(matrix); } void DisplayListRenderer::concatMatrix(const SkMatrix* matrix) { matrix = refMatrix(matrix); void DisplayListRenderer::concatMatrix(const SkMatrix& matrix) { addStateOp(new (alloc()) ConcatMatrixOp(matrix)); StatefulBaseRenderer::concatMatrix(matrix); } Loading Loading @@ -203,10 +201,9 @@ status_t DisplayListRenderer::drawBitmap(const SkBitmap* bitmap, float left, flo return DrawGlInfo::kStatusDone; } status_t DisplayListRenderer::drawBitmap(const SkBitmap* bitmap, const SkMatrix* matrix, status_t DisplayListRenderer::drawBitmap(const SkBitmap* bitmap, const SkMatrix& matrix, const SkPaint* paint) { bitmap = refBitmap(bitmap); matrix = refMatrix(matrix); paint = refPaint(paint); addDrawOp(new (alloc()) DrawBitmapMatrixOp(bitmap, matrix, paint)); Loading