skia2/gyp/effects.gyp
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

99 lines
3.8 KiB
Python

{
'targets': [
{
'target_name': 'effects',
'type': 'static_library',
'include_dirs': [
'../include/config',
'../include/core',
'../include/effects',
'../include/gpu',
'../src/gpu',
],
'sources': [
'../include/effects/Sk1DPathEffect.h',
'../include/effects/Sk2DPathEffect.h',
'../include/effects/SkAvoidXfermode.h',
'../include/effects/SkArithmeticMode.h',
'../include/effects/SkBlurDrawLooper.h',
'../include/effects/SkBlurImageFilter.h',
'../include/effects/SkBlurMaskFilter.h',
'../include/effects/SkColorMatrix.h',
'../include/effects/SkColorMatrixFilter.h',
'../include/effects/SkCornerPathEffect.h',
'../include/effects/SkDashPathEffect.h',
'../include/effects/SkDiscretePathEffect.h',
'../include/effects/SkDrawExtraPathEffect.h',
'../include/effects/SkEmbossMaskFilter.h',
'../include/effects/SkGradientShader.h',
'../include/effects/SkGroupShape.h',
'../include/effects/SkKernel33MaskFilter.h',
'../include/effects/SkLayerDrawLooper.h',
'../include/effects/SkLayerRasterizer.h',
'../include/effects/SkLightingImageFilter.h',
'../include/effects/SkMorphologyImageFilter.h',
'../include/effects/SkPaintFlagsDrawFilter.h',
'../include/effects/SkPixelXorXfermode.h',
'../include/effects/SkPorterDuff.h',
'../include/effects/SkRectShape.h',
'../include/effects/SkStippleMaskFilter.h',
'../include/effects/SkTableColorFilter.h',
'../include/effects/SkTableMaskFilter.h',
'../include/effects/SkTransparentShader.h',
'../src/effects/Sk1DPathEffect.cpp',
'../src/effects/Sk2DPathEffect.cpp',
'../src/effects/SkAvoidXfermode.cpp',
'../src/effects/SkArithmeticMode.cpp',
'../src/effects/SkBitmapCache.cpp',
'../src/effects/SkBitmapCache.h',
'../src/effects/SkBlurDrawLooper.cpp',
'../src/effects/SkBlurMask.cpp',
'../src/effects/SkBlurMask.h',
'../src/effects/SkBlurImageFilter.cpp',
'../src/effects/SkBlurMaskFilter.cpp',
'../src/effects/SkClampRange.cpp',
'../src/effects/SkClampRange.h',
'../src/effects/SkColorFilters.cpp',
'../src/effects/SkColorMatrix.cpp',
'../src/effects/SkColorMatrixFilter.cpp',
'../src/effects/SkCornerPathEffect.cpp',
'../src/effects/SkDashPathEffect.cpp',
'../src/effects/SkDiscretePathEffect.cpp',
'../src/effects/SkEmbossMask.cpp',
'../src/effects/SkEmbossMask.h',
'../src/effects/SkEmbossMask_Table.h',
'../src/effects/SkEmbossMaskFilter.cpp',
'../src/effects/SkGradientShader.cpp',
'../src/effects/SkGroupShape.cpp',
'../src/effects/SkKernel33MaskFilter.cpp',
'../src/effects/SkLayerDrawLooper.cpp',
'../src/effects/SkLayerRasterizer.cpp',
'../src/effects/SkLightingImageFilter.cpp',
'../src/effects/SkMorphologyImageFilter.cpp',
'../src/effects/SkPaintFlagsDrawFilter.cpp',
'../src/effects/SkPixelXorXfermode.cpp',
'../src/effects/SkPorterDuff.cpp',
'../src/effects/SkRadialGradient_Table.h',
'../src/effects/SkRectShape.cpp',
'../src/effects/SkStippleMaskFilter.cpp',
'../src/effects/SkTableColorFilter.cpp',
'../src/effects/SkTableMaskFilter.cpp',
'../src/effects/SkTestImageFilters.cpp',
'../src/effects/SkTransparentShader.cpp',
],
'direct_dependent_settings': {
'include_dirs': [
'../include/effects',
],
},
},
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2: