DescriptionImplement optional Gaussian image blurs on saveLayer()/restore(). The caller creates an an SkBlurImageFilter, sets it on an SkPaint, passes that paint to saveLayer(), draws the primitives which are to be blurred, then restore(), which applies the blur. The blurs have separate sizes in the horizontal and vertical direction. This feature is GPU-only for now.
The original soft shadows code was refactored to allow it to be applied to an input GrTexture, and to apply X and Y sigma separately. In the soft shadows implementation, clipping is now done in the pre-downsampled coordinate space. The temporary textures used for downsampling and blurring are now allocated without stencil, which should save on VRAM. When doing one of the special blur modes in soft shadows, we also preserve the originally-drawn texture, saving a copy to a temporary.
At Brian's suggestion, this change also turns on GR_AGGRESSIVE_SHADER_OPTS in SampleApp, since it's also on in Chrome.
NB: Due to the clipping change, there are slight pixel differences on the blurs_gpu and shadows_gpu tests, so those will require rebaselining on all platforms, as will some of the WebKit layout tests (TBD).
Patch Set 1 #Patch Set 2 : Update to new SkPaint/SkImageFilter API #
Total comments: 3
Patch Set 3 : Change SkBlurImageFilter constructor as per review #Patch Set 4 : Moved drawing to drawDevice() to use save/restore; changed sample to GM #Patch Set 5 : Remove some commented-out includes #
MessagesTotal messages: 12
|