894790d77c
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 |
||
---|---|---|
.. | ||
Sk1DPathEffect.h | ||
Sk2DPathEffect.h | ||
SkArithmeticMode.h | ||
SkAvoidXfermode.h | ||
SkBlurDrawLooper.h | ||
SkBlurImageFilter.h | ||
SkBlurMaskFilter.h | ||
SkColorMatrix.h | ||
SkColorMatrixFilter.h | ||
SkCornerPathEffect.h | ||
SkDashPathEffect.h | ||
SkDiscretePathEffect.h | ||
SkDrawExtraPathEffect.h | ||
SkEmbossMaskFilter.h | ||
SkGradientShader.h | ||
SkGroupShape.h | ||
SkKernel33MaskFilter.h | ||
SkLayerDrawLooper.h | ||
SkLayerRasterizer.h | ||
SkLightingImageFilter.h | ||
SkMorphologyImageFilter.h | ||
SkPaintFlagsDrawFilter.h | ||
SkPixelXorXfermode.h | ||
SkPorterDuff.h | ||
SkRectShape.h | ||
SkStippleMaskFilter.h | ||
SkTableColorFilter.h | ||
SkTableMaskFilter.h | ||
SkTestImageFilters.h | ||
SkTransparentShader.h |