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

Side by Side Diff: src/gpu/effects/GrYUVtoRGBEffect.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 | « src/gpu/effects/GrSingleTextureEffect.cpp ('k') | 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 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 "GrYUVtoRGBEffect.h" 8 #include "GrYUVtoRGBEffect.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 GLProcessor::GenKey(*this, caps, b); 83 GLProcessor::GenKey(*this, caps, b);
84 } 84 }
85 85
86 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { 86 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE {
87 return SkNEW_ARGS(GLProcessor, (*this)); 87 return SkNEW_ARGS(GLProcessor, (*this));
88 } 88 }
89 89
90 private: 90 private:
91 YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture , 91 YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture ,
92 SkYUVColorSpace colorSpace) 92 SkYUVColorSpace colorSpace)
93 : fCoordTransform(kLocal_GrCoordSet, GrCoordTransform::MakeDivByTextureWHMa trix(yTexture), 93 : fCoordTransform(kLocal_GrCoordSet,
94 yTexture) 94 GrCoordTransform::MakeDivByTextureWHMatrix(yTexture),
95 yTexture, GrTextureParams::kNone_FilterMode)
95 , fYAccess(yTexture) 96 , fYAccess(yTexture)
96 , fUAccess(uTexture) 97 , fUAccess(uTexture)
97 , fVAccess(vTexture) 98 , fVAccess(vTexture)
98 , fColorSpace(colorSpace) { 99 , fColorSpace(colorSpace) {
99 this->initClassID<YUVtoRGBEffect>(); 100 this->initClassID<YUVtoRGBEffect>();
100 this->addCoordTransform(&fCoordTransform); 101 this->addCoordTransform(&fCoordTransform);
101 this->addTextureAccess(&fYAccess); 102 this->addTextureAccess(&fYAccess);
102 this->addTextureAccess(&fUAccess); 103 this->addTextureAccess(&fUAccess);
103 this->addTextureAccess(&fVAccess); 104 this->addTextureAccess(&fVAccess);
104 } 105 }
(...skipping 30 matching lines...) Expand all
135 0.0f, 0.0f, 0.0f, 1.0}; 136 0.0f, 0.0f, 0.0f, 1.0};
136 } 137 }
137 138
138 ////////////////////////////////////////////////////////////////////////////// 139 //////////////////////////////////////////////////////////////////////////////
139 140
140 GrFragmentProcessor* 141 GrFragmentProcessor*
141 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT exture, 142 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT exture,
142 SkYUVColorSpace colorSpace) { 143 SkYUVColorSpace colorSpace) {
143 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); 144 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace);
144 } 145 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSingleTextureEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698