OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkEmbossMaskFilter.h" | 10 #include "SkEmbossMaskFilter.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 void SkEmbossMaskFilter::flatten(SkWriteBuffer& buffer) const { | 134 void SkEmbossMaskFilter::flatten(SkWriteBuffer& buffer) const { |
135 this->INHERITED::flatten(buffer); | 135 this->INHERITED::flatten(buffer); |
136 | 136 |
137 Light tmpLight = fLight; | 137 Light tmpLight = fLight; |
138 tmpLight.fPad = 0; // for the font-cache lookup to be clean | 138 tmpLight.fPad = 0; // for the font-cache lookup to be clean |
139 buffer.writeByteArray(&tmpLight, sizeof(tmpLight)); | 139 buffer.writeByteArray(&tmpLight, sizeof(tmpLight)); |
140 buffer.writeScalar(fBlurSigma); | 140 buffer.writeScalar(fBlurSigma); |
141 } | 141 } |
142 | 142 |
143 #ifdef SK_DEVELOPER | 143 #ifndef SK_IGNORE_TO_STRING |
144 void SkEmbossMaskFilter::toString(SkString* str) const { | 144 void SkEmbossMaskFilter::toString(SkString* str) const { |
145 str->append("SkEmbossMaskFilter: ("); | 145 str->append("SkEmbossMaskFilter: ("); |
146 | 146 |
147 str->append("direction: ("); | 147 str->append("direction: ("); |
148 str->appendScalar(fLight.fDirection[0]); | 148 str->appendScalar(fLight.fDirection[0]); |
149 str->append(", "); | 149 str->append(", "); |
150 str->appendScalar(fLight.fDirection[1]); | 150 str->appendScalar(fLight.fDirection[1]); |
151 str->append(", "); | 151 str->append(", "); |
152 str->appendScalar(fLight.fDirection[2]); | 152 str->appendScalar(fLight.fDirection[2]); |
153 str->append(") "); | 153 str->append(") "); |
154 | 154 |
155 str->appendf("ambient: %d specular: %d ", | 155 str->appendf("ambient: %d specular: %d ", |
156 fLight.fAmbient, fLight.fSpecular); | 156 fLight.fAmbient, fLight.fSpecular); |
157 | 157 |
158 str->append("blurSigma: "); | 158 str->append("blurSigma: "); |
159 str->appendScalar(fBlurSigma); | 159 str->appendScalar(fBlurSigma); |
160 str->append(")"); | 160 str->append(")"); |
161 } | 161 } |
162 #endif | 162 #endif |
OLD | NEW |