| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 str->append(")"); | 71 str->append(")"); |
| 72 } | 72 } |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 75 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 76 | 76 |
| 77 #if SK_SUPPORT_GPU | 77 #if SK_SUPPORT_GPU |
| 78 | 78 |
| 79 #include "GrTextureAccess.h" | 79 #include "GrTextureAccess.h" |
| 80 #include "SkGr.h" | 80 #include "SkGr.h" |
| 81 #include "SkGrPriv.h" |
| 81 #include "effects/GrSimpleTextureEffect.h" | 82 #include "effects/GrSimpleTextureEffect.h" |
| 82 #include "effects/GrBicubicEffect.h" | 83 #include "effects/GrBicubicEffect.h" |
| 83 #include "effects/GrSimpleTextureEffect.h" | 84 #include "effects/GrSimpleTextureEffect.h" |
| 84 | 85 |
| 85 const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context
, | 86 const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context
, |
| 86 const SkMatrix& vi
ewM, | 87 const SkMatrix& vi
ewM, |
| 87 const SkMatrix* lo
calMatrix, | 88 const SkMatrix* lo
calMatrix, |
| 88 SkFilterQuality fi
lterQuality) const { | 89 SkFilterQuality fi
lterQuality) const { |
| 89 SkMatrix matrix; | 90 SkMatrix matrix; |
| 90 matrix.setIDiv(fImage->width(), fImage->height()); | 91 matrix.setIDiv(fImage->width(), fImage->height()); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params)); | 135 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params)); |
| 135 } | 136 } |
| 136 | 137 |
| 137 if (GrPixelConfigIsAlphaOnly(texture->config())) { | 138 if (GrPixelConfigIsAlphaOnly(texture->config())) { |
| 138 return SkRef(inner.get()); | 139 return SkRef(inner.get()); |
| 139 } | 140 } |
| 140 return GrFragmentProcessor::MulOutputByInputAlpha(inner); | 141 return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
| 141 } | 142 } |
| 142 | 143 |
| 143 #endif | 144 #endif |
| OLD | NEW |