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

Side by Side Diff: src/effects/gradients/SkSweepGradient.cpp

Issue 372053003: Revert of Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: Created 6 years, 5 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
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 #include "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 *grEffect = GrSweepGradient::Create(context, *this, matrix); 303 *grEffect = GrSweepGradient::Create(context, *this, matrix);
304 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); 304 *grColor = SkColor2GrColorJustAlpha(paint.getColor());
305 305
306 return true; 306 return true;
307 } 307 }
308 308
309 #else 309 #else
310 310
311 bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint, 311 bool SkSweepGradient::asNewEffect(GrContext* context, const SkPaint& paint,
312 const SkMatrix* localMatrix, GrColor* grColor, 312 const SkMatrix* localMatrix, GrColor* grColor,
313 GrEffect** grEffect) const { 313 GrEffectRef** grEffect) const {
314 SkDEBUGFAIL("Should not call in GPU-less build"); 314 SkDEBUGFAIL("Should not call in GPU-less build");
315 return false; 315 return false;
316 } 316 }
317 317
318 #endif 318 #endif
319 319
320 #ifndef SK_IGNORE_TO_STRING 320 #ifndef SK_IGNORE_TO_STRING
321 void SkSweepGradient::toString(SkString* str) const { 321 void SkSweepGradient::toString(SkString* str) const {
322 str->append("SkSweepGradient: ("); 322 str->append("SkSweepGradient: (");
323 323
324 str->append("center: ("); 324 str->append("center: (");
325 str->appendScalar(fCenter.fX); 325 str->appendScalar(fCenter.fX);
326 str->append(", "); 326 str->append(", ");
327 str->appendScalar(fCenter.fY); 327 str->appendScalar(fCenter.fY);
328 str->append(") "); 328 str->append(") ");
329 329
330 this->INHERITED::toString(str); 330 this->INHERITED::toString(str);
331 331
332 str->append(")"); 332 str->append(")");
333 } 333 }
334 #endif 334 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkSweepGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698