| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkBitmapProvider.h" | 9 #include "SkBitmapProvider.h" |
| 10 #include "SkImage_Base.h" | 10 #include "SkImage_Base.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 GrTextureParams::FilterMode textureFilterMode = | 115 GrTextureParams::FilterMode textureFilterMode = |
| 116 GrSkFilterQualityToGrFilterMode(filterQuality, viewM, this->getLocalMatrix()
, &doBicubic); | 116 GrSkFilterQualityToGrFilterMode(filterQuality, viewM, this->getLocalMatrix()
, &doBicubic); |
| 117 GrTextureParams params(tm, textureFilterMode); | 117 GrTextureParams params(tm, textureFilterMode); |
| 118 SkAutoTUnref<GrTexture> texture(as_IB(fImage)->asTextureRef(context, params,
gammaTreatment)); | 118 SkAutoTUnref<GrTexture> texture(as_IB(fImage)->asTextureRef(context, params,
gammaTreatment)); |
| 119 if (!texture) { | 119 if (!texture) { |
| 120 return nullptr; | 120 return nullptr; |
| 121 } | 121 } |
| 122 | 122 |
| 123 sk_sp<GrFragmentProcessor> inner; | 123 sk_sp<GrFragmentProcessor> inner; |
| 124 if (doBicubic) { | 124 if (doBicubic) { |
| 125 inner = GrBicubicEffect::Make(texture, matrix, tm); | 125 inner = GrBicubicEffect::Make(texture, nullptr, matrix, tm); |
| 126 } else { | 126 } else { |
| 127 inner = GrSimpleTextureEffect::Make(texture, matrix, params); | 127 inner = GrSimpleTextureEffect::Make(texture, nullptr, matrix, params); |
| 128 } | 128 } |
| 129 | 129 |
| 130 if (GrPixelConfigIsAlphaOnly(texture->config())) { | 130 if (GrPixelConfigIsAlphaOnly(texture->config())) { |
| 131 return inner; | 131 return inner; |
| 132 } | 132 } |
| 133 return sk_sp<GrFragmentProcessor>(GrFragmentProcessor::MulOutputByInputAlpha
(std::move(inner))); | 133 return sk_sp<GrFragmentProcessor>(GrFragmentProcessor::MulOutputByInputAlpha
(std::move(inner))); |
| 134 } | 134 } |
| 135 | 135 |
| 136 #endif | 136 #endif |
| OLD | NEW |