| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 // This is a GPU-backend specific test. It relies on static intializers to work | 9 // This is a GPU-backend specific test. It relies on static intializers to work |
| 10 | 10 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 #if SK_SUPPORT_GPU && SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 13 #if SK_SUPPORT_GPU && SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
| 14 | 14 |
| 15 #include "gl/GrGpuGL.h" | |
| 16 #include "GrBackendEffectFactory.h" | 15 #include "GrBackendEffectFactory.h" |
| 17 #include "GrContextFactory.h" | 16 #include "GrContextFactory.h" |
| 18 #include "GrDrawEffect.h" | 17 #include "GrDrawEffect.h" |
| 19 #include "effects/GrConfigConversionEffect.h" | 18 #include "effects/GrConfigConversionEffect.h" |
| 19 #include "gl/GrGpuGL.h" |
| 20 | 20 |
| 21 #include "SkChecksum.h" | 21 #include "SkChecksum.h" |
| 22 #include "SkRandom.h" | 22 #include "SkRandom.h" |
| 23 #include "Test.h" | 23 #include "Test.h" |
| 24 | 24 |
| 25 void GrGLProgramDesc::setRandom(SkRandom* random, | 25 void GrGLProgramDesc::setRandom(SkRandom* random, |
| 26 const GrGpuGL* gpu, | 26 const GrGpuGL* gpu, |
| 27 const GrRenderTarget* dstRenderTarget, | 27 const GrRenderTarget* dstRenderTarget, |
| 28 const GrTexture* dstCopyTexture, | 28 const GrTexture* dstCopyTexture, |
| 29 const GrEffectStage* stages[], | 29 const GrEffectStage* stages[], |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 // This is evil evil evil. The linker may throw away whole translation units as
dead code if it | 246 // This is evil evil evil. The linker may throw away whole translation units as
dead code if it |
| 247 // thinks none of the functions are called. It will do this even if there are st
atic initializers | 247 // thinks none of the functions are called. It will do this even if there are st
atic initializers |
| 248 // in the unit that could pass pointers to functions from the unit out to other
translation units! | 248 // in the unit that could pass pointers to functions from the unit out to other
translation units! |
| 249 // We force some of the effects that would otherwise be discarded to link here. | 249 // We force some of the effects that would otherwise be discarded to link here. |
| 250 | 250 |
| 251 #include "SkAlphaThresholdFilter.h" | 251 #include "SkAlphaThresholdFilter.h" |
| 252 #include "SkColorMatrixFilter.h" |
| 252 #include "SkLightingImageFilter.h" | 253 #include "SkLightingImageFilter.h" |
| 253 #include "SkMagnifierImageFilter.h" | 254 #include "SkMagnifierImageFilter.h" |
| 254 #include "SkColorMatrixFilter.h" | |
| 255 | 255 |
| 256 void forceLinking(); | 256 void forceLinking(); |
| 257 | 257 |
| 258 void forceLinking() { | 258 void forceLinking() { |
| 259 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); | 259 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); |
| 260 SkAlphaThresholdFilter::Create(SkRegion(), .5f, .5f); | 260 SkAlphaThresholdFilter::Create(SkRegion(), .5f, .5f); |
| 261 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); | 261 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); |
| 262 GrConfigConversionEffect::Create(NULL, | 262 GrConfigConversionEffect::Create(NULL, |
| 263 false, | 263 false, |
| 264 GrConfigConversionEffect::kNone_PMConversio
n, | 264 GrConfigConversionEffect::kNone_PMConversio
n, |
| 265 SkMatrix::I()); | 265 SkMatrix::I()); |
| 266 SkScalar matrix[20]; | 266 SkScalar matrix[20]; |
| 267 SkColorMatrixFilter cmf(matrix); | 267 SkColorMatrixFilter cmf(matrix); |
| 268 } | 268 } |
| 269 | 269 |
| 270 #endif | 270 #endif |
| OLD | NEW |