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

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

Issue 2045293002: Add support for multiple frames in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix a test - we now draw transparent background for missing color table Created 4 years, 1 month 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/SkStreamBuffer.cpp ('k') | tests/CodecAnimTest.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 #ifndef SkSwizzler_DEFINED 8 #ifndef SkSwizzler_DEFINED
9 #define SkSwizzler_DEFINED 9 #define SkSwizzler_DEFINED
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 * this allows us to apply a transparency mask to pixels after swizzling. 71 * this allows us to apply a transparency mask to pixels after swizzling.
72 */ 72 */
73 int sampleX() const { return fSampleX; } 73 int sampleX() const { return fSampleX; }
74 74
75 /** 75 /**
76 * Returns the actual number of pixels written to destination memory, takin g 76 * Returns the actual number of pixels written to destination memory, takin g
77 * scaling, subsetting, and partial frames into account. 77 * scaling, subsetting, and partial frames into account.
78 */ 78 */
79 int swizzleWidth() const { return fSwizzleWidth; } 79 int swizzleWidth() const { return fSwizzleWidth; }
80 80
81 /**
82 * Returns the byte offset at which we write to destination memory, taking
83 * scaling, subsetting, and partial frames into account.
84 */
85 size_t swizzleOffsetBytes() const { return fDstOffsetBytes; }
86
81 private: 87 private:
82 88
83 /** 89 /**
84 * Method for converting raw data to Skia pixels. 90 * Method for converting raw data to Skia pixels.
85 * @param dstRow Row in which to write the resulting pixels. 91 * @param dstRow Row in which to write the resulting pixels.
86 * @param src Row of src data, in format specified by SrcConfig 92 * @param src Row of src data, in format specified by SrcConfig
87 * @param dstWidth Width in pixels of the destination 93 * @param dstWidth Width in pixels of the destination
88 * @param bpp if bitsPerPixel % 8 == 0, deltaSrc is bytesPerPixel 94 * @param bpp if bitsPerPixel % 8 == 0, deltaSrc is bytesPerPixel
89 * else, deltaSrc is bitsPerPixel 95 * else, deltaSrc is bitsPerPixel
90 * @param deltaSrc bpp * sampleX 96 * @param deltaSrc bpp * sampleX
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // fBPP is bitsPerPixel 207 // fBPP is bitsPerPixel
202 const int fDstBPP; // Bytes per pixel for the destination color type 208 const int fDstBPP; // Bytes per pixel for the destination color type
203 209
204 SkSwizzler(RowProc fastProc, RowProc proc, const SkPMColor* ctable, int srcO ffset, 210 SkSwizzler(RowProc fastProc, RowProc proc, const SkPMColor* ctable, int srcO ffset,
205 int srcWidth, int dstOffset, int dstWidth, int srcBPP, int dstBPP); 211 int srcWidth, int dstOffset, int dstWidth, int srcBPP, int dstBPP);
206 212
207 int onSetSampleX(int) override; 213 int onSetSampleX(int) override;
208 214
209 }; 215 };
210 #endif // SkSwizzler_DEFINED 216 #endif // SkSwizzler_DEFINED
OLDNEW
« no previous file with comments | « src/codec/SkStreamBuffer.cpp ('k') | tests/CodecAnimTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698