aboutsummaryrefslogtreecommitdiff
path: root/gm/rrects.cpp
AgeCommit message (Collapse)Author
2023-08-16//gm/gm.h: Fold GM::onISize() into GM::getISize().Leandro Lovisolo
Inspired by https://skia-review.googlesource.com/c/skia/+/742738, this CL aims to simplify GMs by removing the GM::getISize() -> GM::onISize() indirection, which at the moment isn't providing any value. Unlike the aforementioned CL, I'm leaving GM::getISize() as non-const because some GMs perform non-const initialization steps. Most changes in the CL are the result of a multifile search/replace and clang-format. Suggested review order: - //gm/gm.h - //gm/gm.cpp - Everything else. Bug: b/40045301 Change-Id: Ib51e1034209fda55cd3e1d2cf9617a4b19f27207 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/742740 Auto-Submit: Leandro Lovisolo <lovisolo@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
2023-08-15//gm/gm.h: Fold GM::onShortName() into GM::getName() and make it const.Leandro Lovisolo
This change is motivated by https://skia-review.googlesource.com/c/skia/+/741817, where I attempt to generate GM-related Gold keys from a const method in the GM class that calls GM::getName(). The original GM::getName() method returns the memoized result of GM::onShortName(). This CL eliminates the memoization as a prerequisite to marking GM::getName() as const. Given that most GMs today do simple SkString manipulations in their onShortName(), I believe this won't have any noticeable impact in performance or CQ time. Most of the changes in this CL are the result of a simple multifile search/replace and clang-format. Suggested review order: - //gm/gm.h - //gm/gm.cpp - //gm/BazelGMRunner.cpp - //bench/GMBench.cpp - //modules/canvaskit/gm_bindings.cpp - //tools/viewer/GMSlide.cpp - //tools/viewer/Viewer.cpp - Everything else. Bug: b/40045301 Change-Id: Ifef0dcf6ccd4aac871e1aa6fe8342d28efcd146e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/742738 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
2023-06-09Remove Ganesh code from SkCanvasPrivKevin Lubick
This also moves a few Android+Ganesh specific methods to a new header so they can be exposed only for Android. This enforces IWYU on the affected files (ganesh/Device was impacted because originally I was going to put the functions in there, but decided a new file was better). Change-Id: I96e3e557d5ccf9698fd2b747c0709f6a1444ce22 Bug: skia:14317 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/709957 Owners-Override: Kevin Lubick <kjlubick@google.com> Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
2023-03-21Rename skgpu::v1 namespace to skgpu::ganeshKevin Lubick
Change-Id: I3be2dd5e267bea16cb35f1a71bd5d516089eacec Reviewed-on: https://skia-review.googlesource.com/c/skia/+/658078 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
2023-02-10Add complex self-intersecting stroke rrect testsMichael Ludwig
Change-Id: I8e32a4c151a548a76514a905e006660d42206b38 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/640888 Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: Arman Uguray <armansito@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2022-11-29Add GM to test a range of stroked rects+rrects and stylesMichael Ludwig
Change-Id: Id97198265f658bf216fb1ccc4e15820dcd4186a5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/610181 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-08-10Move the contents of src/gpu/ganesh/v1 up a levelRobert Phillips
Additionally: rename SurfaceDrawContext_v1.h -> SurfaceDrawContext.h Change-Id: I8471b709b28268d3b2fa108026df95e861f78e02 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/566884 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-21Replace SK_ARRAY_COUNT with std::size() for skia/gmHerb Derby
Note: in variedtext.cpp:66 changed static_assert to SkASSERT. Change-Id: I853a2e5563c90c9dde5d6ba5443cc73b664b493d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551876 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
2022-04-12Move Ganesh specific headers into include/private/gpu/ganeshRobert Phillips
Change-Id: Ia799cdff5288efe5d5d53e8d8f77cf32f3343371 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529131 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-07Move all Ganesh source files into ganesh subdirectory.Greg Daniel
Change-Id: I238d29ba0250224fa593845ae65192653f58faff Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-18Fix recently updated rrect_* GMsMichael Ludwig
https://skia-review.googlesource.com/c/skia/+/521523 added a new tile to the GM, but made some tweaks to the clipping logic. It accidentally only outset the clip bounds for kInverseFillAA edge types, when it should have outset for BW and AA. This fixes the GM so that the only meaningful changes are the new tile. Bug: skia:10456 Change-Id: Ic6fbb1db26921173e4aa846d37ee31d523e3dbb1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522436 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-18Fix EllipticalRRectEffect precision for large corner radiiMichael Ludwig
Modifies rrects_* GMs to draw a clipped rrect with a large radius. The _effect case would draw with a blurry edge before the fixes. 1. Adds scaling to the elliptical effects key and activate it when the rrect radii are large enough. This fixes the precision issue with the elliptical effect variant. 2. Uses SkRRectPriv::IsSimpleCircular() to choose the circular variant over elliptical, which uses a tolerance between X and Y radii. This avoids the issue since the circular effect doesn't suffer in this case. Confirmed that both fixes work independently of each other. Cq-Do-Not-Cancel-Tryjobs: true Bug: skia:10456 Change-Id: Ifef63356e31f46ec1546684636d9667b90bcef9b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521523 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-10-11Make class members that are static constexpr also be inline.Brian Salomon
This is in prep for compiling with -std=c++14 and -Wno-c++17-extensions when building with clang. Chrome has encountered problems with third_party headers that are included both in Skia and other Chrome sources that produce different code based on whether preprocessor macros indicate a C++14 or C++17 compilation. In C++17 they are already inline implicitly. When compiling with C++14 we can get linker errors unless they're explicitly inlined or defined outside the class. With -Wno-c++17-extensions we can explicitly inline them in the C++14 build because the warning that would be generated about using a C++17 language extension is suppressed. We cannot do this in public headers because we support compiling with C++14 without suppressing the C++17 language extension warnings. Bug: chromium:1257145 Change-Id: Iaf5f4c62a398f98dd4ca9b7dfb86f2d5cab21d66 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457498 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-09-02Move more Ops to skgpu::v1 namespaceRobert Phillips
GrFillRRectOp GrFillRectOp Bug: skia:11837 Change-Id: Icdecc2ccd9def659b0d9402910b2072e02577a66 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444817 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-28Rename GrSurfaceDrawContext to skgpu::v1::SurfaceDrawContextRobert Phillips
This CL is mostly mechanical. It: replaces "src/gpu/GrSurfaceDrawContext.h" #includes with "src/gpu/v1/SurfaceDrawContext_v1.h" and reorders replaces "class GrSurfaceDrawContext;" with "namespace skgpu { namespace v1 { class SurfaceDrawContext; }}" replaces "GrSurfaceDrawContext*" with "auto" where possible replaces "rtc" with "sdc" replaces "surfaceDrawContext" with "sdc" replaces GrSurfaceDrawContext with skgpu::v1::SurfaceDrawContext reflows parameters as needed This CL does not try to: make skgpu::v1::SurfaceDrawContext V1-only minimize the skgpu and/or skgpu::v1 prefixes Those two tasks will be accomplished in follow up CLs. This CL is just trying to get the bulk of the mechanical changes comprehensibly landed. Bug: skia:11837 Change-Id: I6fe59080249d585df8f5d27c6b67569cdc35842f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433156 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-07-21Revise GM infrastructure to not rely on GrSurfaceDrawContextRobert Phillips
The SDC will soon be V1-only. Remove it from the generic testing infrastructure and require each V1-specific GM to explicitly retrieve it. Bug: skia:11837 Change-Id: I4c904b7e333333382062bde4b17a1f9f81bee6a9 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430425 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-07-09Add a gradient to the rrect_clip testsChris Dalton
This helps ensure local coords get handled correctly during clip optimizations. Bug: chromium:928984 Change-Id: I762077bc7a412ee62703a0221d74138920ecbde0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426296 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-07-09Remove GrSharedEnums.hBrian Osman
Change-Id: I3f2e927001da10652b2965687e31aa8452c9dfc6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425997 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
2020-12-23Remove public getter for GrSurfaceDrawContext on SkSCanvas.Brian Salomon
Made it private and accessible internally via SkCanvasPriv. Update SkGpuDevice methods/variables after rename of GrDrawSurfaceContext. Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3,Canary-Flutter,Canary-Android Change-Id: I3da64cee1de03c201243ee6c7ccd4b4c44cad8c9 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346498 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-11whole-word replace renderTargetContext with surfaceDrawContextBrian Salomon
TBR:egdaniel@google.com Change-Id: Ia471dfc1278bcbeb2b485e4deeb3e932060c50a6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343576 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-10GrRenderTargetContext->GrSurfaceDrawContextBrian Salomon
Just the class/files. variable names and additional comments to follow. Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-11-30Remove GrRenderTargetContextPriv and GrSurfaceContextPrivBrian Salomon
I think this is vestigial from some time in the past where RTC was public. Also just expose the methods that add ops rather than have so many friends + testingOnly versions. Change-Id: I60d9fdff23b2d67039a7b37815da7ff9e73d8999 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339158 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-03Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.John Stiles
Mechanically updated via Xcode "Replace Regular Expression": typedef (.*) INHERITED; --> using INHERITED = $1; The ClangTidy approach generated an even larger CL which would have required a significant amount of hand-tweaking to be usable. Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-06Enable ClangTidy check llvm-namespace-comment.John Stiles
This fixes a large number of SkSL namespaces which were labeled as if they were anonymous, and also a handful of other mislabeled namespaces. Missing namespace-end comments have been added throughout. A number of diffs are just indentation-related (adjusting 1- or 3- space indents to 2-space). Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-07-21Remove support for multiple coverage processors from GrPaint API.John Stiles
Change-Id: I82276e38ea4a5524127176eb5a34066b6cb06d88 Bug: skia:10217 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304799 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-30Downgrade GpuGMs to only receiving a GrRecordingContextRobert Phillips
Most of this CL is just noise (i.e., all the header changes) due to the signature change. The 'discard' GM has some substantive changes but that's about it. Change-Id: I72011a442c149b5db93cf8decade6779be4f63d8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296704 Reviewed-by: Adlai Holler <adlai@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-17Update GrRRectEffect to take an input FP and return a MakeResult.John Stiles
Change-Id: If5abcd2347871c62e03c8708705ec1041572465a Bug: skia:10217 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296838 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-05-29Make stencilRect() in GrRTCPriv more flexible.Michael Ludwig
All GrFillRectOps in core code go through a GrRTC call. Also adds a utility constructor for non-AA rects since this simplifies clears and tests/GMs that called GrFillRectOp directly. This helps preserve readability without forcing them to go through the full rect drawing pipeline. Change-Id: I6694c1aded3b89d773a897c483f7f2a51b06e6e8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215089 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-02IWYU for gms.Ben Wagner
This almost gets gms to be iwyu clean. The last bit is around gm.cpp and the tracing framework and its use of atomic. Will also need a way of keeping things from regressing, which is difficult due to needing to do this outside-in. Change-Id: I1393531e99da8b0f1a29f55c53c86d53f459af7d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211593 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
2019-04-24rewrite includes to not need so much -IfooMike Klein
Current strategy: everything from the top Things to look at first are the manual changes: - added tools/rewrite_includes.py - removed -Idirectives from BUILD.gn - various compile.sh simplifications - tweak tools/embed_resources.py - update gn/find_headers.py to write paths from the top - update gn/gn_to_bp.py SkUserConfig.h layout so that #include "include/config/SkUserConfig.h" always gets the header we want. No-Presubmit: true Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-08Add a mechanism for GMs to silently exclude themselves from GoldChris Dalton
This is useful, for example, when trying to test a hardware feature that isn't supported in the current context. Bug: skia:8731 Change-Id: I9a363159300c92e4039bfd05400238c27002efb1 Reviewed-on: https://skia-review.googlesource.com/c/189133 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-11Consolidate stroke-rect ops and use GrFillRectOp instead of GrNonAA/AARectOpMichael Ludwig
Bug: skia: Change-Id: Iee57bc970a026de2ad5a0758153e9cbb20753fa1 Reviewed-on: https://skia-review.googlesource.com/c/173105 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-16Remove all remaining GrColor4f (other than gradients)Brian Osman
This adds SkPMColor4f conversions to/from RGBA bytes (ie GrColor). I had previously made some free functions that did the same thing. I'm ambivalent about which option is nicer, but wanted to have one method, so I converted everything to use the new versions. Bug: skia: Change-Id: I4194c44b5bd12228075fd1932a14cf31c8d6a3c1 Reviewed-on: https://skia-review.googlesource.com/c/162560 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-15Revert "converted AARectEffect to new FP system"Ethan Nicholas
This reverts commit 222e275b0ab4c8a2af152c637bf9dbc28b4a097f. Reason for revert: perf regression Original change's description: > converted AARectEffect to new FP system > > Bug: skia: > Change-Id: I0e4141c7f547bab92c65a6abff120ed04d5c2c66 > Reviewed-on: https://skia-review.googlesource.com/c/153550 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=bsalomon@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I3d7036a78d8582d6790c77b20a60e6e5257d1881 Reviewed-on: https://skia-review.googlesource.com/c/162283 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-10-12converted AARectEffect to new FP systemEthan Nicholas
Bug: skia: Change-Id: I0e4141c7f547bab92c65a6abff120ed04d5c2c66 Reviewed-on: https://skia-review.googlesource.com/c/153550 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-08-16don't adapt any gray colors to 565Mike Klein
Adapting gray to 565 will add a noticeable purple/green tint. I'd rather only the 565 images in Gold were tainted with that. Change-Id: Ib09e92b2f78c6de086345124e9eefeb31bbb5fa8 Reviewed-on: https://skia-review.googlesource.com/147422 Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2018-06-12Plumb GrContext everywhereRobert Phillips
There is no good way to split the monster CL up. This breaks out the GrContext plumbing but doesn't use it. Change-Id: I90856d428d372bcec3f8821e6364667b367927d4 Reviewed-on: https://skia-review.googlesource.com/133382 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-05-31Remove SK_SUPPORT_GPU checks in tool-only codeBrian Osman
Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-11Make GrCaps and GrShaderCaps private.Brian Salomon
Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-12-05Avoid GrEllipseEffect for small radii on devices without 32 bit float.Brian Salomon
Also limit small radius bail in GrCircleEffect to clip out cases. Change-Id: I14ce736969b05203219d68f30283c36c84f78f3a Reviewed-on: https://skia-review.googlesource.com/80621 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-10switched GrClipEdge to an enum classEthan Nicholas
Bug: skia: Change-Id: Idf41580314a32739c70721530fc3ca48e566b044 Reviewed-on: https://skia-review.googlesource.com/70023 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-09renamed GrPrimitiveEdgeType / GrProcessorEdgeType to GrClipEdgeTypeEthan Nicholas
Bug: skia: Change-Id: I4a9af0b9b2cfa47875b2ba098098183e8dca29a7 Reviewed-on: https://skia-review.googlesource.com/69601 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-08-11Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.Brian Salomon
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2017-06-15Revert "Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to ↵Brian Salomon
GrMeshDrawOp subclasses."" This reverts commit a0485d94529905e76320b7aa941a0d94b5578ac2. Bug: skia: Change-Id: If50b2d1af285a6c3c943373bb7258b56e1af28d6 Reviewed-on: https://skia-review.googlesource.com/19961 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-14Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp ↵Brian Salomon
subclasses." This reverts commit 1ec03f33cf493352174c748662d4a3cca29f78fd. Revert "Fix logic reversal in NonAAFillRectOp test factory" This reverts commit 89c1c2552ec5b9ad8949988f7c9532a298b55987. Reason: Unexpected GM changes. Bug: skia: Change-Id: I9edf5f0e4a54b5cad86bd438a505aaaef38563de Reviewed-on: https://skia-review.googlesource.com/19960 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-14Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.Brian Salomon
Consolidates op factory functions to a rewritten GrRectOpFactory. Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers. Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479 Reviewed-on: https://skia-review.googlesource.com/17711 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-10Move all non-AA fill rect ops off of GrLegacyMeshDrawOp.Brian Salomon
This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace. Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109 Reviewed-on: https://skia-review.googlesource.com/15634 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-04-03Move pipeline handling out of GrMeshDrawOp.Brian Salomon
The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp. The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline. Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706 Reviewed-on: https://skia-review.googlesource.com/11002 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-22GM: some header cleanupMike Klein
gm.h includes sk_tool_utils.h but does not use it. The bulk of this CL makes each gm that uses sk_tool_utils include it. sk_tool_utils.h also provided SkRandom and SkTDArray, so a couple GMs add those headers too. Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1 Reviewed-on: https://skia-review.googlesource.com/10014 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
2017-03-09Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp ↵Brian Salomon
derived classes. The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work. Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef Reviewed-on: https://skia-review.googlesource.com/9481 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>