diff options
author | John Reck <jreck@google.com> | 2012-07-13 18:09:44 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-07-13 18:09:44 -0700 |
commit | 630cf06c71a03000a805515d0fc36ea1f0c01e89 (patch) | |
tree | ed1b7605e37b803e9558343001f504ac7adc7c16 /Source/WebCore/platform/graphics/android | |
parent | be759e8b1203e29304d03ea0a8c9c3fc3b68bcb3 (diff) | |
download | external_webkit-630cf06c71a03000a805515d0fc36ea1f0c01e89.zip external_webkit-630cf06c71a03000a805515d0fc36ea1f0c01e89.tar.gz external_webkit-630cf06c71a03000a805515d0fc36ea1f0c01e89.tar.bz2 |
Fix getTotalMatrix()
Change-Id: I13145c96ae5911c5ebe6b2006c53f1a05ffddc1e
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r-- | Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp | 8 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h | 2 |
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 { |