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

Side by Side Diff: src/effects/GrCircleBlurFragmentProcessor.h

Issue 1824693003: Make GrCircleBlurFragmentProcessor::onIsEqual include the position (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 #ifndef GrCircleBlurFragmentProcessor_DEFINED 8 #ifndef GrCircleBlurFragmentProcessor_DEFINED
9 #define GrCircleBlurFragmentProcessor_DEFINED 9 #define GrCircleBlurFragmentProcessor_DEFINED
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 GrCircleBlurFragmentProcessor(const SkRect& circle, float sigma, 57 GrCircleBlurFragmentProcessor(const SkRect& circle, float sigma,
58 float offset, GrTexture* blurProfile); 58 float offset, GrTexture* blurProfile);
59 59
60 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; 60 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
61 61
62 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; 62 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
63 63
64 bool onIsEqual(const GrFragmentProcessor& other) const override { 64 bool onIsEqual(const GrFragmentProcessor& other) const override {
65 const GrCircleBlurFragmentProcessor& cbfp = other.cast<GrCircleBlurFragm entProcessor>(); 65 const GrCircleBlurFragmentProcessor& cbfp = other.cast<GrCircleBlurFragm entProcessor>();
66 // fOffset is computed from the circle width and the sigma 66 // fOffset is computed from the circle width and the sigma
67 return this->circle().width() == cbfp.circle().width() && fSigma == cbfp .fSigma; 67 return this->circle() == cbfp.circle() && fSigma == cbfp.fSigma;
68 } 68 }
69 69
70 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 70 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
71 71
72 static GrTexture* CreateCircleBlurProfileTexture(GrTextureProvider*, 72 static GrTexture* CreateCircleBlurProfileTexture(GrTextureProvider*,
73 const SkRect& circle, 73 const SkRect& circle,
74 float sigma, float* offset) ; 74 float sigma, float* offset) ;
75 75
76 SkRect fCircle; 76 SkRect fCircle;
77 float fSigma; 77 float fSigma;
78 float fOffset; 78 float fOffset;
79 GrTextureAccess fBlurProfileAccess; 79 GrTextureAccess fBlurProfileAccess;
80 80
81 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 81 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
82 82
83 typedef GrFragmentProcessor INHERITED; 83 typedef GrFragmentProcessor INHERITED;
84 }; 84 };
85 85
86 #endif 86 #endif
87 #endif 87 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698