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

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

Issue 1225673007: Initial CL to create dummy GrShaderDataManager and thread it through (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "SkTwoPointConicalGradient.h" 8 #include "SkTwoPointConicalGradient.h"
9 #include "SkTwoPointConicalGradient_gpu.h" 9 #include "SkTwoPointConicalGradient_gpu.h"
10 10
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 #if SK_SUPPORT_GPU 388 #if SK_SUPPORT_GPU
389 389
390 #include "SkGr.h" 390 #include "SkGr.h"
391 391
392 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context, 392 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext* context,
393 const SkPaint& paint, 393 const SkPaint& paint,
394 const SkMatrix& viewM, 394 const SkMatrix& viewM,
395 const SkMatrix* localMatrix, 395 const SkMatrix* localMatrix,
396 GrColor* paintColor, 396 GrColor* paintColor,
397 GrShaderDataManager*,
397 GrFragmentProcessor** fp) c onst { 398 GrFragmentProcessor** fp) c onst {
398 SkASSERT(context); 399 SkASSERT(context);
399 SkASSERT(fPtsToUnit.isIdentity()); 400 SkASSERT(fPtsToUnit.isIdentity());
400 401
401 *fp = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMat rix); 402 *fp = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMat rix);
402 *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); 403 *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
403 return true; 404 return true;
404 } 405 }
405 406
406 #else 407 #else
407 408
408 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&, 409 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&,
409 const SkMatrix&, const SkMat rix*, 410 const SkMatrix&, const SkMat rix*,
410 GrColor*, GrFragmentProcesso r**) const { 411 GrColor*, GrShaderDataManage r*,
412 GrFragmentProcessor**) cons t {
411 SkDEBUGFAIL("Should not call in GPU-less build"); 413 SkDEBUGFAIL("Should not call in GPU-less build");
412 return false; 414 return false;
413 } 415 }
414 416
415 #endif 417 #endif
416 418
417 #ifndef SK_IGNORE_TO_STRING 419 #ifndef SK_IGNORE_TO_STRING
418 void SkTwoPointConicalGradient::toString(SkString* str) const { 420 void SkTwoPointConicalGradient::toString(SkString* str) const {
419 str->append("SkTwoPointConicalGradient: ("); 421 str->append("SkTwoPointConicalGradient: (");
420 422
(...skipping 11 matching lines...) Expand all
432 str->appendScalar(fCenter2.fY); 434 str->appendScalar(fCenter2.fY);
433 str->append(") radius2: "); 435 str->append(") radius2: ");
434 str->appendScalar(fRadius2); 436 str->appendScalar(fRadius2);
435 str->append(" "); 437 str->append(" ");
436 438
437 this->INHERITED::toString(str); 439 this->INHERITED::toString(str);
438 440
439 str->append(")"); 441 str->append(")");
440 } 442 }
441 #endif 443 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698