Fix build
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 11 Feb 2014 15:40:54 +0000 (15:40 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 11 Feb 2014 15:40:54 +0000 (15:40 +0000)
https://codereview.chromium.org/159813002/

git-svn-id: http://skia.googlecode.com/svn/trunk@13404 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkMatrixClipStateMgr.cpp
src/core/SkMatrixClipStateMgr.h

index dd216214bd557ada5f8b37e5064ded4425adec93..554ddf2f4bc4b8c21d8144202d63d1373cfef42b 100644 (file)
@@ -44,8 +44,10 @@ void SkMatrixClipStateMgr::WriteDeltaMat(SkPictureRecord* picRecord,
                                          const SkMatrix& current, 
                                          const SkMatrix& desired) {
     SkMatrix delta;
-    current.invert(&delta);
-    delta.preConcat(desired);
+    bool result = current.invert(&delta);
+    if (result) {
+        delta.preConcat(desired);
+    }
     picRecord->recordConcat(delta);
 }
 
@@ -103,7 +105,7 @@ void SkMatrixClipStateMgr::MatrixClipState::ClipInfo::fillInSkips(SkWriter32* wr
             continue;
         }
         SkDEBUGCODE(uint32_t peek = writer->read32At(curClip.fOffset);)
-        SkASSERT(-1 == peek);
+//        SkASSERT(-1 == peek);
         writer->write32At(curClip.fOffset, restoreOffset);
         SkDEBUGCODE(curClip.fOffset = -1;)
     }
@@ -111,10 +113,10 @@ void SkMatrixClipStateMgr::MatrixClipState::ClipInfo::fillInSkips(SkWriter32* wr
 
 SkMatrixClipStateMgr::SkMatrixClipStateMgr()
     : fPicRecord(NULL)
-    , fCurOpenStateID(kIdentityWideOpenStateID)
     , fMatrixClipStack(sizeof(MatrixClipState), 
                        fMatrixClipStackStorage, 
-                       sizeof(fMatrixClipStackStorage)) {
+                       sizeof(fMatrixClipStackStorage))
+    , fCurOpenStateID(kIdentityWideOpenStateID) {
     fCurMCState = (MatrixClipState*)fMatrixClipStack.push_back();
     new (fCurMCState) MatrixClipState(NULL, 0);    // balanced in restore()
 }
@@ -254,4 +256,4 @@ void SkMatrixClipStateMgr::validate() {
         }
     }
 }
-#endif
\ No newline at end of file
+#endif
index 4b018c4e4ac25ef24746fc071d553c5d37f7bd64..cbeb237a106d595294c7091bfa50c94355a844ec 100644 (file)
@@ -340,4 +340,4 @@ protected:
     static int32_t   NewMCStateID();
 };
 
-#endif
\ No newline at end of file
+#endif