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

Side by Side Diff: src/codec/SkSwizzler.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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/codec/SkScanlineDecoder.cpp ('k') | src/codec/SkWebpCodec.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 2015 Google Inc. 2 * Copyright 2015 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 "SkCodecPriv.h" 8 #include "SkCodecPriv.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkScaledCodec.h" 10 #include "SkScaledCodec.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 if (NULL == proc) { 682 if (NULL == proc) {
683 return NULL; 683 return NULL;
684 } 684 }
685 685
686 // Store deltaSrc in bytes if it is an even multiple, otherwise use bits 686 // Store deltaSrc in bytes if it is an even multiple, otherwise use bits
687 int deltaSrc = SkIsAlign8(BitsPerPixel(sc)) ? BytesPerPixel(sc) : BitsPerPix el(sc); 687 int deltaSrc = SkIsAlign8(BitsPerPixel(sc)) ? BytesPerPixel(sc) : BitsPerPix el(sc);
688 688
689 // get sampleX based on srcInfo and dstInfo dimensions 689 // get sampleX based on srcInfo and dstInfo dimensions
690 int sampleX; 690 int sampleX;
691 SkScaledCodec::ComputeSampleSize(dstInfo, srcInfo, &sampleX, NULL); 691 SkScaledCodec::ComputeSampleSize(dstInfo, srcInfo, &sampleX, NULL);
692 692
693 return SkNEW_ARGS(SkSwizzler, (proc, ctable, deltaSrc, dstInfo, sampleX)); 693 return new SkSwizzler(proc, ctable, deltaSrc, dstInfo, sampleX);
694 } 694 }
695 695
696 SkSwizzler::SkSwizzler(RowProc proc, const SkPMColor* ctable, 696 SkSwizzler::SkSwizzler(RowProc proc, const SkPMColor* ctable,
697 int deltaSrc, const SkImageInfo& info, int sampleX) 697 int deltaSrc, const SkImageInfo& info, int sampleX)
698 : fRowProc(proc) 698 : fRowProc(proc)
699 , fColorTable(ctable) 699 , fColorTable(ctable)
700 , fDeltaSrc(deltaSrc) 700 , fDeltaSrc(deltaSrc)
701 , fDstInfo(info) 701 , fDstInfo(info)
702 , fSampleX(sampleX) 702 , fSampleX(sampleX)
703 , fX0(sampleX == 1 ? 0 : sampleX >> 1) 703 , fX0(sampleX == 1 ? 0 : sampleX >> 1)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 // bits of SK_ColorBLACK are identical to the 565 representation 770 // bits of SK_ColorBLACK are identical to the 565 representation
771 // for black. 771 // for black.
772 memset(dstStartRow, (uint16_t) colorOrIndex, bytesToFill); 772 memset(dstStartRow, (uint16_t) colorOrIndex, bytesToFill);
773 break; 773 break;
774 default: 774 default:
775 SkCodecPrintf("Error: Unsupported dst color type for fill(). Doing nothing.\n"); 775 SkCodecPrintf("Error: Unsupported dst color type for fill(). Doing nothing.\n");
776 SkASSERT(false); 776 SkASSERT(false);
777 break; 777 break;
778 } 778 }
779 } 779 }
OLDNEW
« no previous file with comments | « src/codec/SkScanlineDecoder.cpp ('k') | src/codec/SkWebpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698