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

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

Issue 2385353002: add cast for tostring (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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 The Android Open Source Project 2 * Copyright 2013 The Android Open Source Project
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 "SkXfermodeImageFilter.h" 8 #include "SkXfermodeImageFilter.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 SkAutoCanvasRestore acr(canvas, true); 182 SkAutoCanvasRestore acr(canvas, true);
183 canvas->clipRect(SkRect::Make(fgBounds), SkCanvas::kDifference_Op); 183 canvas->clipRect(SkRect::Make(fgBounds), SkCanvas::kDifference_Op);
184 paint.setColor(0); 184 paint.setColor(0);
185 canvas->drawPaint(paint); 185 canvas->drawPaint(paint);
186 } 186 }
187 187
188 #ifndef SK_IGNORE_TO_STRING 188 #ifndef SK_IGNORE_TO_STRING
189 void SkXfermodeImageFilter_Base::toString(SkString* str) const { 189 void SkXfermodeImageFilter_Base::toString(SkString* str) const {
190 str->appendf("SkXfermodeImageFilter: ("); 190 str->appendf("SkXfermodeImageFilter: (");
191 str->appendf("blendmode: (%d)", fMode); 191 str->appendf("blendmode: (%d)", (int)fMode);
192 if (this->getInput(0)) { 192 if (this->getInput(0)) {
193 str->appendf("foreground: ("); 193 str->appendf("foreground: (");
194 this->getInput(0)->toString(str); 194 this->getInput(0)->toString(str);
195 str->appendf(")"); 195 str->appendf(")");
196 } 196 }
197 if (this->getInput(1)) { 197 if (this->getInput(1)) {
198 str->appendf("background: ("); 198 str->appendf("background: (");
199 this->getInput(1)->toString(str); 199 this->getInput(1)->toString(str);
200 str->appendf(")"); 200 str->appendf(")");
201 } 201 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 508
509 //////////////////////////////////////////////////////////////////////////////// /////////////////// 509 //////////////////////////////////////////////////////////////////////////////// ///////////////////
510 510
511 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermodeImageFilter) 511 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermodeImageFilter)
512 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter_Base) 512 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter_Base)
513 // manually register the legacy serialized name "SkXfermodeImageFilter" 513 // manually register the legacy serialized name "SkXfermodeImageFilter"
514 SkFlattenable::Register("SkXfermodeImageFilter", SkXfermodeImageFilter_Base: :CreateProc, 514 SkFlattenable::Register("SkXfermodeImageFilter", SkXfermodeImageFilter_Base: :CreateProc,
515 SkFlattenable::kSkImageFilter_Type); 515 SkFlattenable::kSkImageFilter_Type);
516 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticImageFilter) 516 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticImageFilter)
517 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 517 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698