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

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

Issue 1125283005: Only discard for XP dstCopies if we have a coverage value. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 5 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
« 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 "gl/GrGLXferProcessor.h" 10 #include "gl/GrGLXferProcessor.h"
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 ~DisableColorXP() override {}; 24 ~DisableColorXP() override {};
25 25
26 const char* name() const override { return "Disable Color"; } 26 const char* name() const override { return "Disable Color"; }
27 27
28 GrGLXferProcessor* createGLInstance() const override; 28 GrGLXferProcessor* createGLInstance() const override;
29 29
30 bool hasSecondaryOutput() const override { return false; } 30 bool hasSecondaryOutput() const override { return false; }
31 31
32 GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI,
33 const GrProcOptInfo& coveragePOI,
34 bool doesStencilWrite,
35 GrColor* color,
36 const GrDrawTargetCaps& caps) ove rride {
37 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC overage_OptFlag;
38 }
39
40 private: 32 private:
41 DisableColorXP(); 33 DisableColorXP();
42 34
35 GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI,
36 const GrProcOptInfo& coveragePO I,
37 bool doesStencilWrite,
38 GrColor* color,
39 const GrDrawTargetCaps& caps) o verride {
40 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC overage_OptFlag;
41 }
42
43 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override; 43 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override;
44 44
45 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; 45 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;
46 46
47 bool onIsEqual(const GrXferProcessor& xpBase) const override { 47 bool onIsEqual(const GrXferProcessor& xpBase) const override {
48 return true; 48 return true;
49 } 49 }
50 50
51 typedef GrXferProcessor INHERITED; 51 typedef GrXferProcessor INHERITED;
52 }; 52 };
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); 110 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory);
111 111
112 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random, 112 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random,
113 GrContext*, 113 GrContext*,
114 const GrDrawTargetCaps&, 114 const GrDrawTargetCaps&,
115 GrTexture*[]) { 115 GrTexture*[]) {
116 return GrDisableColorXPFactory::Create(); 116 return GrDisableColorXPFactory::Create();
117 } 117 }
118 118
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