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

Side by Side Diff: src/utils/SkTextureCompressor_Blitter.h

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « src/utils/SkTextureCompressor.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('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 #ifndef SkTextureCompressor_Blitter_DEFINED 8 #ifndef SkTextureCompressor_Blitter_DEFINED
9 #define SkTextureCompressor_Blitter_DEFINED 9 #define SkTextureCompressor_Blitter_DEFINED
10 10
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 return ptr + EncodedBlockSize*this->getBlockOffset(x, y); 433 return ptr + EncodedBlockSize*this->getBlockOffset(x, y);
434 } 434 }
435 435
436 // Updates the block whose columns are stored in block. curAlphai is expecte d 436 // Updates the block whose columns are stored in block. curAlphai is expecte d
437 // to store the alpha values that will be placed within each of the columns in 437 // to store the alpha values that will be placed within each of the columns in
438 // the range [col, col+colsLeft). 438 // the range [col, col+colsLeft).
439 typedef uint32_t Column[BlockDim/4]; 439 typedef uint32_t Column[BlockDim/4];
440 typedef uint32_t Block[BlockDim][BlockDim/4]; 440 typedef uint32_t Block[BlockDim][BlockDim/4];
441 inline void updateBlockColumns(Block block, const int col, 441 inline void updateBlockColumns(Block block, const int col,
442 const int colsLeft, const Column curAlphai) { 442 const int colsLeft, const Column curAlphai) {
443 SkASSERT(NULL != block); 443 SkASSERT(block);
444 SkASSERT(col + colsLeft <= BlockDim); 444 SkASSERT(col + colsLeft <= BlockDim);
445 445
446 for (int i = col; i < (col + colsLeft); ++i) { 446 for (int i = col; i < (col + colsLeft); ++i) {
447 memcpy(block[i], curAlphai, sizeof(Column)); 447 memcpy(block[i], curAlphai, sizeof(Column));
448 } 448 }
449 } 449 }
450 450
451 // The following function writes the buffered runs to compressed blocks. 451 // The following function writes the buffered runs to compressed blocks.
452 // If fNextRun < BlockDim, then we fill the runs that we haven't buffered wi th 452 // If fNextRun < BlockDim, then we fill the runs that we haven't buffered wi th
453 // the constant zero buffer. 453 // the constant zero buffer.
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 mask, BlockDim, mask); 723 mask, BlockDim, mask);
724 } 724 }
725 } 725 }
726 #endif // PEDANTIC_BLIT_RECT 726 #endif // PEDANTIC_BLIT_RECT
727 727
728 }; 728 };
729 729
730 } // namespace SkTextureCompressor 730 } // namespace SkTextureCompressor
731 731
732 #endif // SkTextureCompressor_Blitter_DEFINED 732 #endif // SkTextureCompressor_Blitter_DEFINED
OLDNEW
« no previous file with comments | « src/utils/SkTextureCompressor.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698