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

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

Issue 356513003: Step towards variable length effect keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak comment Created 6 years, 5 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
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 "GrTBackendEffectFactory.h" 10 #include "GrTBackendEffectFactory.h"
11 #include "GrSimpleTextureEffect.h" 11 #include "GrSimpleTextureEffect.h"
12 #include "gl/GrGLEffect.h" 12 #include "gl/GrGLEffect.h"
13 #include "gl/GrGLShaderBuilder.h"
13 #include "SkMatrix.h" 14 #include "SkMatrix.h"
14 15
15 class GrGLConfigConversionEffect : public GrGLEffect { 16 class GrGLConfigConversionEffect : public GrGLEffect {
16 public: 17 public:
17 GrGLConfigConversionEffect(const GrBackendEffectFactory& factory, 18 GrGLConfigConversionEffect(const GrBackendEffectFactory& factory,
18 const GrDrawEffect& drawEffect) 19 const GrDrawEffect& drawEffect)
19 : INHERITED (factory) { 20 : INHERITED (factory) {
20 const GrConfigConversionEffect& effect = drawEffect.castEffect<GrConfigC onversionEffect>(); 21 const GrConfigConversionEffect& effect = drawEffect.castEffect<GrConfigC onversionEffect>();
21 fSwapRedAndBlue = effect.swapsRedAndBlue(); 22 fSwapRedAndBlue = effect.swapsRedAndBlue();
22 fPMConversion = effect.pmConversion(); 23 fPMConversion = effect.pmConversion();
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 kNone_PMConversion != pmConversion) { 263 kNone_PMConversion != pmConversion) {
263 // The PM conversions assume colors are 0..255 264 // The PM conversions assume colors are 0..255
264 return NULL; 265 return NULL;
265 } 266 }
266 return SkNEW_ARGS(GrConfigConversionEffect, (texture, 267 return SkNEW_ARGS(GrConfigConversionEffect, (texture,
267 swapRedAndBlue, 268 swapRedAndBlue,
268 pmConversion, 269 pmConversion,
269 matrix)); 270 matrix));
270 } 271 }
271 } 272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698