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" |
11 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
12 #include "SkErrorInternals.h" | 12 #include "SkErrorInternals.h" |
13 #include "SkPixelRef.h" | 13 #include "SkPixelRef.h" |
14 #include "SkReadBuffer.h" | 14 #include "SkReadBuffer.h" |
15 #include "SkWriteBuffer.h" | 15 #include "SkWriteBuffer.h" |
16 | 16 |
17 #if SK_SUPPORT_GPU | 17 #if SK_SUPPORT_GPU |
| 18 #include "SkGrPriv.h" |
18 #include "effects/GrBicubicEffect.h" | 19 #include "effects/GrBicubicEffect.h" |
19 #include "effects/GrSimpleTextureEffect.h" | 20 #include "effects/GrSimpleTextureEffect.h" |
20 #endif | 21 #endif |
21 | 22 |
22 size_t SkBitmapProcShader::ContextSize() { | 23 size_t SkBitmapProcShader::ContextSize() { |
23 // The SkBitmapProcState is stored outside of the context object, with the c
ontext holding | 24 // The SkBitmapProcState is stored outside of the context object, with the c
ontext holding |
24 // a pointer to it. | 25 // a pointer to it. |
25 return sizeof(BitmapProcShaderContext) + sizeof(SkBitmapProcState); | 26 return sizeof(BitmapProcShaderContext) + sizeof(SkBitmapProcState); |
26 } | 27 } |
27 | 28 |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params)); | 407 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params)); |
407 } | 408 } |
408 | 409 |
409 if (kAlpha_8_SkColorType == fRawBitmap.colorType()) { | 410 if (kAlpha_8_SkColorType == fRawBitmap.colorType()) { |
410 return GrFragmentProcessor::MulOutputByInputUnpremulColor(inner); | 411 return GrFragmentProcessor::MulOutputByInputUnpremulColor(inner); |
411 } | 412 } |
412 return GrFragmentProcessor::MulOutputByInputAlpha(inner); | 413 return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
413 } | 414 } |
414 | 415 |
415 #endif | 416 #endif |
OLD | NEW |