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

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

Issue 449223002: Fix bug in blitAntiH (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 } 400 }
401 401
402 finalX = 0xFFFFF; 402 finalX = 0xFFFFF;
403 for (int i = 0; i < BlockDim; ++i) { 403 for (int i = 0; i < BlockDim; ++i) {
404 finalX = SkMin32(nextX[i], finalX); 404 finalX = SkMin32(nextX[i], finalX);
405 } 405 }
406 } 406 }
407 407
408 // If we didn't land on a block boundary, output the block... 408 // If we didn't land on a block boundary, output the block...
409 if ((curX % BlockDim) > 1) { 409 if ((curX % BlockDim) > 0) {
410 #ifdef SK_DEBUG
411 for (int i = 0; i < BlockDim; ++i) {
412 SkASSERT(nextX[i] == kLongestRun || nextX[i] == curX);
413 }
414 #endif
415 const int col = curX % BlockDim;
416 const int colsLeft = BlockDim - col;
417
418 memset(curAlphaColumn, 0, sizeof(curAlphaColumn));
419 this->updateBlockColumns(block, col, colsLeft, curAlphaColumn);
420
410 CompressorType::CompressA8Vertical(outPtr, reinterpret_cast<uint8_t* >(block)); 421 CompressorType::CompressA8Vertical(outPtr, reinterpret_cast<uint8_t* >(block));
411 } 422 }
412 423
413 fNextRun = 0; 424 fNextRun = 0;
414 } 425 }
415 }; 426 };
416 427
417 } // namespace SkTextureCompressor 428 } // namespace SkTextureCompressor
418 429
419 #endif // SkTextureCompressor_Blitter_DEFINED 430 #endif // SkTextureCompressor_Blitter_DEFINED
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698