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

Side by Side Diff: gm/SkLinearBitmapPipelineGM.cpp

Issue 1967283002: All source types working for linear pipeline. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use black const Created 4 years, 7 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 | « bench/SkLinearBitmapPipelineBench.cpp ('k') | src/core/SkBitmapProcShader.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 "gm.h" 8 #include "gm.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 uint32_t flags = 0; 116 uint32_t flags = 0;
117 //if (kSRGB_SkColorProfileType == profile) { 117 //if (kSRGB_SkColorProfileType == profile) {
118 //flags |= SkXfermode::kDstIsSRGB_PM4fFlag; 118 //flags |= SkXfermode::kDstIsSRGB_PM4fFlag;
119 //} 119 //}
120 auto procN = SkXfermode::GetD32Proc(nullptr, flags); 120 auto procN = SkXfermode::GetD32Proc(nullptr, flags);
121 121
122 SkLinearBitmapPipeline pipeline{ 122 SkLinearBitmapPipeline pipeline{
123 inv, filterQuality, 123 inv, filterQuality,
124 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, 1.0f, pmsrc} ; 124 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, SK_ColorBLAC K, pmsrc};
125 125
126 for (int y = 0; y < ir.height(); y++) { 126 for (int y = 0; y < ir.height(); y++) {
127 pipeline.shadeSpan4f(0, y, dstBits, ir.width()); 127 pipeline.shadeSpan4f(0, y, dstBits, ir.width());
128 procN(nullptr, pmdst.writable_addr32(0, y), dstBits, ir.width(), nullptr ); 128 procN(nullptr, pmdst.writable_addr32(0, y), dstBits, ir.width(), nullptr );
129 } 129 }
130 130
131 delete [] dstBits; 131 delete [] dstBits;
132 132
133 canvas->drawBitmap(bmdst, r.left(), r.top(), nullptr); 133 canvas->drawBitmap(bmdst, r.left(), r.top(), nullptr);
134 } 134 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 canvas->restore(); 197 canvas->restore();
198 canvas->translate(0, H + 20); 198 canvas->translate(0, H + 20);
199 } 199 }
200 canvas->restore(); 200 canvas->restore();
201 canvas->translate(0, (H + 20) * SK_ARRAY_COUNT(mats)); 201 canvas->translate(0, (H + 20) * SK_ARRAY_COUNT(mats));
202 if (useBilerp) break; 202 if (useBilerp) break;
203 useBilerp = true; 203 useBilerp = true;
204 } 204 }
205 } 205 }
OLDNEW
« no previous file with comments | « bench/SkLinearBitmapPipelineBench.cpp ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698