Chromium Code Reviews| Index: src/core/SkLinearBitmapPipeline.cpp |
| diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp |
| index cf69e974ddb61b1ccf0e077d460678e648bfcfd4..91bcf5921eefae887a1e99c0ed74606b19fe95f5 100644 |
| --- a/src/core/SkLinearBitmapPipeline.cpp |
| +++ b/src/core/SkLinearBitmapPipeline.cpp |
| @@ -549,6 +549,9 @@ private: |
| GeneralSampler<SourceStrategy, Next> fSampler; |
| }; |
| +//////////////////////////////////////////////////////////////////////////////////////////////////// |
| +// Specialized Samplers |
| + |
| // RGBA8888UnitRepeatSrc - A sampler that takes advantage of the fact the the src and destination |
| // are the same format and do not need in transformations in pixel space. Therefore, there is no |
| // need to convert them to HiFi pixel format. |
| @@ -651,6 +654,9 @@ static SkLinearBitmapPipeline::SampleProcessorInterface* choose_pixel_sampler_ba |
| sampleStage->initStage<Sampler<PixelIndex8LRGB, Blender>>(next, srcPixmap); |
| } |
| break; |
| + case kRGBA_F16_SkColorType: |
| + sampleStage->initStage<Sampler<PixelHalfSRGB, Blender>>(next, srcPixmap); |
|
reed1
2016/04/14 17:25:27
why is "SRGB" part of this enum name?
herb_g
2016/04/14 17:44:59
Think-o on my part. Fixed.
|
| + break; |
| default: |
| SkFAIL("Not implemented. Unsupported src"); |
| break; |
| @@ -718,7 +724,7 @@ private: |
| Sk4f fPostAlpha; |
| }; |
| -static SkLinearBitmapPipeline::BlendProcessorInterface* choose_blender( |
| +static SkLinearBitmapPipeline::BlendProcessorInterface* choose_blender_for_shading( |
| SkAlphaType alphaType, |
| float postAlpha, |
| SkLinearBitmapPipeline::BlenderStage* blenderStage) { |
| @@ -730,6 +736,7 @@ static SkLinearBitmapPipeline::BlendProcessorInterface* choose_blender( |
| } |
| return blenderStage->get(); |
| } |
| + |
| } // namespace |
| //////////////////////////////////////////////////////////////////////////////////////////////////// |
| @@ -768,7 +775,7 @@ SkLinearBitmapPipeline::SkLinearBitmapPipeline( |
| // As the stages are built, the chooser function may skip a stage. For example, with the |
| // identity matrix, the matrix stage is skipped, and the tilerStage is the first stage. |
| - auto blenderStage = choose_blender(alphaType, postAlpha, &fBlenderStage); |
| + auto blenderStage = choose_blender_for_shading(alphaType, postAlpha, &fBlenderStage); |
| auto samplerStage = choose_pixel_sampler(blenderStage, filterQuality, srcPixmap, &fSampleStage); |
| auto tilerStage = choose_tiler(samplerStage, dimensions, xTile, yTile, |
| filterQuality, dx, &fTileStage); |