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

Side by Side Diff: src/gpu/effects/GrDisableColorXP.cpp

Issue 1480353002: APIs which took colorPOI / coveragePOI pairs updated to take a GrPipelineOptimizations struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/gpu/effects/GrDisableColorXP.h ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/GrDisableColorXP.h" 8 #include "effects/GrDisableColorXP.h"
9 #include "GrProcessor.h" 9 #include "GrProcessor.h"
10 #include "glsl/GrGLSLFragmentShaderBuilder.h" 10 #include "glsl/GrGLSLFragmentShaderBuilder.h"
(...skipping 11 matching lines...) Expand all
22 22
23 ~DisableColorXP() override {}; 23 ~DisableColorXP() override {};
24 24
25 const char* name() const override { return "Disable Color"; } 25 const char* name() const override { return "Disable Color"; }
26 26
27 GrGLSLXferProcessor* createGLSLInstance() const override; 27 GrGLSLXferProcessor* createGLSLInstance() const override;
28 28
29 private: 29 private:
30 DisableColorXP(); 30 DisableColorXP();
31 31
32 GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI, 32 GrXferProcessor::OptFlags onGetOptimizations(const GrPipelineOptimizations& optimizations,
33 const GrProcOptInfo& coveragePO I,
34 bool doesStencilWrite, 33 bool doesStencilWrite,
35 GrColor* color, 34 GrColor* color,
36 const GrCaps& caps) override { 35 const GrCaps& caps) override {
37 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC overage_OptFlag; 36 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC overage_OptFlag;
38 } 37 }
39 38
40 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; 39 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
41 40
42 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; 41 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;
43 42
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 88 }
90 89
91 /////////////////////////////////////////////////////////////////////////////// 90 ///////////////////////////////////////////////////////////////////////////////
92 91
93 GrDisableColorXPFactory::GrDisableColorXPFactory() { 92 GrDisableColorXPFactory::GrDisableColorXPFactory() {
94 this->initClassID<GrDisableColorXPFactory>(); 93 this->initClassID<GrDisableColorXPFactory>();
95 } 94 }
96 95
97 GrXferProcessor* 96 GrXferProcessor*
98 GrDisableColorXPFactory::onCreateXferProcessor(const GrCaps& caps, 97 GrDisableColorXPFactory::onCreateXferProcessor(const GrCaps& caps,
99 const GrProcOptInfo& colorPOI, 98 const GrPipelineOptimizations& op timizations,
100 const GrProcOptInfo& covPOI,
101 bool hasMixedSamples, 99 bool hasMixedSamples,
102 const DstTexture* dst) const { 100 const DstTexture* dst) const {
103 return DisableColorXP::Create(); 101 return DisableColorXP::Create();
104 } 102 }
105 103
106 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); 104 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory);
107 105
108 const GrXPFactory* GrDisableColorXPFactory::TestCreate(GrProcessorTestData*) { 106 const GrXPFactory* GrDisableColorXPFactory::TestCreate(GrProcessorTestData*) {
109 return GrDisableColorXPFactory::Create(); 107 return GrDisableColorXPFactory::Create();
110 } 108 }
111 109
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDisableColorXP.h ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698