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

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

Issue 1490283004: Create GLSLUniformHandler class for gpu backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up public api of uniformhandler Created 5 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/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConstColorProcessor.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 "GrConfigConversionEffect.h" 8 #include "GrConfigConversionEffect.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
11 #include "GrInvariantOutput.h" 11 #include "GrInvariantOutput.h"
12 #include "GrSimpleTextureEffect.h" 12 #include "GrSimpleTextureEffect.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 #include "glsl/GrGLSLFragmentProcessor.h" 14 #include "glsl/GrGLSLFragmentProcessor.h"
15 #include "glsl/GrGLSLFragmentShaderBuilder.h" 15 #include "glsl/GrGLSLFragmentShaderBuilder.h"
16 #include "glsl/GrGLSLProgramBuilder.h"
17 16
18 class GrGLConfigConversionEffect : public GrGLSLFragmentProcessor { 17 class GrGLConfigConversionEffect : public GrGLSLFragmentProcessor {
19 public: 18 public:
20 GrGLConfigConversionEffect(const GrProcessor& processor) { 19 GrGLConfigConversionEffect(const GrProcessor& processor) {
21 const GrConfigConversionEffect& configConversionEffect = 20 const GrConfigConversionEffect& configConversionEffect =
22 processor.cast<GrConfigConversionEffect>(); 21 processor.cast<GrConfigConversionEffect>();
23 fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue(); 22 fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue();
24 fPMConversion = configConversionEffect.pmConversion(); 23 fPMConversion = configConversionEffect.pmConversion();
25 } 24 }
26 25
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } else { 300 } else {
302 if (kRGBA_8888_GrPixelConfig != texture->config() && 301 if (kRGBA_8888_GrPixelConfig != texture->config() &&
303 kBGRA_8888_GrPixelConfig != texture->config() && 302 kBGRA_8888_GrPixelConfig != texture->config() &&
304 kNone_PMConversion != pmConversion) { 303 kNone_PMConversion != pmConversion) {
305 // The PM conversions assume colors are 0..255 304 // The PM conversions assume colors are 0..255
306 return nullptr; 305 return nullptr;
307 } 306 }
308 return new GrConfigConversionEffect(texture, swapRedAndBlue, pmConversio n, matrix); 307 return new GrConfigConversionEffect(texture, swapRedAndBlue, pmConversio n, matrix);
309 } 308 }
310 } 309 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConstColorProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698