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

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

Issue 2178523002: Revert of Add SkRasterPipeline blitter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/SkBlitter.cpp ('k') | src/core/SkCoreBlitters.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkColorFilter.h" 8 #include "SkColorFilter.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkRefCnt.h" 10 #include "SkRefCnt.h"
(...skipping 19 matching lines...) Expand all
30 bool SkColorFilter::asComponentTable(SkBitmap*) const { 30 bool SkColorFilter::asComponentTable(SkBitmap*) const {
31 return false; 31 return false;
32 } 32 }
33 33
34 #if SK_SUPPORT_GPU 34 #if SK_SUPPORT_GPU
35 sk_sp<GrFragmentProcessor> SkColorFilter::asFragmentProcessor(GrContext*) const { 35 sk_sp<GrFragmentProcessor> SkColorFilter::asFragmentProcessor(GrContext*) const {
36 return nullptr; 36 return nullptr;
37 } 37 }
38 #endif 38 #endif
39 39
40 bool SkColorFilter::appendStages(SkRasterPipeline* pipeline) const {
41 return this->onAppendStages(pipeline);
42 }
43
44 bool SkColorFilter::onAppendStages(SkRasterPipeline*) const {
45 return false;
46 }
47
48 void SkColorFilter::filterSpan4f(const SkPM4f src[], int count, SkPM4f result[]) const { 40 void SkColorFilter::filterSpan4f(const SkPM4f src[], int count, SkPM4f result[]) const {
49 const int N = 128; 41 const int N = 128;
50 SkPMColor tmp[N]; 42 SkPMColor tmp[N];
51 while (count > 0) { 43 while (count > 0) {
52 int n = SkTMin(count, N); 44 int n = SkTMin(count, N);
53 for (int i = 0; i < n; ++i) { 45 for (int i = 0; i < n; ++i) {
54 tmp[i] = src[i].toPMColor(); 46 tmp[i] = src[i].toPMColor();
55 } 47 }
56 this->filterSpan(tmp, n, tmp); 48 this->filterSpan(tmp, n, tmp);
57 for (int i = 0; i < n; ++i) { 49 for (int i = 0; i < n; ++i) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 178 }
187 return sk_sp<SkColorFilter>(new SkComposeColorFilter(std::move(outer), std:: move(inner),count)); 179 return sk_sp<SkColorFilter>(new SkComposeColorFilter(std::move(outer), std:: move(inner),count));
188 } 180 }
189 181
190 #include "SkModeColorFilter.h" 182 #include "SkModeColorFilter.h"
191 183
192 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) 184 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter)
193 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeColorFilter) 185 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeColorFilter)
194 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) 186 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter)
195 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 187 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698