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

Side by Side Diff: src/gpu/effects/GrYUVtoRGBEffect.cpp

Issue 522873005: Move MakeDivByTextureWHMatrix to GrCoordTransform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « src/gpu/effects/GrMatrixConvolutionEffect.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 "gl/builders/GrGLProgramBuilder.h" 8 #include "gl/builders/GrGLProgramBuilder.h"
9 #include "GrYUVtoRGBEffect.h" 9 #include "GrYUVtoRGBEffect.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 fsBuilder->codeAppend(".r,\n\t\t"); 65 fsBuilder->codeAppend(".r,\n\t\t");
66 fsBuilder->appendTextureLookup(samplers[2], coords[0].c_str(), coord s[0].type()); 66 fsBuilder->appendTextureLookup(samplers[2], coords[0].c_str(), coord s[0].type());
67 fsBuilder->codeAppendf(".r,\n\t\t1.0) * %s;\n", yuvMatrix); 67 fsBuilder->codeAppendf(".r,\n\t\t1.0) * %s;\n", yuvMatrix);
68 } 68 }
69 69
70 typedef GrGLEffect INHERITED; 70 typedef GrGLEffect INHERITED;
71 }; 71 };
72 72
73 private: 73 private:
74 YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture ) 74 YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture )
75 : fCoordTransform(kLocal_GrCoordSet, MakeDivByTextureWHMatrix(yTexture), yTe xture) 75 : fCoordTransform(kLocal_GrCoordSet, GrCoordTransform::MakeDivByTextureWHMat rix(yTexture),
76 yTexture)
76 , fYAccess(yTexture) 77 , fYAccess(yTexture)
77 , fUAccess(uTexture) 78 , fUAccess(uTexture)
78 , fVAccess(vTexture) { 79 , fVAccess(vTexture) {
79 this->addCoordTransform(&fCoordTransform); 80 this->addCoordTransform(&fCoordTransform);
80 this->addTextureAccess(&fYAccess); 81 this->addTextureAccess(&fYAccess);
81 this->addTextureAccess(&fUAccess); 82 this->addTextureAccess(&fUAccess);
82 this->addTextureAccess(&fVAccess); 83 this->addTextureAccess(&fVAccess);
83 this->setWillNotUseInputColor(); 84 this->setWillNotUseInputColor();
84 } 85 }
85 86
(...skipping 12 matching lines...) Expand all
98 typedef GrEffect INHERITED; 99 typedef GrEffect INHERITED;
99 }; 100 };
100 101
101 } 102 }
102 103
103 ////////////////////////////////////////////////////////////////////////////// 104 //////////////////////////////////////////////////////////////////////////////
104 105
105 GrEffect* GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrT exture* vTexture) { 106 GrEffect* GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrT exture* vTexture) {
106 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture); 107 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture);
107 } 108 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698