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

Side by Side Diff: src/images/SkScaledBitmapSampler.cpp

Issue 1306443004: Use static_assert instead of SK_COMPILE_ASSERT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « src/gpu/gl/GrGLPath.cpp ('k') | src/pdf/SkPDFDevice.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 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 8
9 #include "SkScaledBitmapSampler.h" 9 #include "SkScaledBitmapSampler.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 get_gray_to_A8_proc, 654 get_gray_to_A8_proc,
655 NULL, // rgbx to a8 655 NULL, // rgbx to a8
656 NULL, // rgba to a8 656 NULL, // rgba to a8
657 NULL, // index to a8 657 NULL, // index to a8
658 NULL, // 565 to a8 658 NULL, // 565 to a8
659 }; 659 };
660 660
661 // The jump between dst configs in the table 661 // The jump between dst configs in the table
662 static const int gProcDstConfigSpan = 5; 662 static const int gProcDstConfigSpan = 5;
663 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(gProcChoosers) == 5 * gProcDstConfigSpan, 663 static_assert(SK_ARRAY_COUNT(gProcChoosers) == 5 * gProcDstConfigSpan,
664 gProcs_has_the_wrong_number_of_entries); 664 "gProcs_has_the_wrong_number_of_entries");
665 665
666 fCTable = ctable; 666 fCTable = ctable;
667 667
668 int index = 0; 668 int index = 0;
669 switch (sc) { 669 switch (sc) {
670 case SkScaledBitmapSampler::kGray: 670 case SkScaledBitmapSampler::kGray:
671 fSrcPixelSize = 1; 671 fSrcPixelSize = 1;
672 index += 0; 672 index += 0;
673 break; 673 break;
674 case SkScaledBitmapSampler::kRGB: 674 case SkScaledBitmapSampler::kRGB:
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo wProc(sampler); 868 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo wProc(sampler);
869 SkASSERT(expected == actual); 869 SkASSERT(expected == actual);
870 procCounter++; 870 procCounter++;
871 } 871 }
872 } 872 }
873 } 873 }
874 } 874 }
875 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); 875 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter);
876 } 876 }
877 #endif // SK_DEBUG 877 #endif // SK_DEBUG
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPath.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698