skia2/include/effects
senorblanco@chromium.org 894790d77c This patch implements the diffuse and specular lighting filters in Ganesh.
There are three light types for each:  distant, point and spot, whose code
generation lives in a GrGLLight class hierarchy.  This similar to the CPU
implementation, where each light type provides a function to compute the vector
from the surface plane to the light (surfaceToLight) and to compute the light
colour (emitLightColour).  Instead of templated member functions, as in the CPU
implementation, these are virtual functions to emit the light-specific GLSL
code.

All of the code for the GPU path lives in the same file as that for the CPU
path, SkLightingImageFilter.cpp.  In order to provide Ganesh a hook to access
it, SkImageFilter now has a asNewCustomStage() virtual, which allows an image
filter to return a GrCustomStage representing that filter.

Note that this patch does not handle the border conditions correctly (the
[top|bottom][Left|Right]Normal() functions in the CPU implementation).  That
will come in a future patch.

Review URL: http://codereview.appspot.com/6345081/



git-svn-id: http://skia.googlecode.com/svn/trunk@4535 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 16:01:22 +00:00
..
Sk1DPathEffect.h Change patheffect to take a (new) StrokeRec object, which encapsulates the fill 2012-05-25 01:04:12 +00:00
Sk2DPathEffect.h Change patheffect to take a (new) StrokeRec object, which encapsulates the fill 2012-05-25 01:04:12 +00:00
SkArithmeticMode.h add first cut at arithmetic mode 2011-12-10 19:36:56 +00:00
SkAvoidXfermode.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkBlurDrawLooper.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkBlurImageFilter.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkBlurMaskFilter.h Cleanup Macros arround static initializers for SkFlattenable. 2012-03-23 19:00:34 +00:00
SkColorMatrix.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
SkColorMatrixFilter.h remove mutable apis on SkColorMatrixFilter, must use constructor. 2012-06-04 19:07:41 +00:00
SkCornerPathEffect.h Change patheffect to take a (new) StrokeRec object, which encapsulates the fill 2012-05-25 01:04:12 +00:00
SkDashPathEffect.h Change patheffect to take a (new) StrokeRec object, which encapsulates the fill 2012-05-25 01:04:12 +00:00
SkDiscretePathEffect.h Change patheffect to take a (new) StrokeRec object, which encapsulates the fill 2012-05-25 01:04:12 +00:00
SkDrawExtraPathEffect.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
SkEmbossMaskFilter.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkGradientShader.h Add new gradient to support HTML Canvas2D two-point-radial-gradient. Ours is 2012-06-06 20:31:56 +00:00
SkGroupShape.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkKernel33MaskFilter.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkLayerDrawLooper.h Added Inst counting to SkFlattenable-derived classes 2012-06-27 14:03:26 +00:00
SkLayerRasterizer.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkLightingImageFilter.h This patch implements the diffuse and specular lighting filters in Ganesh. 2012-07-11 16:01:22 +00:00
SkMorphologyImageFilter.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkPaintFlagsDrawFilter.h Fix a bunch of Coverity defects - class members not initialized in the constructor. 2012-03-28 20:29:38 +00:00
SkPixelXorXfermode.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkPorterDuff.h Update files to use SK_BUILD_FOR_ANDROID. 2011-11-08 19:00:26 +00:00
SkRectShape.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkStippleMaskFilter.h Fix for compiler error in r4154 2012-06-05 13:12:53 +00:00
SkTableColorFilter.h Cleanup Macros arround static initializers for SkFlattenable. 2012-03-23 19:00:34 +00:00
SkTableMaskFilter.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkTestImageFilters.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
SkTransparentShader.h Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00