summaryrefslogtreecommitdiff
path: root/gpu/GrStencilAndCoverPathRenderer.cpp
AgeCommit message (Collapse)Author
2013-11-01Make GrContext cache the gpu pathscommit-bot@chromium.org
Creating paths for nv_path_rendering is costly. Try to reduce this cost by caching paths based on the SkPath "hash" (i.e. SkPathRef generation id) and stroke properties. Adds the paths to GrContext::fTextureCache instance. Later this should be renamed and the GrContext API should reflect the nature of the cache better. R=bsalomon@google.com, mtklein@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/26557003 git-svn-id: http://skia.googlecode.com/svn/trunk/src@12083 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09Implement stroking a path with nv_path_renderingcommit-bot@chromium.org
Initialize the path stroke properties in the GrGLPath constructor. Use StencilStrokePath and CoverStrokePath to stroke the path. The order of the GL calls is: 1. StencilFill, if needed 2. StencilStroke, if needed 2a. CoverStroke, if stroke was applied 2b. CoverFill, if stroke was not applied The reason for not pairing StencilFill + CoverFill, StencilStroke + CoverStroke is that Skia API does not allow separate fill and stroke color within one call. Covering the stroke bounding box should also cover the fill bounding box. Causes different rendering in gm/dashcubics due to different rendering algorithm. (?) (TODO: this should be resolved somehow.) R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/23440049 git-svn-id: http://skia.googlecode.com/svn/trunk/src@11672 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09Implement filling a path with nv_path_rendering covercommit-bot@chromium.org
Implement filling a path with nv_path_rendering cover functionality. The nv_path_rendering cover can be used if the fill is non-inverted and the draw operation does not require use of vertex shaders. Moves code for the inverted fill from GrStencilAndCoverPathRenderer down to GrGpuGL. R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/22686002 git-svn-id: http://skia.googlecode.com/svn/trunk/src@11667 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-17Replace uses of GrAssert by SkASSERT.tfarina@chromium.org
R=bsalomon@google.com Review URL: https://codereview.chromium.org/22850006 git-svn-id: http://skia.googlecode.com/svn/trunk/src@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-17Replace all instances of GrRect with SkRect.commit-bot@chromium.org
And remove the typedef in GrRect.h. The same with GrIRect. R=robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/19449002 git-svn-id: http://skia.googlecode.com/svn/trunk/src@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29Replace GrDrawState::AutoDeviceCoordDraw with ↵bsalomon@google.com
GrDrawState::AutoViewMatrixRestore::setIdentity(). s R=robertphillips@google.com Review URL: https://codereview.chromium.org/15780002 git-svn-id: http://skia.googlecode.com/svn/trunk/src@9331 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.bsalomon@google.com
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities. Review URL: https://codereview.chromium.org/12965018 git-svn-id: http://skia.googlecode.com/svn/trunk/src@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25Make GrDrawTarget::Caps ref counted and GrGLCaps derive from it.bsalomon@google.com
Also rename GrDrawTarget::getCaps() -> GrDrawTarget::caps(). Review URL: https://codereview.chromium.org/12843026 git-svn-id: http://skia.googlecode.com/svn/trunk/src@8364 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-17Follow up on the previous patch :sugoi@google.com
- Moved the SkStrokeRec class in its own file - Replaced SkStroke by SkStrokeRec in Ganesh - Moved path stroking to the Ganesh level in some cases (everytime it isn't required to do it directly in SkGpuDevice). PathEffect and MaskFilter still require path stroking at the SkGpuDevice for now. - Renamed static functions in SkPath with proper names * No functionality shold have changed with this patch. This is a step towards enabling Ganesh Path Renderers to decide whether or not to stroke the path rather than always receiving the stroked path as an input argument. BUG=chromium:135111 TEST=Try path rendering tests from the gm Review URL: https://codereview.appspot.com/6946072 git-svn-id: http://skia.googlecode.com/svn/trunk/src@6861 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10Modifications to GrPatherRenderer(Chain) interfaces to support clip mask ↵bsalomon@google.com
manager. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6904069 git-svn-id: http://skia.googlecode.com/svn/trunk/src@6741 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06As part of preliminary groundwork for a chromium fix, this changelist is ↵sugoi@google.com
deprecating GrPathFill so that SkPath::FillType is used everywhere in order to remove some code duplication between Skia and Ganesh. BUG=chromium:135111 TEST=Try path rendering tests from the gm Review URL: https://codereview.appspot.com/6875058 git-svn-id: http://skia.googlecode.com/svn/trunk/src@6693 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01Replace GrMatrix with SkMatrix.bsalomon@google.com
Review URL: https://codereview.appspot.com/6814067 git-svn-id: http://skia.googlecode.com/svn/trunk/src@6247 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01Remove GrScalar, replace with SkScalar.bsalomon@google.com
Review URL: https://codereview.appspot.com/6812064 git-svn-id: http://skia.googlecode.com/svn/trunk/src@6243 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-08Make GrDrawState::AutoRestoreViewMatrix handle sampler matrices.bsalomon@google.com
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6618065 git-svn-id: http://skia.googlecode.com/svn/trunk/src@5853 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-08Remove translate param from GrContext::drawPath (and subsequent calls).bsalomon@google.com
Review URL: https://codereview.appspot.com/6615062 git-svn-id: http://skia.googlecode.com/svn/trunk/src@5852 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28Hide GrDrawTarget::Caps's member varsbsalomon@google.com
Review URL: https://codereview.appspot.com/6499044 git-svn-id: http://skia.googlecode.com/svn/trunk/src@5328 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20Remove stage masksbsalomon@google.com
Review URL: http://codereview.appspot.com/6422047/ git-svn-id: http://skia.googlecode.com/svn/trunk/src@4688 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.tomhudson@google.com
TODO: unify with the placement new implementation in SkTemplatesPriv.h, once various issues there are overcome. reed@ should be taking the lead there. http://codereview.appspot.com/6384043/ git-svn-id: http://skia.googlecode.com/svn/trunk/src@4492 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-29Fix some NV path rendering issues with perspective and inverse pathsbsalomon@google.com
Review URL: http://codereview.appspot.com/6347050/ git-svn-id: http://skia.googlecode.com/svn/trunk/src@4403 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28Initial support for GL_NV_path_renering. Experimental, there are still some ↵bsalomon@google.com
issues to resolve, set gyp variable skia_nv_path_rendering=1 or build flag GR_GL_USE_NV_PATH_RENDERING to enable. http://codereview.appspot.com/6349049/ git-svn-id: http://skia.googlecode.com/svn/trunk/src@4390 2bbb7eff-a529-9590-31e7-b0007b416f81