aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLPathRendering.cpp
Commit message (Collapse)AuthorAge
* sksl: Add a "sk_Clockwise" built-inGravatar Chris Dalton2018-07-27
| | | | | | | | | | | This allows us to identify clockwise-winding triangles, in terms of Skia device space, in all backends and with all render target origins. Bug: skia: Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21 Reviewed-on: https://skia-review.googlesource.com/142662 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Revert "Some scissor state cleanup."Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a219419c9d76432dca74494b611ff1f59086d139. Reason for revert: breaking things Original change's description: > Some scissor state cleanup. > > Separate flushing the enablement of scissor from the rect in GrGLGpu. > > Move GrPipeline::ScissorState to a global enum and use more broadly. > Rename to GrScissorTest to avoid name conflict with existing > GrScissorState. > > Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 > Reviewed-on: https://skia-review.googlesource.com/137395 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/138900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Some scissor state cleanup.Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | Separate flushing the enablement of scissor from the rect in GrGLGpu. Move GrPipeline::ScissorState to a global enum and use more broadly. Rename to GrScissorTest to avoid name conflict with existing GrScissorState. Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 Reviewed-on: https://skia-review.googlesource.com/137395 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Refactor GrPipeline dynamic state.Gravatar Brian Salomon2018-06-26
| | | | | | | | | | | | | | | | | Remove scissor rect from GrPipeline. Draws can specify "fixed dynamic state" which doesn't use the dynamism at all or can specify dynamic state arrays with an entry per GrMesh. When we state other than scissor rects this will allow the caller to use a mix of truly dynamic and fixed dynamic state. So a caller that only has dynamic scissor rects doesn't need to store its remaining unvarying state in an array. Change-Id: I8fcc07eb600c72a26cc712b185755c2116021a8a Reviewed-on: https://skia-review.googlesource.com/137223 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Put GrPrimitiveProcessor/GrGeometryProcessor before GrPipeline in param lists.Gravatar Brian Salomon2018-06-25
| | | | | | | | | | | We were inconsistent about which order these were in. Having the processor first will make the parameter order more logical for an upcoming change. Also, the primitive processor comes logically before the pipeline. Change-Id: I3968c5e4e6dff01f9c4ad311eb1795b3c7580ff5 Reviewed-on: https://skia-review.googlesource.com/137228 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove path ranges from gpu.Gravatar Ben Wagner2018-03-29
| | | | | | | | | | These appear to have been added to handle glyph paths with nvpr and no longer appear to be used. Change-Id: Id75e2e85ab837a5808e7641873d217c844cd827c Reviewed-on: https://skia-review.googlesource.com/117103 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Track dirty rects on GrRenderTargets in native space rather than origin-relativeGravatar Brian Salomon2018-02-09
| | | | | | | Change-Id: Icccf2fcb5d468696c42c5a0ccf405e30e5e9bc65 Reviewed-on: https://skia-review.googlesource.com/105980 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Make StencilPathArgs hold a GrRenderTargetProxy (rather than a GrRenderTarget)Gravatar Robert Phillips2017-07-27
| | | | | | | | | Again, this will be useful when GrSurface does not have a origin field. Change-Id: I0c4ef5b441eaf38f3489e8631aced11b11fdb6ac Reviewed-on: https://skia-review.googlesource.com/27540 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* reduce code size in GrGLTestInterface.o and GrGLAssembleInterface.oGravatar Mike Klein2017-07-21
| | | | | | | | | | | | | | All these std::function instantiations fill the object files up with almost 1MB of boilerplate generated code. I think we can do better by implementing GrGLFunction as its own std::function-like type with much less overhead, bringing the total object file size down to about 200K. This reduces DM from 28780344 to 27726144 on my Mac, a touch above 1MB. Change-Id: I219a86737d1dfb8b68e4eb47b51a8a98b18ff282 Reviewed-on: https://skia-review.googlesource.com/20551 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* sk_sp-ify GrResourceProvider some moreGravatar Robert Phillips2017-06-05
| | | | | | | | | | I believe this addresses the concerns of this particular bug (although more remains to be done) Bug: skia:5327 Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913 Reviewed-on: https://skia-review.googlesource.com/18599 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove support for GLs without separate stencil.Gravatar Brian Salomon2017-05-08
| | | | | | | | | | | As a consequence we no longer need GrDrawFace. This effectively raises the minimum bar for non-ES OpenGL to 2.0 as there is no extension that adds the GL 2.0 separate stencil functionality. GL_ATI_separate_stencil is close but it does not have glStencilMaskSeparate. Bug: skia: Change-Id: I36d17a69400c8beeacb6dab8d8c5c3317814cfe4 Reviewed-on: https://skia-review.googlesource.com/15603 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Conditionally insert gl_PointSize into shaders.Gravatar bsalomon2016-09-21
| | | | | | | BUG=chromium:648816 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358843002 Review-Url: https://codereview.chromium.org/2358843002
* Remove DrawFace enum from GrPipelineBuilderGravatar robertphillips2016-07-21
| | | | | | | | | This gets GrPipelineBuilder.h out of the headers GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002 Committed: https://skia.googlesource.com/skia/+/da152ebb032c61bb2561bbb3e9a78037ad174d34 Review-Url: https://codereview.chromium.org/2165283002
* Revert of Remove DrawFace enum from GrPipelineBuilder (patchset #2 id:20001 ↵Gravatar robertphillips2016-07-21
| | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/2165283002/ ) Reason for revert: No Vulkan bot in CQ :( Original issue's description: > Remove DrawFace enum from GrPipelineBuilder > > This gets GrPipelineBuilder.h out of the headers > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002 > > Committed: https://skia.googlesource.com/skia/+/da152ebb032c61bb2561bbb3e9a78037ad174d34 TBR=bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2167193002
* Remove DrawFace enum from GrPipelineBuilderGravatar robertphillips2016-07-21
| | | | | | | | This gets GrPipelineBuilder.h out of the headers GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002 Review-Url: https://codereview.chromium.org/2165283002
* Eliminate special case nvpr batch handlingGravatar cdalton2016-05-12
| | | | | | | | | | Removes drawPathBatch methods from GrDrawTarget and GrDrawContext, and integrates nvpr batches in with all the other batches. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966763002 Review-Url: https://codereview.chromium.org/1966763002
* Separate user and raw stencil settingsGravatar cdalton2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | Adds a new GrUserStencilSettings class that describes in abstract terms how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. When the GrPipeline is finalized, the user stencil settings are then translated into concrete GrStencilSettings. At this point, GrClipMaskManager only needs to tell the GrAppliedClip whether or not there is a stencil clip. It does not need to modify stencil settings and GrPipelineBuilder does not need AutoRestoreStencil. This is one step of the stencil overhaul. In the future it will also allow us to clean up the special case handling for nvpr and the stateful fClipMode member of GrClipMaskManager. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37 Review-Url: https://codereview.chromium.org/1962243002
* Revert of Separate user and raw stencil settings (patchset #8 id:140001 of ↵Gravatar robertphillips2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1962243002/ ) Reason for revert: This seems to be breaking nanobench on the Windows bots with: Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION GrDrawTarget::stencilPath +c7 GrStencilAndCoverPathRenderer::onDrawPath +fd GrDrawContext::internalDrawPath +509 GrDrawContext::drawPath +223 GrBlurUtils::drawPathWithMaskFilter +250 SkGpuDevice::drawPath +2ea SkCanvas::onDrawPath +2e3 SkRecordDraw +2e6 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkRecordDraw +2e6 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkRecordDraw +261 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkMultiPictureDraw::draw +bf SKPBench::drawMPDPicture +1e0 SKPBench::onDraw +34 Benchmark::draw +32 time +92 setup_gpu_bench +6e nanobench_main +77b Original issue's description: > Separate user and raw stencil settings > > Adds a new GrUserStencilSettings class that describes in abstract terms > how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, > etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. > When the GrPipeline is finalized, the user stencil settings are then > translated into concrete GrStencilSettings. > > At this point, GrClipMaskManager only needs to tell the GrAppliedClip > whether or not there is a stencil clip. It does not need to modify > stencil settings and GrPipelineBuilder does not need > AutoRestoreStencil. > > This is one step of the stencil overhaul. In the future it will also > allow us to clean up the special case handling for nvpr and the > stateful fClipMode member of GrClipMaskManager. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 > > Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37 TBR=bsalomon@google.com,cdalton@nvidia.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/1969693003
* Separate user and raw stencil settingsGravatar cdalton2016-05-10
| | | | | | | | | | | | | | | | | | | | | | Adds a new GrUserStencilSettings class that describes in abstract terms how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. When the GrPipeline is finalized, the user stencil settings are then translated into concrete GrStencilSettings. At this point, GrClipMaskManager only needs to tell the GrAppliedClip whether or not there is a stencil clip. It does not need to modify stencil settings and GrPipelineBuilder does not need AutoRestoreStencil. This is one step of the stencil overhaul. In the future it will also allow us to clean up the special case handling for nvpr and the stateful fClipMode member of GrClipMaskManager. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 Review-Url: https://codereview.chromium.org/1962243002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002
* Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of ↵Gravatar bsalomon2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1957363002/ ) Reason for revert: Breaking some bots Original issue's description: > Replace GrStrokeInfo with GrStyle. > > A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 > > Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f TBR=egdaniel@google.com,robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1967513002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Review-Url: https://codereview.chromium.org/1957363002
* Revert of Batch multiple single NVPR draw paths to instanced draws (patchset ↵Gravatar stephana2016-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #5 id:80001 of https://codereview.chromium.org/1908433002/ ) Reason for revert: This causes what looks like significantly wrong results. Here is an example: https://gold.skia.org/diff?test=stroke-fill&left=cb47dc2cabbad7d146aedaac199ebace&top=2c6e65d597c574e3bb170a19ca9634c6 Original issue's description: > Batch multiple single NVPR draw paths to instanced draws > > Batch multiple single NVPR draw paths to instanced draws. > A draw path batch can be combined to other batch if the > batches do not overlap and have same draw characteristics. > > Join the batches in linked list and flatten the list to a > path list during draw time. > > Replace GrPathRendering::drawPath with GrPathRendering::drawPaths. > > Perf changes ARM, Shield TV device, Tegra X1 GPU: > desk_chalkboard.skp_1 21.5ms -> 17.8ms 0.83x > desk_mapsvg.skp_1 7.49ms -> 6.18ms 0.82x > Others results are more volatile. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908433002 > > Committed: https://skia.googlesource.com/skia/+/3c33c389e9f8d14d86756ea1ddeba2097f31ad22 TBR=joshualitt@chromium.org,bsalomon@google.com,kkinnunen@nvidia.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1919843002
* Batch multiple single NVPR draw paths to instanced drawsGravatar kkinnunen2016-04-25
| | | | | | | | | | | | | | | | | | | Batch multiple single NVPR draw paths to instanced draws. A draw path batch can be combined to other batch if the batches do not overlap and have same draw characteristics. Join the batches in linked list and flatten the list to a path list during draw time. Replace GrPathRendering::drawPath with GrPathRendering::drawPaths. Perf changes ARM, Shield TV device, Tegra X1 GPU: desk_chalkboard.skp_1 21.5ms -> 17.8ms 0.83x desk_mapsvg.skp_1 7.49ms -> 6.18ms 0.82x Others results are more volatile. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908433002 Review URL: https://codereview.chromium.org/1908433002
* Add GrContext::releaseAndAbandonContext()Gravatar bsalomon2016-04-01
| | | | | | | | | Like abandonContext() this disconnects the GrContext from the underlying 3D API. However, unlike abandonContext it first frees all allocated GPU resources. BUG=skia:5142 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852733002 Review URL: https://codereview.chromium.org/1852733002
* Update how we send draws to gpu backend to reduce state setting.Gravatar egdaniel2016-03-17
| | | | | | | | | The main change here is that we pull primitive type off of the vertices, we set the gpu state on gpu once per pipeline/prim proc draw batch, and we create the ProgramDescriptor only for the Cache/ProgramBuilder. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806983002 Review URL: https://codereview.chromium.org/1806983002
* Avoid drawing NVPR DIF text when text size is 0Gravatar kkinnunen2016-03-04
| | | | | | | | | | | Avoid drawing text when using NVPR and device independent fonts. The drawing calculations cause division by zero and produce NaNs to transforms (due to fTextInverseRatio). Reproed by top25desk_twitter.skp as well as the added testcase. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1760163002 Review URL: https://codereview.chromium.org/1760163002
* Add support for GL_EXT_raster_multisampleGravatar cdalton2016-02-05
| | | | | | | | | | | Updates the GrGLGpu to call glRasterSamplesEXT when multisample is enabled for a mixed sampled render target, but the stencil test is not active. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666563003 Review URL: https://codereview.chromium.org/1666563003
* Avoid updating glPathStencilFunc unless it changesGravatar kkinnunen2016-01-25
| | | | | | | Avoid updating glPathStencilFunc unless it changes. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1619623005 Review URL: https://codereview.chromium.org/1619623005
* Simplify path allocation, clean up resources correctlyGravatar kkinnunen2016-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify path id allocation in NVPR backend. Instead of using an AVL tree of path id ranges for the first 65535 ids, use just a simple stategy of overallocation and "bump index". Fixes the bug where previously overallocated ids were not deleted. The advantage is that the implementation is simple and all allocations go through overallocation, not just the first 65535 of the 1-range allocations. Removes the logic where paths were cleared with setting path data to null instead of deleting the whole path. Now deleted paths are just deleted normally. These operations should have equivalent performance on command buffer. Deleting the path should enable the driver to do more maintainance. Removes the GLNameAllocator, as it was only used for paths. In order for it to be used for other IDs, it probably would need to be re-written to support cleanup and arbitrary ranges. Also, the interface would probably need to be changed to not requiring the block to be allocated before it could be managed by the structure. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1150243003 Review URL: https://codereview.chromium.org/1150243003
* Revert of Enable stencil clipping in mixed sampled render targets (patchset ↵Gravatar cdalton2015-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | #6 id:100001 of https://codereview.chromium.org/1232103002/ ) Reason for revert: Co-centered sample locations are not needed to do stencil clip with mixed samples Original issue's description: > Implement stencil clipping in mixed sampled render targets > > This change enables multisampled clipping for mixed sampled > render targets. Previously clipping in mixed samples config > behaved the same as in the gpu config. > > In order to retrofit non-MSAA draw methods, programmable sample > locations are used in order to colocate all samples at (0.5, 0.5). > Requires support for NV_sample_locations. > > BUG=skia:4399 > > Committed: > https://skia.googlesource.com/skia/+/3e77ba96d56d15db30ac6d8ccb900e30aafcbb16 BUG=skia: Review URL: https://codereview.chromium.org/1415873011
* Revert of Fix mixed samples stencil clip (patchset #5 id:80001 of ↵Gravatar cdalton2015-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1431593006/ ) Reason for revert: Co-centered sample locations are not needed to do stencil clip with mixed samples. Original issue's description: > Fix mixed samples stencil clip > > Fixes rendering bugs and nondeterminism in gm. > > Before, mixed samples stencil clip would try to infer whether the draw > wanted co-centered sample locations from within GrGLGpu, which caused > various errors. This change reworks it so the draw itself can request > the co-centered sample locations when it knows it will need them. > > Also reduces framebuffer binds by moving the code that enables > GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS into flushRenderTarget. > > Committed: https://skia.googlesource.com/skia/+/14184d5567b58085b6d8a6375796d405056f7f73 TBR=bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1407063011
* Fix mixed samples stencil clipGravatar cdalton2015-11-09
| | | | | | | | | | | | | | Fixes rendering bugs and nondeterminism in gm. Before, mixed samples stencil clip would try to infer whether the draw wanted co-centered sample locations from within GrGLGpu, which caused various errors. This change reworks it so the draw itself can request the co-centered sample locations when it knows it will need them. Also reduces framebuffer binds by moving the code that enables GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS into flushRenderTarget. Review URL: https://codereview.chromium.org/1431593006
* Create GLSL base class for ProgramDataManagerGravatar egdaniel2015-10-28
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1428543003
* Implement stencil clipping in mixed sampled render targetsGravatar vbuzinov2015-09-30
| | | | | | | | | | | | | | This change enables multisampled clipping for mixed sampled render targets. Previously clipping in mixed samples config behaved the same as in the gpu config. In order to retrofit non-MSAA draw methods, programmable sample locations are used in order to colocate all samples at (0.5, 0.5). Requires support for NV_sample_locations. BUG=skia:4399 Review URL: https://codereview.chromium.org/1232103002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Implement support for CHROMIUM_path_rendering pseudo extensionGravatar kkinnunen2015-07-14
| | | | | | | | | | | | | | | | Implement support for path rendering in Chromium through CHROMIUM_path_rendering pseudo extension. The extension defines a new pseudo-gl function, BindFragmentInputLocation. This behaves similarly to the BindUniformLocation pseudo-gl function. The idea is to assign fragment input location to a fragment input before linking the program. BUG=chromium:344330 Committed: https://skia.googlesource.com/skia/+/eeef46d181f9f8db388ecea81df699fc1b3c9280 Review URL: https://codereview.chromium.org/1192663002
* Revert of Implement support for CHROMIUM_path_rendering pseudo extension ↵Gravatar jvanverth2015-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #4 id:60001 of https://codereview.chromium.org/1192663002/) Reason for revert: DEPS roll failing Original issue's description: > Implement support for CHROMIUM_path_rendering pseudo extension > > Implement support for path rendering in Chromium through > CHROMIUM_path_rendering pseudo extension. > > The extension defines a new pseudo-gl function, > BindFragmentInputLocation. This behaves similarly to the > BindUniformLocation pseudo-gl function. The idea is to assign fragment > input location to a fragment input before linking the program. > > BUG=chromium:344330 > > Committed: https://skia.googlesource.com/skia/+/eeef46d181f9f8db388ecea81df699fc1b3c9280 TBR=bsalomon@google.com,joshualitt@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:344330 Review URL: https://codereview.chromium.org/1223673002
* Implement support for CHROMIUM_path_rendering pseudo extensionGravatar kkinnunen2015-07-02
| | | | | | | | | | | | | | Implement support for path rendering in Chromium through CHROMIUM_path_rendering pseudo extension. The extension defines a new pseudo-gl function, BindFragmentInputLocation. This behaves similarly to the BindUniformLocation pseudo-gl function. The idea is to assign fragment input location to a fragment input before linking the program. BUG=chromium:344330 Review URL: https://codereview.chromium.org/1192663002
* Cleanup legacy NVPR-related definitionsGravatar kkinnunen2015-07-01
| | | | | | | | | | | | | | | | | | | | | | | | Fixed-function NVPR codepaths were removed a while ago. Only NVPR API version 1.3 (PathFragmentInputGen) was left working. Remove backwards-compatibility code that was left behind. Remove some NVPR API function typedefs that were left from initial commits. Remove PathCoords function pointer from GrGLInterface, it has never been called and causes problems in the future, since it will not be implemented in the Chromium pseudo extension. Avoid failing interface creation even if nvprmsaaXX config is requested but the driver is not recent enough. The SAN bots have old driver, but try to run nvprmsaa16 configs. Instead, print out a warning. Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e Committed: https://skia.googlesource.com/skia/+/e35b5d99d8dfcc6b2be844df28cba47436380809 Review URL: https://codereview.chromium.org/1177243004
* Revert of Cleanup legacy NVPR-related definitions (patchset #4 id:60001 of ↵Gravatar jvanverth2015-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1177243004/) Reason for revert: Breaks the Ubuntu *SAN bots. Original issue's description: > Cleanup legacy NVPR-related definitions > > Fixed-function NVPR codepaths were removed a while ago. Only NVPR API > version 1.3 (PathFragmentInputGen) was left working. Remove > backwards-compatibility code that was left behind. > > Remove some NVPR API function typedefs that were left from initial > commits. > > Remove PathCoords function pointer from GrGLInterface, it has > never been called and causes problems in the future, since it will > not be implemented in the Chromium pseudo extension. > > Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e > > Committed: https://skia.googlesource.com/skia/+/e35b5d99d8dfcc6b2be844df28cba47436380809 TBR=joshualitt@google.com,cdalton@nvidia.com,bsalomon@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1219663005
* Cleanup legacy NVPR-related definitionsGravatar kkinnunen2015-06-30
| | | | | | | | | | | | | | | | | Fixed-function NVPR codepaths were removed a while ago. Only NVPR API version 1.3 (PathFragmentInputGen) was left working. Remove backwards-compatibility code that was left behind. Remove some NVPR API function typedefs that were left from initial commits. Remove PathCoords function pointer from GrGLInterface, it has never been called and causes problems in the future, since it will not be implemented in the Chromium pseudo extension. Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e Review URL: https://codereview.chromium.org/1177243004
* Revert of Cleanup legacy NVPR-related definitions (patchset #3 id:40001 of ↵Gravatar fmalita2015-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1177243004/) Reason for revert: Broke the GPU SAN bots: https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/779/steps/dm/logs/stdio Original issue's description: > Cleanup legacy NVPR-related definitions > > Fixed-function NVPR codepaths were removed a while ago. Only NVPR API > version 1.3 (PathFragmentInputGen) was left working. Remove > backwards-compatibility code that was left behind. > > Remove some NVPR API function typedefs that were left from initial > commits. > > Remove PathCoords function pointer from GrGLInterface, it has > never been called and causes problems in the future, since it will > not be implemented in the Chromium pseudo extension. > > Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e TBR=joshualitt@google.com,cdalton@nvidia.com,bsalomon@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1206333003
* Cleanup legacy NVPR-related definitionsGravatar kkinnunen2015-06-25
| | | | | | | | | | | | | | | Fixed-function NVPR codepaths were removed a while ago. Only NVPR API version 1.3 (PathFragmentInputGen) was left working. Remove backwards-compatibility code that was left behind. Remove some NVPR API function typedefs that were left from initial commits. Remove PathCoords function pointer from GrGLInterface, it has never been called and causes problems in the future, since it will not be implemented in the Chromium pseudo extension. Review URL: https://codereview.chromium.org/1177243004
* Stop using the NVPR glyph loading functionalityGravatar kkinnunen2015-06-23
| | | | | | Remove the NVPR glyph loading functionality. A bit risky feature. Review URL: https://codereview.chromium.org/1176113008
* don't rely on fonts having a streamGravatar caryclark2015-06-15
| | | | | | | | | | Portable fonts don't have streams, so expect the stream open to fail. R=bungeman@google.com TBR=cdalton@nvidia.com Review URL: https://codereview.chromium.org/1185803003
* Refactor GrGpu path rendering functions to GrPathRenderingGravatar kkinnunen2015-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrGpu, GrGLGpu, GrPathRendering, GrGLPathRendering all duplicated each others' path rendering related member functions. Make GrPathRending the logical extension of GrGpu by removing the methods from GrGpu. Similarly to the GL variants. Changes includes and forward declarations due to removing GrDrawTarget.h include from GrGpu.h. This was necessary due to GrDrawTarget.h including GrPathRendering.h, and now GrPathRendering.h includes GrGpu.h. (Also GrGpu.h does not need GrDrawTarget.h anymore). Very slight runtime improvement on x86_64: desk_fontwipe.skp_1 836us -> 841us 1.01x desk_silkfinance.skp_1 2.01ms -> 2.01ms 1x desk_forecastio.skp_1 7.03ms -> 7.05ms 1x desk_weather.skp_1 3.74ms -> 3.74ms 1x desk_twitter.skp_1 8.02ms -> 8.01ms 1x desk_mapsvg.skp_1 5.24ms -> 5.23ms 1x desk_pokemonwiki.skp_1 7.06ms -> 7.03ms 1x desk_sfgate.skp_1 3.19ms -> 3.17ms 1x tabl_cuteoverload.skp_1 2.66ms -> 2.64ms 0.99x ... tabl_transformice.skp_1 3.06ms -> 2.98ms 0.98x tabl_googlecalendar.skp_1 11.3ms -> 11ms 0.97x tabl_gamedeksiam.skp_1 12.8ms -> 12.4ms 0.97x desk_samoasvg.skp_1 10.6ms -> 10.3ms 0.97x tabl_worldjournal.skp_1 4.44ms -> 4.3ms 0.97x Review URL: https://codereview.chromium.org/1157683006
* Avoid creating GrGLPath to the resource cache when creating GrGLPathRangesGravatar kkinnunen2015-05-24
| | | | | | | | | | | Do not create a GrGLPath when loading glyphs with the driver and creating GrGLPathRange based on those. The path would be inserted to the GPU resource cache and then immediately be released. Instead, just init the first path object of the path range as the template. Review URL: https://codereview.chromium.org/1146983004