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

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

Issue 1388113002: Bye bye processor data manager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove files Created 5 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/SkBitmapProcShader.cpp ('k') | src/core/SkColorShader.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #ifndef SK_IGNORE_TO_STRING 62 #ifndef SK_IGNORE_TO_STRING
63 void toString(SkString* str) const override { 63 void toString(SkString* str) const override {
64 SkString outerS, innerS; 64 SkString outerS, innerS;
65 fOuter->toString(&outerS); 65 fOuter->toString(&outerS);
66 fInner->toString(&innerS); 66 fInner->toString(&innerS);
67 str->appendf("SkComposeColorFilter: outer(%s) inner(%s)", outerS.c_str() , innerS.c_str()); 67 str->appendf("SkComposeColorFilter: outer(%s) inner(%s)", outerS.c_str() , innerS.c_str());
68 } 68 }
69 #endif 69 #endif
70 70
71 #if SK_SUPPORT_GPU 71 #if SK_SUPPORT_GPU
72 const GrFragmentProcessor* asFragmentProcessor(GrContext* context, 72 const GrFragmentProcessor* asFragmentProcessor(GrContext* context) const ove rride {
73 GrProcessorDataManager* pdm) const override { 73 SkAutoTUnref<const GrFragmentProcessor> innerFP(fInner->asFragmentProces sor(context));
74 SkAutoTUnref<const GrFragmentProcessor> innerFP(fInner->asFragmentProces sor(context, pdm)); 74 SkAutoTUnref<const GrFragmentProcessor> outerFP(fOuter->asFragmentProces sor(context));
75 SkAutoTUnref<const GrFragmentProcessor> outerFP(fOuter->asFragmentProces sor(context, pdm));
76 if (!innerFP || !outerFP) { 75 if (!innerFP || !outerFP) {
77 return nullptr; 76 return nullptr;
78 } 77 }
79 const GrFragmentProcessor* series[] = { innerFP, outerFP }; 78 const GrFragmentProcessor* series[] = { innerFP, outerFP };
80 return GrFragmentProcessor::RunInSeries(series, 2); 79 return GrFragmentProcessor::RunInSeries(series, 2);
81 } 80 }
82 #endif 81 #endif
83 82
84 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeColorFilter) 83 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeColorFilter)
85 84
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (count > SK_MAX_COMPOSE_COLORFILTER_COUNT) { 137 if (count > SK_MAX_COMPOSE_COLORFILTER_COUNT) {
139 return nullptr; 138 return nullptr;
140 } 139 }
141 return new SkComposeColorFilter(outer, inner, count); 140 return new SkComposeColorFilter(outer, inner, count);
142 } 141 }
143 142
144 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) 143 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter)
145 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeColorFilter) 144 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeColorFilter)
146 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 145 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
147 146
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkColorShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698