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

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

Issue 197763008: Allow toString capability to be toggled independent of developer mode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove gyp changes Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkKernel33MaskFilter.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 /* 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
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
OLDNEW
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkKernel33MaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698