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

Side by Side Diff: src/gpu/effects/GrTextureDomain.h

Issue 469393007: Fix == operator in GrTextureDomain so we don't compair uninitilized values (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 2012 Google Inc. 2 * Copyright 2012 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 GrTextureDomainEffect_DEFINED 8 #ifndef GrTextureDomainEffect_DEFINED
9 #define GrTextureDomainEffect_DEFINED 9 #define GrTextureDomainEffect_DEFINED
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 SkRect result = { 61 SkRect result = {
62 texelRect.fLeft * wInv, 62 texelRect.fLeft * wInv,
63 texelRect.fTop * hInv, 63 texelRect.fTop * hInv,
64 texelRect.fRight * wInv, 64 texelRect.fRight * wInv,
65 texelRect.fBottom * hInv 65 texelRect.fBottom * hInv
66 }; 66 };
67 return result; 67 return result;
68 } 68 }
69 69
70 bool operator== (const GrTextureDomain& that) const { 70 bool operator== (const GrTextureDomain& that) const {
71 return fMode == that.fMode && fDomain == that.fDomain; 71 return fMode == that.fMode && (kIgnore_Mode == fMode || fDomain == that. fDomain);
72 } 72 }
73 73
74 /** 74 /**
75 * A GrGLEffect subclass that corresponds to a GrEffect subclass that uses G rTextureDomain 75 * A GrGLEffect subclass that corresponds to a GrEffect subclass that uses G rTextureDomain
76 * should include this helper. It generates the texture domain GLSL, produce s the part of the 76 * should include this helper. It generates the texture domain GLSL, produce s the part of the
77 * effect key that reflects the texture domain code, and performs the unifor m uploads necessary 77 * effect key that reflects the texture domain code, and performs the unifor m uploads necessary
78 * for texture domains. 78 * for texture domains.
79 */ 79 */
80 class GLDomain { 80 class GLDomain {
81 public: 81 public:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 GrCoordSet); 173 GrCoordSet);
174 174
175 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; 175 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE;
176 176
177 GR_DECLARE_EFFECT_TEST; 177 GR_DECLARE_EFFECT_TEST;
178 178
179 typedef GrSingleTextureEffect INHERITED; 179 typedef GrSingleTextureEffect INHERITED;
180 }; 180 };
181 181
182 #endif 182 #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