| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |