OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkBitmapProcShader.h" | 8 #include "SkBitmapProcShader.h" |
9 #include "SkBitmapProcState.h" | 9 #include "SkBitmapProcState.h" |
10 #include "SkBitmapProvider.h" | 10 #include "SkBitmapProvider.h" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 401 } |
402 | 402 |
403 SkAutoTUnref<GrFragmentProcessor> inner; | 403 SkAutoTUnref<GrFragmentProcessor> inner; |
404 if (doBicubic) { | 404 if (doBicubic) { |
405 inner.reset(GrBicubicEffect::Create(procDataManager, texture, matrix, tm
)); | 405 inner.reset(GrBicubicEffect::Create(procDataManager, texture, matrix, tm
)); |
406 } else { | 406 } else { |
407 inner.reset(GrSimpleTextureEffect::Create(procDataManager, texture, matr
ix, params)); | 407 inner.reset(GrSimpleTextureEffect::Create(procDataManager, texture, matr
ix, params)); |
408 } | 408 } |
409 | 409 |
410 if (kAlpha_8_SkColorType == fRawBitmap.colorType()) { | 410 if (kAlpha_8_SkColorType == fRawBitmap.colorType()) { |
411 return SkRef(inner.get()); | 411 return GrFragmentProcessor::MulOutputByInputUnpremulColor(inner); |
412 } | 412 } |
413 return GrFragmentProcessor::MulOuputByInputAlpha(inner); | 413 return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
414 } | 414 } |
415 | 415 |
416 #endif | 416 #endif |
OLD | NEW |