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

Side by Side Diff: src/core/SkSpriteBlitter4f.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/core/SkRecordOpts.cpp ('k') | src/core/SkSpriteBlitter_ARGB32.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 2016 Google Inc. 2 * Copyright 2016 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 "SkSpriteBlitter.h" 8 #include "SkSpriteBlitter.h"
9 #include "SkSpanProcs.h" 9 #include "SkSpanProcs.h"
10 #include "SkTemplates.h" 10 #include "SkTemplates.h"
11 #include "SkXfermode.h" 11 #include "SkXfermode.h"
12 12
13 class Sprite_4f : public SkSpriteBlitter { 13 class Sprite_4f : public SkSpriteBlitter {
14 public: 14 public:
15 Sprite_4f(const SkPixmap& src, const SkPaint& paint) : INHERITED(src) { 15 Sprite_4f(const SkPixmap& src, const SkPaint& paint) : INHERITED(src) {
16 fXfer = paint.getXfermode(); 16 fXfer = SkXfermode::Peek(paint.getBlendMode());
17 fLoader = SkLoadSpanProc_Choose(src.info()); 17 fLoader = SkLoadSpanProc_Choose(src.info());
18 fFilter = SkFilterSpanProc_Choose(paint); 18 fFilter = SkFilterSpanProc_Choose(paint);
19 fBuffer.reset(src.width()); 19 fBuffer.reset(src.width());
20 } 20 }
21 21
22 protected: 22 protected:
23 SkXfermode* fXfer; 23 SkXfermode* fXfer;
24 SkLoadSpanProc fLoader; 24 SkLoadSpanProc fLoader;
25 SkFilterSpanProc fFilter; 25 SkFilterSpanProc fFilter;
26 SkAutoTMalloc<SkPM4f> fBuffer; 26 SkAutoTMalloc<SkPM4f> fBuffer;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 switch (source.colorType()) { 122 switch (source.colorType()) {
123 case kN32_SkColorType: 123 case kN32_SkColorType:
124 case kRGBA_F16_SkColorType: 124 case kRGBA_F16_SkColorType:
125 return allocator->createT<Sprite_sRGB>(source, paint); 125 return allocator->createT<Sprite_sRGB>(source, paint);
126 default: 126 default:
127 return nullptr; 127 return nullptr;
128 } 128 }
129 } 129 }
OLDNEW
« no previous file with comments | « src/core/SkRecordOpts.cpp ('k') | src/core/SkSpriteBlitter_ARGB32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698