| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkMatrixClipStateMgr.h" | 8 #include "SkMatrixClipStateMgr.h" |
| 9 #include "SkPictureRecord.h" | 9 #include "SkPictureRecord.h" |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void SkMatrixClipStateMgr::MatrixClipState::ClipInfo::fillInSkips(SkWriter32* wr
iter, | 99 void SkMatrixClipStateMgr::MatrixClipState::ClipInfo::fillInSkips(SkWriter32* wr
iter, |
| 100 int32_t restor
eOffset) { | 100 int32_t restor
eOffset) { |
| 101 for (int i = 0; i < fClips.count(); ++i) { | 101 for (int i = 0; i < fClips.count(); ++i) { |
| 102 ClipOp& curClip = fClips[i]; | 102 ClipOp& curClip = fClips[i]; |
| 103 | 103 |
| 104 if (-1 == curClip.fOffset) { | 104 if (-1 == curClip.fOffset) { |
| 105 continue; | 105 continue; |
| 106 } | 106 } |
| 107 // SkDEBUGCODE(uint32_t peek = writer->read32At(curClip.fOffset);) | 107 // SkDEBUGCODE(uint32_t peek = writer->read32At(curClip.fOffset);) |
| 108 // SkASSERT(-1 == peek); | 108 // SkASSERT(-1 == peek); |
| 109 writer->write32At(curClip.fOffset, restoreOffset); | 109 writer->overwriteTAt(curClip.fOffset, restoreOffset); |
| 110 SkDEBUGCODE(curClip.fOffset = -1;) | 110 SkDEBUGCODE(curClip.fOffset = -1;) |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 SkMatrixClipStateMgr::SkMatrixClipStateMgr() | 114 SkMatrixClipStateMgr::SkMatrixClipStateMgr() |
| 115 : fPicRecord(NULL) | 115 : fPicRecord(NULL) |
| 116 , fMatrixClipStack(sizeof(MatrixClipState), | 116 , fMatrixClipStack(sizeof(MatrixClipState), |
| 117 fMatrixClipStackStorage, | 117 fMatrixClipStackStorage, |
| 118 sizeof(fMatrixClipStackStorage)) | 118 sizeof(fMatrixClipStackStorage)) |
| 119 , fCurOpenStateID(kIdentityWideOpenStateID) { | 119 , fCurOpenStateID(kIdentityWideOpenStateID) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 SkDeque::F2BIter iter(fMatrixClipStack); | 250 SkDeque::F2BIter iter(fMatrixClipStack); |
| 251 | 251 |
| 252 for (const MatrixClipState* state = (const MatrixClipState*) iter.next()
; | 252 for (const MatrixClipState* state = (const MatrixClipState*) iter.next()
; |
| 253 state != NULL; | 253 state != NULL; |
| 254 state = (const MatrixClipState*) iter.next()) { | 254 state = (const MatrixClipState*) iter.next()) { |
| 255 state->fClipInfo->checkOffsetNotEqual(-1); | 255 state->fClipInfo->checkOffsetNotEqual(-1); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 #endif | 259 #endif |
| OLD | NEW |