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

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

Issue 769953002: 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
78 SkFlattenable* SkBlurDrawLooper::CreateProc(SkReadBuffer& buffer) { 65 SkFlattenable* SkBlurDrawLooper::CreateProc(SkReadBuffer& buffer) {
79 const SkColor color = buffer.readColor(); 66 const SkColor color = buffer.readColor();
80 const SkScalar sigma = buffer.readScalar(); 67 const SkScalar sigma = buffer.readScalar();
81 const SkScalar dx = buffer.readScalar(); 68 const SkScalar dx = buffer.readScalar();
82 const SkScalar dy = buffer.readScalar(); 69 const SkScalar dy = buffer.readScalar();
83 const uint32_t flags = buffer.read32(); 70 const uint32_t flags = buffer.read32();
84 return Create(color, sigma, dx, dy, flags); 71 return Create(color, sigma, dx, dy, flags);
85 } 72 }
86 73
87 void SkBlurDrawLooper::flatten(SkWriteBuffer& buffer) const { 74 void SkBlurDrawLooper::flatten(SkWriteBuffer& buffer) const {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 &needsSeparator); 175 &needsSeparator);
189 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi ghQuality", 176 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi ghQuality",
190 &needsSeparator); 177 &needsSeparator);
191 } 178 }
192 str->append(")"); 179 str->append(")");
193 180
194 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr ing is added 181 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr ing is added
195 // alternatively we could cache the radius in SkBlurDrawLooper and just add it here 182 // alternatively we could cache the radius in SkBlurDrawLooper and just add it here
196 } 183 }
197 #endif 184 #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