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

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

Issue 2335203002: Implement Fill() for incomplete decodes to RGBA_F16 (Closed)
Patch Set: Fix win builds Created 4 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/SkGifCodec.cpp ('k') | src/codec/SkPngCodec.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 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 #ifndef SkMaskSwizzler_DEFINED 7 #ifndef SkMaskSwizzler_DEFINED
8 #define SkMaskSwizzler_DEFINED 8 #define SkMaskSwizzler_DEFINED
9 9
10 #include "SkMasks.h" 10 #include "SkMasks.h"
(...skipping 21 matching lines...) Expand all
32 const SkCodec::Options& options); 32 const SkCodec::Options& options);
33 33
34 /* 34 /*
35 * Swizzle a row 35 * Swizzle a row
36 */ 36 */
37 void swizzle(void* dst, const uint8_t* SK_RESTRICT src); 37 void swizzle(void* dst, const uint8_t* SK_RESTRICT src);
38 38
39 /** 39 /**
40 * Implement fill using a custom width. 40 * Implement fill using a custom width.
41 */ 41 */
42 void fill(const SkImageInfo& info, void* dst, size_t rowBytes, uint32_t colo rOrIndex, 42 void fill(const SkImageInfo& info, void* dst, size_t rowBytes, uint64_t colo rOrIndex,
43 SkCodec::ZeroInitialized zeroInit) override { 43 SkCodec::ZeroInitialized zeroInit) override {
44 const SkImageInfo fillInfo = info.makeWH(fDstWidth, info.height()); 44 const SkImageInfo fillInfo = info.makeWH(fDstWidth, info.height());
45 SkSampler::Fill(fillInfo, dst, rowBytes, colorOrIndex, zeroInit); 45 SkSampler::Fill(fillInfo, dst, rowBytes, colorOrIndex, zeroInit);
46 } 46 }
47 47
48 private: 48 private:
49 49
50 /* 50 /*
51 * Row procedure used for swizzle 51 * Row procedure used for swizzle
52 */ 52 */
53 typedef void (*RowProc)(void* dstRow, const uint8_t* srcRow, int width, 53 typedef void (*RowProc)(void* dstRow, const uint8_t* srcRow, int width,
54 SkMasks* masks, uint32_t startX, uint32_t sampleX); 54 SkMasks* masks, uint32_t startX, uint32_t sampleX);
55 55
56 SkMaskSwizzler(SkMasks* masks, RowProc proc, int subsetWidth, int srcOffset) ; 56 SkMaskSwizzler(SkMasks* masks, RowProc proc, int subsetWidth, int srcOffset) ;
57 57
58 int onSetSampleX(int) override; 58 int onSetSampleX(int) override;
59 59
60 SkMasks* fMasks; // unowned 60 SkMasks* fMasks; // unowned
61 const RowProc fRowProc; 61 const RowProc fRowProc;
62 62
63 // FIXME: Can this class share more with SkSwizzler? These variables are all the same. 63 // FIXME: Can this class share more with SkSwizzler? These variables are all the same.
64 const int fSubsetWidth; // Width of the subset of source before an y sampling. 64 const int fSubsetWidth; // Width of the subset of source before an y sampling.
65 int fDstWidth; // Width of dst, which may differ with sam pling. 65 int fDstWidth; // Width of dst, which may differ with sam pling.
66 int fSampleX; 66 int fSampleX;
67 int fSrcOffset; 67 int fSrcOffset;
68 int fX0; 68 int fX0;
69 }; 69 };
70 70
71 #endif 71 #endif
OLDNEW
« no previous file with comments | « src/codec/SkGifCodec.cpp ('k') | src/codec/SkPngCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698