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

Side by Side Diff: src/effects/SkLumaColorFilter.cpp

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.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 2013 Google Inc. 2 * Copyright 2013 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 "SkLumaColorFilter.h" 8 #include "SkLumaColorFilter.h"
9 9
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 26 matching lines...) Expand all
37 dst[i] = SkPackARGB32(luma, 0, 0, 0); 37 dst[i] = SkPackARGB32(luma, 0, 0, 0);
38 } 38 }
39 } 39 }
40 40
41 SkColorFilter* SkLumaColorFilter::Create() { 41 SkColorFilter* SkLumaColorFilter::Create() {
42 return SkNEW(SkLumaColorFilter); 42 return SkNEW(SkLumaColorFilter);
43 } 43 }
44 44
45 SkLumaColorFilter::SkLumaColorFilter() : INHERITED() {} 45 SkLumaColorFilter::SkLumaColorFilter() : INHERITED() {}
46 46
47 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
48 SkLumaColorFilter::SkLumaColorFilter(SkReadBuffer& buffer) : INHERITED(buffer) { }
49 #endif
50
47 SkFlattenable* SkLumaColorFilter::CreateProc(SkReadBuffer&) { 51 SkFlattenable* SkLumaColorFilter::CreateProc(SkReadBuffer&) {
48 return SkNEW(SkLumaColorFilter); 52 return SkNEW(SkLumaColorFilter);
49 } 53 }
50 54
51 void SkLumaColorFilter::flatten(SkWriteBuffer&) const {} 55 void SkLumaColorFilter::flatten(SkWriteBuffer&) const {}
52 56
53 #ifndef SK_IGNORE_TO_STRING 57 #ifndef SK_IGNORE_TO_STRING
54 void SkLumaColorFilter::toString(SkString* str) const { 58 void SkLumaColorFilter::toString(SkString* str) const {
55 str->append("SkLumaColorFilter "); 59 str->append("SkLumaColorFilter ");
56 } 60 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // The output is always black. The alpha value for the color passed in i s arbitrary. 115 // The output is always black. The alpha value for the color passed in i s arbitrary.
112 inout->setToOther(kRGB_GrColorComponentFlags, GrColorPackRGBA(0, 0, 0, 0 ), 116 inout->setToOther(kRGB_GrColorComponentFlags, GrColorPackRGBA(0, 0, 0, 0 ),
113 GrInvariantOutput::kWill_ReadInput); 117 GrInvariantOutput::kWill_ReadInput);
114 } 118 }
115 }; 119 };
116 120
117 GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const { 121 GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const {
118 return LumaColorFilterEffect::Create(); 122 return LumaColorFilterEffect::Create();
119 } 123 }
120 #endif 124 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698