| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
| 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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 9 #include "SkMagnifierImageFilter.h" | 9 #include "SkMagnifierImageFilter.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| 11 #include "SkFlattenableBuffers.h" | 11 #include "SkFlattenableBuffers.h" |
| 12 | 12 |
| 13 #include <algorithm> | |
| 14 | |
| 15 //////////////////////////////////////////////////////////////////////////////// | 13 //////////////////////////////////////////////////////////////////////////////// |
| 16 #if SK_SUPPORT_GPU | 14 #if SK_SUPPORT_GPU |
| 17 #include "effects/GrSingleTextureEffect.h" | 15 #include "effects/GrSingleTextureEffect.h" |
| 18 #include "gl/GrGLEffect.h" | 16 #include "gl/GrGLEffect.h" |
| 19 #include "gl/GrGLEffectMatrix.h" | 17 #include "gl/GrGLEffectMatrix.h" |
| 20 #include "gl/GrGLSL.h" | 18 #include "gl/GrGLSL.h" |
| 21 #include "gl/GrGLTexture.h" | 19 #include "gl/GrGLTexture.h" |
| 22 #include "GrTBackendEffectFactory.h" | 20 #include "GrTBackendEffectFactory.h" |
| 23 | 21 |
| 24 class GrGLMagnifierEffect; | 22 class GrGLMagnifierEffect; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 345 |
| 348 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1); | 346 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1); |
| 349 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1); | 347 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1); |
| 350 | 348 |
| 351 *dptr = sptr[y_val * width + x_val]; | 349 *dptr = sptr[y_val * width + x_val]; |
| 352 dptr++; | 350 dptr++; |
| 353 } | 351 } |
| 354 } | 352 } |
| 355 return true; | 353 return true; |
| 356 } | 354 } |
| OLD | NEW |