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

Side by Side Diff: src/gpu/effects/GrTextureStripAtlas.cpp

Issue 12940011: Address clang static analyzer issues (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « no previous file | src/gpu/gl/GrGpuGL.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrTextureStripAtlas.h" 9 #include "GrTextureStripAtlas.h"
10 #include "SkPixelRef.h" 10 #include "SkPixelRef.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void GrTextureStripAtlas::initLRU() { 222 void GrTextureStripAtlas::initLRU() {
223 fLRUFront = NULL; 223 fLRUFront = NULL;
224 fLRUBack = NULL; 224 fLRUBack = NULL;
225 // Initially all the rows are in the LRU list 225 // Initially all the rows are in the LRU list
226 for (int i = 0; i < fNumRows; ++i) { 226 for (int i = 0; i < fNumRows; ++i) {
227 fRows[i].fKey = kEmptyAtlasRowKey; 227 fRows[i].fKey = kEmptyAtlasRowKey;
228 fRows[i].fNext = NULL; 228 fRows[i].fNext = NULL;
229 fRows[i].fPrev = NULL; 229 fRows[i].fPrev = NULL;
230 this->appendLRU(fRows + i); 230 this->appendLRU(fRows + i);
231 } 231 }
232 GrAssert(NULL == fLRUFront->fPrev && NULL == fLRUBack->fNext); 232 GrAssert(NULL == fLRUFront || NULL == fLRUFront->fPrev);
233 GrAssert(NULL == fLRUBack || NULL == fLRUBack->fNext);
233 } 234 }
234 235
235 void GrTextureStripAtlas::appendLRU(AtlasRow* row) { 236 void GrTextureStripAtlas::appendLRU(AtlasRow* row) {
236 GrAssert(NULL == row->fPrev && NULL == row->fNext); 237 GrAssert(NULL == row->fPrev && NULL == row->fNext);
237 if (NULL == fLRUFront && NULL == fLRUBack) { 238 if (NULL == fLRUFront && NULL == fLRUBack) {
238 fLRUFront = row; 239 fLRUFront = row;
239 fLRUBack = row; 240 fLRUBack = row;
240 } else { 241 } else {
241 row->fPrev = fLRUBack; 242 row->fPrev = fLRUBack;
242 fLRUBack->fNext = row; 243 fLRUBack->fNext = row;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 338
338 // If we have locked rows, we should have a locked texture, otherwise 339 // If we have locked rows, we should have a locked texture, otherwise
339 // it should be unlocked 340 // it should be unlocked
340 if (fLockedRows == 0) { 341 if (fLockedRows == 0) {
341 GrAssert(NULL == fTexture); 342 GrAssert(NULL == fTexture);
342 } else { 343 } else {
343 GrAssert(NULL != fTexture); 344 GrAssert(NULL != fTexture);
344 } 345 }
345 } 346 }
346 #endif 347 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698