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

Side by Side Diff: src/effects/SkBlurDrawLooper.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/SkBitmapSource.cpp ('k') | src/effects/SkBlurImageFilter.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBlurDrawLooper.h" 8 #include "SkBlurDrawLooper.h"
9 #include "SkBlurMask.h" // just for SkBlurMask::ConvertRadiusToSigma 9 #include "SkBlurMask.h" // just for SkBlurMask::ConvertRadiusToSigma
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 SkColor color, uint32_t flags) { 55 SkColor color, uint32_t flags) {
56 fSigma = sigma; 56 fSigma = sigma;
57 fDx = dx; 57 fDx = dx;
58 fDy = dy; 58 fDy = dy;
59 fBlurColor = color; 59 fBlurColor = color;
60 fBlurFlags = flags; 60 fBlurFlags = flags;
61 61
62 this->initEffects(); 62 this->initEffects();
63 } 63 }
64 64
65 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
66 SkBlurDrawLooper::SkBlurDrawLooper(SkReadBuffer& buffer) : INHERITED(buffer) {
67
68 fSigma = buffer.readScalar();
69 fDx = buffer.readScalar();
70 fDy = buffer.readScalar();
71 fBlurColor = buffer.readColor();
72 fBlurFlags = buffer.readUInt() & kAll_BlurFlag;
73
74 this->initEffects();
75 }
76 #endif
77
65 SkFlattenable* SkBlurDrawLooper::CreateProc(SkReadBuffer& buffer) { 78 SkFlattenable* SkBlurDrawLooper::CreateProc(SkReadBuffer& buffer) {
66 const SkColor color = buffer.readColor(); 79 const SkColor color = buffer.readColor();
67 const SkScalar sigma = buffer.readScalar(); 80 const SkScalar sigma = buffer.readScalar();
68 const SkScalar dx = buffer.readScalar(); 81 const SkScalar dx = buffer.readScalar();
69 const SkScalar dy = buffer.readScalar(); 82 const SkScalar dy = buffer.readScalar();
70 const uint32_t flags = buffer.read32(); 83 const uint32_t flags = buffer.read32();
71 return Create(color, sigma, dx, dy, flags); 84 return Create(color, sigma, dx, dy, flags);
72 } 85 }
73 86
74 void SkBlurDrawLooper::flatten(SkWriteBuffer& buffer) const { 87 void SkBlurDrawLooper::flatten(SkWriteBuffer& buffer) const {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 &needsSeparator); 188 &needsSeparator);
176 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi ghQuality", 189 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi ghQuality",
177 &needsSeparator); 190 &needsSeparator);
178 } 191 }
179 str->append(")"); 192 str->append(")");
180 193
181 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr ing is added 194 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr ing is added
182 // alternatively we could cache the radius in SkBlurDrawLooper and just add it here 195 // alternatively we could cache the radius in SkBlurDrawLooper and just add it here
183 } 196 }
184 #endif 197 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBitmapSource.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698