Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: src/core/SkMatrixClipStateMgr.cpp

Issue 130913018: Templetized SkWriter32 readTAt() & overwriteTAt() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebased Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkWriter32.h ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/core/SkWriter32.h ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698