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

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

Issue 278963002: add localmatrix parameter to shader's asNewEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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
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 9
10 #include "SkTwoPointConicalGradient_gpu.h" 10 #include "SkTwoPointConicalGradient_gpu.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 this->INHERITED::flatten(buffer); 373 this->INHERITED::flatten(buffer);
374 buffer.writePoint(fCenter1); 374 buffer.writePoint(fCenter1);
375 buffer.writePoint(fCenter2); 375 buffer.writePoint(fCenter2);
376 buffer.writeScalar(fRadius1); 376 buffer.writeScalar(fRadius1);
377 buffer.writeScalar(fRadius2); 377 buffer.writeScalar(fRadius2);
378 buffer.writeBool(fFlippedGrad); 378 buffer.writeBool(fFlippedGrad);
379 } 379 }
380 380
381 #if SK_SUPPORT_GPU 381 #if SK_SUPPORT_GPU
382 382
383 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext* context, const Sk Paint&) const { 383 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext* context, const Sk Paint&,
384 const SkMatrix* localMatrix) const {
384 SkASSERT(NULL != context); 385 SkASSERT(NULL != context);
385 SkASSERT(fPtsToUnit.isIdentity()); 386 SkASSERT(fPtsToUnit.isIdentity());
386 387
387 return Gr2PtConicalGradientEffect::Create(context, *this, fTileMode); 388 return Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMa trix);
388 } 389 }
389 390
390 #else 391 #else
391 392
392 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext*, const SkPaint&) const { 393 GrEffectRef* SkTwoPointConicalGradient::asNewEffect(GrContext*, const SkPaint&) const {
393 SkDEBUGFAIL("Should not call in GPU-less build"); 394 SkDEBUGFAIL("Should not call in GPU-less build");
394 return NULL; 395 return NULL;
395 } 396 }
396 397
397 #endif 398 #endif
(...skipping 16 matching lines...) Expand all
414 str->appendScalar(fCenter2.fY); 415 str->appendScalar(fCenter2.fY);
415 str->append(") radius2: "); 416 str->append(") radius2: ");
416 str->appendScalar(fRadius2); 417 str->appendScalar(fRadius2);
417 str->append(" "); 418 str->append(" ");
418 419
419 this->INHERITED::toString(str); 420 this->INHERITED::toString(str);
420 421
421 str->append(")"); 422 str->append(")");
422 } 423 }
423 #endif 424 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698