summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp8
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
index ed7e864..532a36d 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
@@ -397,10 +397,10 @@ const SkMatrix& PlatformGraphicsContextRecording::getTotalMatrix()
{
// Each RecordingState tracks the delta from its "parent" SkMatrix
if (mRecordingStateStack.size()) {
- SkMatrix total = mRootMatrix;
- for (int i = 0; i < mRecordingStateStack.size(); i++)
- total.preConcat(mRecordingStateStack[i].mMatrix);
- return total;
+ mTotalMatrix = mRootMatrix;
+ for (size_t i = 0; i < mRecordingStateStack.size(); i++)
+ mTotalMatrix.preConcat(mRecordingStateStack[i].mMatrix);
+ return mTotalMatrix;
}
return mRootMatrix;
}
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
index 215aa84..38eb58f 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
@@ -149,6 +149,8 @@ private:
SkPicture* mPicture;
SkMatrix mRootMatrix;
SkMatrix* mCurrentMatrix;
+ // Used for getTotalMatrix, is not valid elsewhere
+ SkMatrix mTotalMatrix;
Recording* mRecording;
class RecordingState {