OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkTwoPointConicalGradient_gpu.h" | 8 #include "SkTwoPointConicalGradient_gpu.h" |
9 #include "GrTBackendEffectFactory.h" | |
scroggo
2014/04/10 16:03:19
Why doesn't this file exist in GPU-less build?
Ei
egdaniel
2014/04/10 16:14:20
Ah that's right. If the gpu is not supported we do
| |
10 | 9 |
11 #include "SkTwoPointConicalGradient.h" | 10 #include "SkTwoPointConicalGradient.h" |
12 | 11 |
13 #if SK_SUPPORT_GPU | 12 #if SK_SUPPORT_GPU |
13 #include "GrTBackendEffectFactory.h" | |
14 // For brevity | 14 // For brevity |
15 typedef GrGLUniformManager::UniformHandle UniformHandle; | 15 typedef GrGLUniformManager::UniformHandle UniformHandle; |
16 | 16 |
17 ////////////////////////////////////////////////////////////////////////////// | 17 ////////////////////////////////////////////////////////////////////////////// |
18 | 18 |
19 static void set_matrix_default_conical(const SkTwoPointConicalGradient& shader, | 19 static void set_matrix_default_conical(const SkTwoPointConicalGradient& shader, |
20 SkMatrix* invLMatrix) { | 20 SkMatrix* invLMatrix) { |
21 // Inverse of the current local matrix is passed in then, | 21 // Inverse of the current local matrix is passed in then, |
22 // translate to center1, rotate so center2 is on x axis. | 22 // translate to center1, rotate so center2 is on x axis. |
23 const SkPoint& center1 = shader.getStartCenter(); | 23 const SkPoint& center1 = shader.getStartCenter(); |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 SkMatrix matrix; | 383 SkMatrix matrix; |
384 if (!shader.getLocalMatrix().invert(&matrix)) { | 384 if (!shader.getLocalMatrix().invert(&matrix)) { |
385 return NULL; | 385 return NULL; |
386 } | 386 } |
387 | 387 |
388 set_matrix_default_conical(shader, &matrix); | 388 set_matrix_default_conical(shader, &matrix); |
389 return Default2PtConicalEffect::Create(ctx, shader, matrix, tm); | 389 return Default2PtConicalEffect::Create(ctx, shader, matrix, tm); |
390 } | 390 } |
391 | 391 |
392 #endif | 392 #endif |
OLD | NEW |