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

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

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix Created 6 years 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 buffer.writeScalar(fRadius2); 384 buffer.writeScalar(fRadius2);
385 buffer.writeBool(fFlippedGrad); 385 buffer.writeBool(fFlippedGrad);
386 } 386 }
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* localMatrix, 395 const SkMatrix* localMatrix,
395 GrColor* paintColor, 396 GrColor* paintColor,
396 GrFragmentProcessor** fp) c onst { 397 GrFragmentProcessor** fp) c onst {
397 SkASSERT(context); 398 SkASSERT(context);
398 SkASSERT(fPtsToUnit.isIdentity()); 399 SkASSERT(fPtsToUnit.isIdentity());
399 400
400 *fp = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMat rix); 401 *fp = Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMat rix);
401 *paintColor = SkColor2GrColorJustAlpha(paint.getColor()); 402 *paintColor = SkColor2GrColorJustAlpha(paint.getColor());
402 return true; 403 return true;
403 } 404 }
404 405
405 #else 406 #else
406 407
407 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix*, 408 bool SkTwoPointConicalGradient::asFragmentProcessor(GrContext*, const SkPaint&,
409 const SkMatrix&, const SkMat rix*,
408 GrColor*, GrFragmentProcesso r**) const { 410 GrColor*, GrFragmentProcesso r**) const {
409 SkDEBUGFAIL("Should not call in GPU-less build"); 411 SkDEBUGFAIL("Should not call in GPU-less build");
410 return false; 412 return false;
411 } 413 }
412 414
413 #endif 415 #endif
414 416
415 #ifndef SK_IGNORE_TO_STRING 417 #ifndef SK_IGNORE_TO_STRING
416 void SkTwoPointConicalGradient::toString(SkString* str) const { 418 void SkTwoPointConicalGradient::toString(SkString* str) const {
417 str->append("SkTwoPointConicalGradient: ("); 419 str->append("SkTwoPointConicalGradient: (");
(...skipping 12 matching lines...) Expand all
430 str->appendScalar(fCenter2.fY); 432 str->appendScalar(fCenter2.fY);
431 str->append(") radius2: "); 433 str->append(") radius2: ");
432 str->appendScalar(fRadius2); 434 str->appendScalar(fRadius2);
433 str->append(" "); 435 str->append(" ");
434 436
435 this->INHERITED::toString(str); 437 this->INHERITED::toString(str);
436 438
437 str->append(")"); 439 str->append(")");
438 } 440 }
439 #endif 441 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698