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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest) | 247 DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest) |
248 | 248 |
249 // This is evil evil evil. The linker may throw away whole translation units as
dead code if it | 249 // This is evil evil evil. The linker may throw away whole translation units as
dead code if it |
250 // thinks none of the functions are called. It will do this even if there are st
atic initializers | 250 // thinks none of the functions are called. It will do this even if there are st
atic initializers |
251 // in the unit that could pass pointers to functions from the unit out to other
translation units! | 251 // in the unit that could pass pointers to functions from the unit out to other
translation units! |
252 // We force some of the effects that would otherwise be discarded to link here. | 252 // We force some of the effects that would otherwise be discarded to link here. |
253 | 253 |
254 #include "SkLightingImageFilter.h" | 254 #include "SkLightingImageFilter.h" |
255 #include "SkMagnifierImageFilter.h" | 255 #include "SkMagnifierImageFilter.h" |
256 #include "SkColorMatrixFilter.h" | 256 #include "SkColorMatrixFilter.h" |
257 #include "SkBitmapAlphaThresholdShader.h" | |
258 | 257 |
259 void forceLinking(); | 258 void forceLinking(); |
260 | 259 |
261 void forceLinking() { | 260 void forceLinking() { |
262 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); | 261 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); |
263 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); | 262 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); |
264 GrConfigConversionEffect::Create(NULL, | 263 GrConfigConversionEffect::Create(NULL, |
265 false, | 264 false, |
266 GrConfigConversionEffect::kNone_PMConversio
n, | 265 GrConfigConversionEffect::kNone_PMConversio
n, |
267 SkMatrix::I()); | 266 SkMatrix::I()); |
268 SkScalar matrix[20]; | 267 SkScalar matrix[20]; |
269 SkColorMatrixFilter cmf(matrix); | 268 SkColorMatrixFilter cmf(matrix); |
270 SkBitmapAlphaThresholdShader::Create(SkBitmap(), SkRegion(), 0x80); | |
271 } | 269 } |
272 | 270 |
273 #endif | 271 #endif |
OLD | NEW |