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

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

Issue 1471293003: Create a static instances of SrcOver XferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Build 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/GrCustomXfermode.cpp ('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 14 matching lines...) Expand all
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 GrPipelineOptimizations& optimizations, 32 GrXferProcessor::OptFlags onGetOptimizations(const GrPipelineOptimizations& optimizations,
33 bool doesStencilWrite, 33 bool doesStencilWrite,
34 GrColor* color, 34 GrColor* color,
35 const GrCaps& caps) override { 35 const GrCaps& caps) const overr ide {
36 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC overage_OptFlag; 36 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC overage_OptFlag;
37 } 37 }
38 38
39 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; 39 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
40 40
41 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; 41 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;
42 42
43 bool onIsEqual(const GrXferProcessor& xpBase) const override { 43 bool onIsEqual(const GrXferProcessor& xpBase) const override {
44 return true; 44 return true;
45 } 45 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const DstTexture* dst) const { 100 const DstTexture* dst) const {
101 return DisableColorXP::Create(); 101 return DisableColorXP::Create();
102 } 102 }
103 103
104 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); 104 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory);
105 105
106 const GrXPFactory* GrDisableColorXPFactory::TestCreate(GrProcessorTestData*) { 106 const GrXPFactory* GrDisableColorXPFactory::TestCreate(GrProcessorTestData*) {
107 return GrDisableColorXPFactory::Create(); 107 return GrDisableColorXPFactory::Create();
108 } 108 }
109 109
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698