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

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

Issue 787873002: Use threshold of 1 texture coord value per pixel w/ nearest neighbor. (Closed) Base URL: https://skia.googlesource.com/skia.git@matrix_prec
Patch Set: update comments Created 6 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 | « include/gpu/GrCoordTransform.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 #include "SkXfermode.h" 9 #include "SkXfermode.h"
10 #include "SkXfermode_opts_SSE2.h" 10 #include "SkXfermode_opts_SSE2.h"
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 typedef GrGLFragmentProcessor INHERITED; 1219 typedef GrGLFragmentProcessor INHERITED;
1220 }; 1220 };
1221 1221
1222 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 1222 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
1223 1223
1224 private: 1224 private:
1225 XferEffect(SkXfermode::Mode mode, GrTexture* background) 1225 XferEffect(SkXfermode::Mode mode, GrTexture* background)
1226 : fMode(mode) { 1226 : fMode(mode) {
1227 this->initClassID<XferEffect>(); 1227 this->initClassID<XferEffect>();
1228 if (background) { 1228 if (background) {
1229 fBackgroundTransform.reset(kLocal_GrCoordSet, background); 1229 fBackgroundTransform.reset(kLocal_GrCoordSet, background,
1230 GrTextureParams::kNone_FilterMode);
1230 this->addCoordTransform(&fBackgroundTransform); 1231 this->addCoordTransform(&fBackgroundTransform);
1231 fBackgroundAccess.reset(background); 1232 fBackgroundAccess.reset(background);
1232 this->addTextureAccess(&fBackgroundAccess); 1233 this->addTextureAccess(&fBackgroundAccess);
1233 } else { 1234 } else {
1234 this->setWillReadDstColor(); 1235 this->setWillReadDstColor();
1235 } 1236 }
1236 } 1237 }
1237 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { 1238 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE {
1238 const XferEffect& s = other.cast<XferEffect>(); 1239 const XferEffect& s = other.cast<XferEffect>();
1239 return fMode == s.fMode; 1240 return fMode == s.fMode;
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 } else { 1953 } else {
1953 proc16 = rec.fProc16_General; 1954 proc16 = rec.fProc16_General;
1954 } 1955 }
1955 } 1956 }
1956 return proc16; 1957 return proc16;
1957 } 1958 }
1958 1959
1959 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode)
1960 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) 1961 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode)
1961 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1962 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « include/gpu/GrCoordTransform.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698