aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.h
Commit message (Collapse)AuthorAge
* gl programs rewriteGravatar joshualitt2014-10-09
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c Review URL: https://codereview.chromium.org/628633003
* Revert of gl programs rewrite (patchset #10 id:180001 of ↵Gravatar joshualitt2014-10-07
| | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/628633003/) Reason for revert: breaks angle bot Original issue's description: > gl programs rewrite > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/07a255310aca9f3e83bf741dc663a58818ad681c TBR=bsalomon@google.com,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/631183003
* gl programs rewriteGravatar joshualitt2014-10-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/628633003
* Split GrDrawState and GrOptDrawState into separate classes and remove base ↵Gravatar egdaniel2014-09-26
| | | | | | | | | | | | | class. Besides splitting the two classes, there are no logical changes here and mostly moving code around. BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/597323002
* Make GrDrawState and GrEffectStage use the pending io/exec ref mechanisms.Gravatar bsalomon2014-09-05
| | | | | | | | | BUG=skia:2889 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/542723004
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Separate GL path rendering state from GrGpuGL to GrGLPathRenderingGravatar kkinnunen2014-08-20
| | | | | | | | | | | | | | | | | | | Separate GL path rendering state from GrGpuGL to GrGLPathRendering. This makes GrGpuGL code simpler. The intention is that while GrGpuGL represents the global environment for GL, the GrGLPathRendering represents the global environment for path rendering extension. Add GrPathRendering, a base class for path rendering, and inherit GrGLPathRendering from that. Move the path rendering virtual functions from GrGpu to GrPathRendering. R=bsalomon@google.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/452823002
* Make comment ASCII in GrDrawTarget.hGravatar bsalomon2014-08-12
| | | | | | | | | | R=robertphillips@google.com TBR=robertphillips@google.com NOTRYS=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/458383004
* Add an opaqueness hint to GrDrawState.Gravatar bsalomon2014-08-08
| | | | | | | | | | Check it when deciding whether to combine draw states. R=egdaniel@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/446953002
* Enable gpu Debug markers if tracing category skia.gpu is enabledGravatar egdaniel2014-08-04
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/438023004
* Remove unused matrix param from GrContext/GrDrawTarget rect drawing functions.Gravatar bsalomon2014-08-04
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/441623005
* Remove support in the gpu to use hardware AA lines. Current code paths could ↵Gravatar egdaniel2014-07-29
| | | | | | | | | | | | | not reach this code and thus was never used. The blend opt flag kDisableBlend should now be able to be removed, however it is left in this CL and will removed in its own. BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/427823002
* Revert of Remove gpu support for willUseHWAALines. ↵Gravatar egdaniel2014-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/423943003/) Reason for revert: Breaking windows 7 compare gm's Original issue's description: > Remove gpu support for willUseHWAALines. > > By removing willUseHWAALines, we also no long reference the blend opt flag kDisableBlend so it has been removed > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e6dfba868c19b00562f8c733b9bf37dd4ec9e68c R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: egdaniel@google.com Review URL: https://codereview.chromium.org/430493003
* Remove gpu support for willUseHWAALines.Gravatar egdaniel2014-07-29
| | | | | | | | | | | By removing willUseHWAALines, we also no long reference the blend opt flag kDisableBlend so it has been removed BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/423943003
* Add a GrPathRange classGravatar cdalton2014-07-21
| | | | | | | | | | | | | | | Adds a GrPathRange object that represents a range of paths on the gpu. Updates GrDrawTarget::drawPaths and supporting code to use GrPathRange instead of an array of GrPath objects. Change-Id: I67845f3893cd4d955db947d699aa3733cbb081e0 BUG=skia: R=bsalomon@google.com, jvanverth@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/400713003
* Modify gpu debug markers to store gpu device markers when a flush occurs.Gravatar egdaniel2014-06-18
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/341583002
* Split GrResource into GrCacheable/GrGpuObjectGravatar commit-bot@chromium.org2014-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, an object needed to inherit from GrResource (and thus be a GPU object) in order to live in the GrResourceCache. That was a problem for caching items that weren't GPU objects themselves, but owned GPU objects. This change splits GrResource into two classes: 1. GrCacheable: The base class for objects that can live in the GrResourceCache. 2. GrGpuObject, which inherits from GrCacheable: The base class for objects that get tracked by GrGpu. This change is purely a refactor; there is no change in functionality. Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e BUG=skia: R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/251013002 git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
* Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAILGravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/257393004 git-svn-id: http://skia.googlecode.com/svn/trunk@14460 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use int rather than size_t for pathCount in GrDrawTarget::drawPathsGravatar commit-bot@chromium.org2014-03-28
| | | | | | | | | | | R=reed@google.com TBR=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/216293006 git-svn-id: http://skia.googlecode.com/svn/trunk@13988 2bbb7eff-a529-9590-31e7-b0007b416f81
* SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.hGravatar commit-bot@chromium.org2014-03-28
| | | | | | | | | | | BUG=skia: R=bsalomon@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/216503004 git-svn-id: http://skia.googlecode.com/svn/trunk@13982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add discard API to SkCanvas, plumb it to glDiscardFramebuffer()Gravatar commit-bot@chromium.org2014-03-28
| | | | | | | | | | | BUG=skia:2349 R=robertphillips@google.com, reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/211683002 git-svn-id: http://skia.googlecode.com/svn/trunk@13976 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-03-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13961 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add Gpu Tracing to GaneshGravatar commit-bot@chromium.org2014-03-25
| | | | | | | | | | | BUG=skia:2316 R=bsalomon@google.com, tomhudson@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/184443003 git-svn-id: http://skia.googlecode.com/svn/trunk@13936 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make it possible to draw multiple paths at once to a draw targetGravatar commit-bot@chromium.org2014-03-25
| | | | | | | | | | | | | | | | | | | | | | | Add interface to draw multiple paths in a single "command" to a draw target. Implement this interface in GrGpuGL with NVPR "instanced" calls. The instanced calls accept list of paths and list of transformations as their parameters. The transformations are at this moment expected to be 2d affine transformations, as the functions are called only for text rendering. This will be used when drawing fonts. Later it can be maybe be used in GrInOrderDrawBuffer to aggregate many draw calls into one instanced draw call, similar to drawing rects. R=jvanverth@google.com, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/209413006 git-svn-id: http://skia.googlecode.com/svn/trunk@13930 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add hooks for GL_EXT_debug_marker in gpuGravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/174123003 git-svn-id: http://skia.googlecode.com/svn/trunk@13538 2bbb7eff-a529-9590-31e7-b0007b416f81
* Apply hairline optimization only if the path renderer wants itGravatar commit-bot@chromium.org2013-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the decision to convert thin, non-hairline paths to hairline paths at the renderer level. The current nv_path_rendering implementation does not render hairlines. Rendering the hairlines with normal renderers cause unneccessary gl program changes, which is quite slow. Changes the behavior of non-nv_path_rendering paths to always perform the optimization if the shape ends up being painted by a renderer that wants the optimization. Previously the optimization was applied only when callgraph started with SkCanvas::drawPath. Applies the optimization for GrAAHairLineRenderer and GrDefaultPathRenderer. This changes gm results for dashing3_{msaa4,gpu} and drawlooper_msaa4. R=bsalomon@google.com, jvanverth@google.com, rmistry@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/38573007 git-svn-id: http://skia.googlecode.com/svn/trunk@12357 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Do not apply hairline optimization for paths if nv_path_rendering is ↵Gravatar bsalomon@google.com2013-11-08
| | | | | | | | | | used" This reverts commit r12185. Review URL: https://codereview.chromium.org/66813002 git-svn-id: http://skia.googlecode.com/svn/trunk@12187 2bbb7eff-a529-9590-31e7-b0007b416f81
* Do not apply hairline optimization for paths if nv_path_rendering is usedGravatar commit-bot@chromium.org2013-11-08
| | | | | | | | | | | | | | | | | | | | | | | | Do not convert thin, non-hairline paths to hairline paths if nv_path_rendering is used. The current nv_path_rendering implementation does not render hairlines. Rendering the hairlines with normal renderers cause unneccessary gl program changes, which is quite slow. Changes the behavior of non-nv_path_rendering paths to always perform the optimization if the shape ends up being painted by the path-drawing code (GrContext::drawPathInternal). Previously the optimization was applied only when callgraph started with SkCanvas::drawPath. This changes drawlooper_msaa4, dashing3_msaa4 and dashing3_gpu R=bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/38573007 git-svn-id: http://skia.googlecode.com/svn/trunk@12185 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add can-ignore-rect hint to clear callGravatar robertphillips@google.com2013-10-31
| | | | | | | | https://codereview.chromium.org/53823003/ git-svn-id: http://skia.googlecode.com/svn/trunk@12064 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | | since it triggers a warning"" This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d. BUG= Review URL: https://codereview.chromium.org/54603004 git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it ↵Gravatar reed@google.com2013-10-31
| | | | | | | | triggers a warning" This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497. git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | a warning BUG= R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org Review URL: https://codereview.chromium.org/51033004 git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Start cleaning up 64bit Win warningsGravatar robertphillips@google.com2013-10-14
| | | | | | | | https://codereview.chromium.org/27192003/ git-svn-id: http://skia.googlecode.com/svn/trunk@11764 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement stroking a path with nv_path_renderingGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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@11672 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement filling a path with nv_path_rendering coverGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | | | | | 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@11667 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GrNoncopyable by SkNoncopyable.Gravatar commit-bot@chromium.org2013-09-18
| | | | | | | | | | | | BUG=None TEST=None, no functional changes. R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23483042 git-svn-id: http://skia.googlecode.com/svn/trunk@11341 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrRefCnt.h in favor of SkRefCnt.hGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | | | | This removes GrRefCnt.h with all its tyepdefs and #defines and just switch them to the Sk* equivalents. GrSafeSetNull was promoted to SkSafeSetNull in SkRefCnt.h. BUG=None TEST=none, no functional changes. R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23904003 git-svn-id: http://skia.googlecode.com/svn/trunk@11151 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GR_DEBUG by SK_DEBUG.Gravatar commit-bot@chromium.org2013-08-28
| | | | | | | | | | | BUG=None R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23137022 git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-08-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10790 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GrAssert by SkASSERT.Gravatar tfarina@chromium.org2013-08-17
| | | | | | | | R=bsalomon@google.com Review URL: https://codereview.chromium.org/22850006 git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change Atlas recycling to track current flush count and recycle if Atlas not ↵Gravatar commit-bot@chromium.org2013-08-16
| | | | | | | | | | | | | used in current flush. BUG= R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23120004 git-svn-id: http://skia.googlecode.com/svn/trunk@10777 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace all instances of GrRect with SkRect.Gravatar commit-bot@chromium.org2013-07-17
| | | | | | | | | | | | 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@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace fixed-size array of effect stages in GrDrawState with two appendable ↵Gravatar bsalomon@google.com2013-06-13
| | | | | | | | | | arrays, one for color, one for coverage. R=robertphillips@google.com Review URL: https://codereview.chromium.org/16952006 git-svn-id: http://skia.googlecode.com/svn/trunk@9592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace GrDrawState::AutoDeviceCoordDraw with ↵Gravatar bsalomon@google.com2013-05-29
| | | | | | | | | | GrDrawState::AutoViewMatrixRestore::setIdentity(). s R=robertphillips@google.com Review URL: https://codereview.chromium.org/15780002 git-svn-id: http://skia.googlecode.com/svn/trunk@9331 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for using glCopyTexSubImage2D when possible to copy surfaces.Gravatar bsalomon@google.com2013-04-15
| | | | | | Review URL: https://codereview.chromium.org/13915011 git-svn-id: http://skia.googlecode.com/svn/trunk@8675 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrIODB record and play back copySurface.Gravatar bsalomon@google.com2013-04-09
| | | | | | Review URL: https://codereview.chromium.org/13581003 git-svn-id: http://skia.googlecode.com/svn/trunk@8574 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8529 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GrDrawTarget::copySurface.Gravatar bsalomon@google.com2013-04-03
| | | | | | Review URL: https://codereview.chromium.org/13428004 git-svn-id: http://skia.googlecode.com/svn/trunk@8510 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make drawRect preserve vertex attrib state and push/pop the geom sources.Gravatar bsalomon@google.com2013-04-02
| | | | | | | Also, add some balancing calls for setIndexSource*() Review URL: https://codereview.chromium.org/13468004 git-svn-id: http://skia.googlecode.com/svn/trunk@8499 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8477 2bbb7eff-a529-9590-31e7-b0007b416f81