skia2/include/gpu
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
..
gl Initial support for GL_NV_path_renering. Experimental, there are still some issues to resolve, set gyp variable skia_nv_path_rendering=1 or build flag GR_GL_USE_NV_PATH_RENDERING to enable. 2012-06-28 18:48:06 +00:00
GrAARectRenderer.h Version 2 of the Instance Counting system. This one simplifies the print out of information. 2012-06-13 18:54:08 +00:00
GrClip.h Make GrClipMaskManager configure the stencil and scissor on GrGpu 2012-06-21 19:58:20 +00:00
GrClipIterator.h Remove GrPath typedef 2012-04-27 15:52:53 +00:00
GrColor.h [GPU] Add explicit byte order and PM vs. UPM 8888 configs 2011-11-07 15:54:49 +00:00
GrConfig.h Remove gpu stats tracking 2012-06-06 18:21:18 +00:00
GrContext.h Rolling back r4034 (Proposed plumbing to propagate save & restore) 2012-07-03 19:12:29 +00:00
GrContextFactory.h Add placement new macros to SkPostConfig, call SkNEW* from Ganesh. 2012-07-09 20:17:56 +00:00
GrCustomStage.h Fix misnamed function in explanatory comment. 2012-07-09 19:07:41 +00:00
GrFontScaler.h plumb SkInstCnt to all subclasses of GrRefCnt 2012-06-26 20:16:17 +00:00
GrGlyph.h Remove GrPath typedef 2012-04-27 15:52:53 +00:00
GrInstanceCounter.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrKey.h plumb SkInstCnt to all subclasses of GrRefCnt 2012-06-26 20:16:17 +00:00
GrMatrix.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrNoncopyable.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrPaint.h Add GrPaint::*StageEnabled() and GrDrawState::stageEnabled() functions. 2012-06-25 17:27:28 +00:00
GrPoint.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrProgramStageFactory.h This patch implements the diffuse and specular lighting filters in Ganesh. 2012-07-11 16:01:22 +00:00
GrRect.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrRefCnt.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrRenderTarget.h Add GrSurface parent class above GrTexture & GrRenderTarget 2012-06-21 21:09:06 +00:00
GrResource.h Version 2 of the Instance Counting system. This one simplifies the print out of information. 2012-06-13 18:54:08 +00:00
GrSamplerState.h Fix memory leaks. 2012-06-19 15:27:50 +00:00
GrScalar.h Fixed Windows compiler complaints 2012-07-10 17:30:58 +00:00
GrSurface.h Add GrSurface parent class above GrTexture & GrRenderTarget 2012-06-21 21:09:06 +00:00
GrTextContext.h Un-trifurcate GrTextContext: get rid of Default and Batched subclasses, 2012-06-29 18:37:57 +00:00
GrTexture.h AutoScratchTexture can now release its texture and it will return to the texture cache when freed 2012-06-22 12:41:43 +00:00
GrTypes.h AutoScratchTexture can now release its texture and it will return to the texture cache when freed 2012-06-22 12:41:43 +00:00
GrUserConfig.h Remove old and GL-specific defines from GrUserConfig.h comments 2011-11-08 15:52:21 +00:00
SkGpuCanvas.h Remove comment related to removed function. 2011-09-01 15:55:31 +00:00
SkGpuDevice.h Rolling back r4034 (Proposed plumbing to propagate save & restore) 2012-07-03 19:12:29 +00:00
SkGr.h Move clientID into texture desc 2012-06-07 12:08:45 +00:00
SkGrPixelRef.h Moved SkGrTexturePixelRef to SkGrPixelRef 2012-06-28 20:59:13 +00:00
SkGrTexturePixelRef.h Partially rolled forward the SkGrPixelRef changes 2012-06-29 20:55:14 +00:00