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

Side by Side Diff: src/core/SkXfermode.cpp

Issue 654313002: Auto-compare GrProcessors' texture accesses in isEqual(). (Closed) Base URL: https://skia.googlesource.com/skia.git@xformcomp
Patch Set: update Created 6 years, 2 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 | « include/gpu/GrProcessor.h ('k') | src/effects/SkAlphaThresholdFilter.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkXfermode.h" 10 #include "SkXfermode.h"
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 fBackgroundTransform.reset(kLocal_GrCoordSet, background); 1201 fBackgroundTransform.reset(kLocal_GrCoordSet, background);
1202 this->addCoordTransform(&fBackgroundTransform); 1202 this->addCoordTransform(&fBackgroundTransform);
1203 fBackgroundAccess.reset(background); 1203 fBackgroundAccess.reset(background);
1204 this->addTextureAccess(&fBackgroundAccess); 1204 this->addTextureAccess(&fBackgroundAccess);
1205 } else { 1205 } else {
1206 this->setWillReadDstColor(); 1206 this->setWillReadDstColor();
1207 } 1207 }
1208 } 1208 }
1209 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { 1209 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE {
1210 const XferEffect& s = other.cast<XferEffect>(); 1210 const XferEffect& s = other.cast<XferEffect>();
1211 return fMode == s.fMode && 1211 return fMode == s.fMode;
1212 fBackgroundAccess.getTexture() == s.fBackgroundAccess.getTexture( );
1213 } 1212 }
1214 1213
1215 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE { 1214 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE {
1216 inout->setToUnknown(); 1215 inout->setToUnknown();
1217 } 1216 }
1218 1217
1219 SkXfermode::Mode fMode; 1218 SkXfermode::Mode fMode;
1220 GrCoordTransform fBackgroundTransform; 1219 GrCoordTransform fBackgroundTransform;
1221 GrTextureAccess fBackgroundAccess; 1220 GrTextureAccess fBackgroundAccess;
1222 1221
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 } else { 1953 } else {
1955 proc16 = rec.fProc16_General; 1954 proc16 = rec.fProc16_General;
1956 } 1955 }
1957 } 1956 }
1958 return proc16; 1957 return proc16;
1959 } 1958 }
1960 1959
1961 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode)
1962 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) 1961 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode)
1963 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1962 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « include/gpu/GrProcessor.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698