| 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 "SkColorCubeFilter.h" | 8 #include "SkColorCubeFilter.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkOnce.h" | 10 #include "SkOnce.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 desc, true, fCubeData->data(), 0)); | 358 desc, true, fCubeData->data(), 0)); |
| 359 if (textureCube) { | 359 if (textureCube) { |
| 360 context->textureProvider()->assignUniqueKeyToTexture(key, textureCub
e); | 360 context->textureProvider()->assignUniqueKeyToTexture(key, textureCub
e); |
| 361 } | 361 } |
| 362 } | 362 } |
| 363 | 363 |
| 364 GrFragmentProcessor* frag = textureCube ? GrColorCubeEffect::Create(textureC
ube) : NULL; | 364 GrFragmentProcessor* frag = textureCube ? GrColorCubeEffect::Create(textureC
ube) : NULL; |
| 365 if (frag) { | 365 if (frag) { |
| 366 if (array) { | 366 if (array) { |
| 367 *array->append() = frag; | 367 *array->append() = frag; |
| 368 } else { |
| 369 frag->unref(); |
| 370 SkDEBUGCODE(frag = NULL;) |
| 368 } | 371 } |
| 369 return true; | 372 return true; |
| 370 } | 373 } |
| 371 return false; | 374 return false; |
| 372 } | 375 } |
| 373 #endif | 376 #endif |
| OLD | NEW |