| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkAlphaThresholdFilter.h" | 8 #include "SkAlphaThresholdFilter.h" |
| 9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region, | 41 SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region, |
| 42 SkScalar innerThreshold, | 42 SkScalar innerThreshold, |
| 43 SkScalar outerThreshold, | 43 SkScalar outerThreshold, |
| 44 SkImageFilter* input) { | 44 SkImageFilter* input) { |
| 45 return SkNEW_ARGS(SkAlphaThresholdFilterImpl, (region, innerThreshold, outer
Threshold, input)); | 45 return SkNEW_ARGS(SkAlphaThresholdFilterImpl, (region, innerThreshold, outer
Threshold, input)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 #if SK_SUPPORT_GPU | 48 #if SK_SUPPORT_GPU |
| 49 #include "GrContext.h" | 49 #include "GrContext.h" |
| 50 #include "GrCoordTransform.h" | 50 #include "GrCoordTransform.h" |
| 51 #include "GrProcessor.h" | 51 #include "GrFragmentProcessor.h" |
| 52 #include "gl/GrGLProcessor.h" | 52 #include "gl/GrGLProcessor.h" |
| 53 #include "gl/builders/GrGLProgramBuilder.h" | 53 #include "gl/builders/GrGLProgramBuilder.h" |
| 54 #include "GrTBackendProcessorFactory.h" | 54 #include "GrTBackendProcessorFactory.h" |
| 55 #include "GrTextureAccess.h" | 55 #include "GrTextureAccess.h" |
| 56 | 56 |
| 57 #include "SkGr.h" | 57 #include "SkGr.h" |
| 58 | 58 |
| 59 class GrGLAlphaThresholdEffect; | 59 class GrGLAlphaThresholdEffect; |
| 60 | 60 |
| 61 class AlphaThresholdEffect : public GrFragmentProcessor { | 61 class AlphaThresholdEffect : public GrFragmentProcessor { |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 (U8CPU)(SkColorGetG(source) *
scale), | 378 (U8CPU)(SkColorGetG(source) *
scale), |
| 379 (U8CPU)(SkColorGetB(source) *
scale)); | 379 (U8CPU)(SkColorGetB(source) *
scale)); |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 dptr[y * dst->width() + x] = output_color; | 382 dptr[y * dst->width() + x] = output_color; |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 | 385 |
| 386 return true; | 386 return true; |
| 387 } | 387 } |
| OLD | NEW |