| 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 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest) | 221 DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest) |
| 222 | 222 |
| 223 // This is evil evil evil. The linker may throw away whole translation units as
dead code if it | 223 // This is evil evil evil. The linker may throw away whole translation units as
dead code if it |
| 224 // thinks none of the functions are called. It will do this even if there are st
atic initializers | 224 // thinks none of the functions are called. It will do this even if there are st
atic initializers |
| 225 // in the unit that could pass pointers to functions from the unit out to other
translation units! | 225 // in the unit that could pass pointers to functions from the unit out to other
translation units! |
| 226 // We force some of the effects that would otherwise be discarded to link here. | 226 // We force some of the effects that would otherwise be discarded to link here. |
| 227 | 227 |
| 228 #include "SkLightingImageFilter.h" | 228 #include "SkLightingImageFilter.h" |
| 229 #include "SkMagnifierImageFilter.h" | 229 #include "SkMagnifierImageFilter.h" |
| 230 #include "SkColorMatrixFilter.h" | 230 #include "SkColorMatrixFilter.h" |
| 231 #include "SkBitmapAlphaThresholdShader.h" |
| 231 | 232 |
| 232 void forceLinking(); | 233 void forceLinking(); |
| 233 | 234 |
| 234 void forceLinking() { | 235 void forceLinking() { |
| 235 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); | 236 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); |
| 236 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); | 237 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); |
| 237 GrConfigConversionEffect::Create(NULL, | 238 GrConfigConversionEffect::Create(NULL, |
| 238 false, | 239 false, |
| 239 GrConfigConversionEffect::kNone_PMConversio
n, | 240 GrConfigConversionEffect::kNone_PMConversio
n, |
| 240 SkMatrix::I()); | 241 SkMatrix::I()); |
| 241 SkScalar matrix[20]; | 242 SkScalar matrix[20]; |
| 242 SkColorMatrixFilter cmf(matrix); | 243 SkColorMatrixFilter cmf(matrix); |
| 244 SkBitmapAlphaThresholdShader::Create(SkBitmap(), SkRegion(), 0x80); |
| 243 } | 245 } |
| 244 | 246 |
| 245 #endif | 247 #endif |
| OLD | NEW |