OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "effects/GrPorterDuffXferProcessor.h" | 8 #include "effects/GrPorterDuffXferProcessor.h" |
9 | 9 |
10 #include "GrBlend.h" | 10 #include "GrBlend.h" |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 blendConstant |= (0xff << GrColor_SHIFT_A); | 556 blendConstant |= (0xff << GrColor_SHIFT_A); |
557 | 557 |
558 return SkNEW_ARGS(PDLCDXferProcessor, (blendConstant, alpha)); | 558 return SkNEW_ARGS(PDLCDXferProcessor, (blendConstant, alpha)); |
559 } | 559 } |
560 | 560 |
561 PDLCDXferProcessor::~PDLCDXferProcessor() { | 561 PDLCDXferProcessor::~PDLCDXferProcessor() { |
562 } | 562 } |
563 | 563 |
564 void PDLCDXferProcessor::onGetGLProcessorKey(const GrGLSLCaps& caps, | 564 void PDLCDXferProcessor::onGetGLProcessorKey(const GrGLSLCaps& caps, |
565 GrProcessorKeyBuilder* b) const { | 565 GrProcessorKeyBuilder* b) const { |
566 GLPorterDuffXferProcessor::GenKey(*this, caps, b); | 566 GLPDLCDXferProcessor::GenKey(*this, caps, b); |
567 } | 567 } |
568 | 568 |
569 GrGLXferProcessor* PDLCDXferProcessor::createGLInstance() const { | 569 GrGLXferProcessor* PDLCDXferProcessor::createGLInstance() const { |
570 return SkNEW_ARGS(GLPDLCDXferProcessor, (*this)); | 570 return SkNEW_ARGS(GLPDLCDXferProcessor, (*this)); |
571 } | 571 } |
572 | 572 |
573 GrXferProcessor::OptFlags | 573 GrXferProcessor::OptFlags |
574 PDLCDXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI, | 574 PDLCDXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI, |
575 const GrProcOptInfo& coveragePOI, | 575 const GrProcOptInfo& coveragePOI, |
576 bool doesStencilWrite, | 576 bool doesStencilWrite, |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory); | 799 GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory); |
800 | 800 |
801 GrXPFactory* GrPorterDuffXPFactory::TestCreate(SkRandom* random, | 801 GrXPFactory* GrPorterDuffXPFactory::TestCreate(SkRandom* random, |
802 GrContext*, | 802 GrContext*, |
803 const GrDrawTargetCaps&, | 803 const GrDrawTargetCaps&, |
804 GrTexture*[]) { | 804 GrTexture*[]) { |
805 SkXfermode::Mode mode = SkXfermode::Mode(random->nextULessThan(SkXfermode::k
LastCoeffMode)); | 805 SkXfermode::Mode mode = SkXfermode::Mode(random->nextULessThan(SkXfermode::k
LastCoeffMode)); |
806 return GrPorterDuffXPFactory::Create(mode); | 806 return GrPorterDuffXPFactory::Create(mode); |
807 } | 807 } |
808 | 808 |
OLD | NEW |