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

Side by Side Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 1434313002: Make all GrFragmentProcessors GL independent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLSLBlend.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 2013 Google Inc. 2 * Copyright 2013 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 #include "GrGLProgramDesc.h" 7 #include "GrGLProgramDesc.h"
8 8
9 #include "GrGLFragmentProcessor.h"
10 #include "GrProcessor.h" 9 #include "GrProcessor.h"
11 #include "GrGLGpu.h" 10 #include "GrGLGpu.h"
12 #include "GrPipeline.h" 11 #include "GrPipeline.h"
13 #include "SkChecksum.h" 12 #include "SkChecksum.h"
13 #include "glsl/GrGLSLFragmentProcessor.h"
14 #include "glsl/GrGLSLFragmentShaderBuilder.h" 14 #include "glsl/GrGLSLFragmentShaderBuilder.h"
15 15
16 /** 16 /**
17 * Do we need to either map r,g,b->a or a->r. configComponentMask indicates whic h channels are 17 * Do we need to either map r,g,b->a or a->r. configComponentMask indicates whic h channels are
18 * present in the texture's config. swizzleComponentMask indicates the channels present in the 18 * present in the texture's config. swizzleComponentMask indicates the channels present in the
19 * shader swizzle. 19 * shader swizzle.
20 */ 20 */
21 static bool swizzle_requires_alpha_remapping(const GrGLSLCaps& caps, GrPixelConf ig config) { 21 static bool swizzle_requires_alpha_remapping(const GrGLSLCaps& caps, GrPixelConf ig config) {
22 if (!caps.mustSwizzleInShader()) { 22 if (!caps.mustSwizzleInShader()) {
23 // Any remapping is handled using texture swizzling not shader modificat ions. 23 // Any remapping is handled using texture swizzling not shader modificat ions.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 GrGLSLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.get RenderTarget()); 149 GrGLSLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.get RenderTarget());
150 } else { 150 } else {
151 header->fFragPosKey = 0; 151 header->fFragPosKey = 0;
152 } 152 }
153 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); 153 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters();
154 header->fColorEffectCnt = pipeline.numColorFragmentProcessors(); 154 header->fColorEffectCnt = pipeline.numColorFragmentProcessors();
155 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors(); 155 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors();
156 glDesc->finalize(); 156 glDesc->finalize();
157 return true; 157 return true;
158 } 158 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLSLBlend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698