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

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

Issue 678073005: Patch to remove constant attributes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 1 month 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/gl/GrGLConfig_chrome.h ('k') | src/gpu/gl/GrGLProgram.h » ('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 * 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const { 104 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const {
105 const YUVtoRGBEffect& s = sBase.cast<YUVtoRGBEffect>(); 105 const YUVtoRGBEffect& s = sBase.cast<YUVtoRGBEffect>();
106 return fColorSpace == s.getColorSpace(); 106 return fColorSpace == s.getColorSpace();
107 } 107 }
108 108
109 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE { 109 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE {
110 // YUV is opaque 110 // YUV is opaque
111 inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A, 111 inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A,
112 InvariantOutput::kWill_ReadInput); 112 InvariantOutput::kWillNot_ReadInput);
113 } 113 }
114 114
115 GrCoordTransform fCoordTransform; 115 GrCoordTransform fCoordTransform;
116 GrTextureAccess fYAccess; 116 GrTextureAccess fYAccess;
117 GrTextureAccess fUAccess; 117 GrTextureAccess fUAccess;
118 GrTextureAccess fVAccess; 118 GrTextureAccess fVAccess;
119 SkYUVColorSpace fColorSpace; 119 SkYUVColorSpace fColorSpace;
120 120
121 typedef GrFragmentProcessor INHERITED; 121 typedef GrFragmentProcessor INHERITED;
122 }; 122 };
(...skipping 10 matching lines...) Expand all
133 0.0f, 0.0f, 0.0f, 1.0}; 133 0.0f, 0.0f, 0.0f, 1.0};
134 } 134 }
135 135
136 ////////////////////////////////////////////////////////////////////////////// 136 //////////////////////////////////////////////////////////////////////////////
137 137
138 GrFragmentProcessor* 138 GrFragmentProcessor*
139 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT exture, 139 GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vT exture,
140 SkYUVColorSpace colorSpace) { 140 SkYUVColorSpace colorSpace) {
141 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); 141 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace);
142 } 142 }
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLConfig_chrome.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698