Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #include "effects/GrDisableColorXP.h" | |
| 9 #include "GrProcessor.h" | |
| 10 #include "gl/GrGLXferProcessor.h" | |
| 11 | |
| 12 class GrGLDisableColorXP : public GrGLXferProcessor { | |
| 13 public: | |
| 14 GrGLDisableColorXP(const GrProcessor&) {} | |
| 15 | |
| 16 ~GrGLDisableColorXP() SK_OVERRIDE {} | |
| 17 | |
| 18 void emitCode(const EmitArgs& args) SK_OVERRIDE {} | |
| 19 | |
| 20 void setData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERR IDE {} | |
| 21 | |
| 22 static void GenKey(const GrProcessor&, const GrGLCaps&, | |
|
bsalomon
2014/12/19 16:40:34
one line?
| |
| 23 GrProcessorKeyBuilder*) {} | |
| 24 | |
| 25 private: | |
| 26 typedef GrGLXferProcessor INHERITED; | |
| 27 }; | |
| 28 | |
| 29 /////////////////////////////////////////////////////////////////////////////// | |
| 30 | |
| 31 GrDisableColorXP::GrDisableColorXP() { | |
| 32 this->initClassID<GrDisableColorXP>(); | |
| 33 } | |
| 34 | |
| 35 void GrDisableColorXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBui lder* b) const { | |
| 36 GrGLDisableColorXP::GenKey(*this, caps, b); | |
| 37 } | |
| 38 | |
| 39 GrGLXferProcessor* GrDisableColorXP::createGLInstance() const { | |
| 40 return SkNEW_ARGS(GrGLDisableColorXP, (*this)); | |
| 41 } | |
| 42 | |
| 43 void GrDisableColorXP::getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const { | |
| 44 blendInfo->fWriteColor = false; | |
| 45 } | |
| 46 | |
| 47 /////////////////////////////////////////////////////////////////////////////// | |
| 48 | |
| 49 GrDisableColorXPFactory::GrDisableColorXPFactory() { | |
| 50 this->initClassID<GrDisableColorXPFactory>(); | |
| 51 } | |
| 52 | |
| 53 GrXferProcessor* GrDisableColorXPFactory::createXferProcessor(const GrProcOptInf o& /*colorPOI*/, | |
|
bsalomon
2014/12/19 16:40:34
that named unused param warning only happens in he
| |
| 54 const GrProcOptInf o& /*covPOI*/) const { | |
| 55 return GrDisableColorXP::Create(); | |
| 56 } | |
| 57 | |
| 58 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); | |
| 59 | |
| 60 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random, | |
| 61 GrContext*, | |
| 62 const GrDrawTargetCaps&, | |
| 63 GrTexture*[]) { | |
| 64 return GrDisableColorXPFactory::Create(); | |
| 65 } | |
| 66 | |
| OLD | NEW |