Brian Osman
1105224f97
Rename GrDrawContext to GrRenderTargetContext
...
This is in preparation for GrTextureContext and GrSurfaceContext
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030
Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-27 19:14:09 +00:00
lsalzman
9d2b0fea05
fix 'GrClip::quickContains was hidden' warning in GrNoClip
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394113002
Review-Url: https://codereview.chromium.org/2394113002
2016-10-10 15:36:24 -07:00
Mike Klein
fc6c37b981
Remove stray semicolons.
...
Turns out function declarations don't end in semicolons...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720
No public API changes.
TBR=reed@google.com
Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb
Reviewed-on: https://skia-review.googlesource.com/2720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-27 14:04:26 +00:00
bsalomon
cb31e51d93
Converts a drawPaint through a rrect clip to a drawRRect in GrDrawContext.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271053004
Review-Url: https://codereview.chromium.org/2271053004
2016-08-26 10:48:19 -07:00
csmartdalton
02fa32c6d1
Move GrFixedClip into src directory
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254343003
Review-Url: https://codereview.chromium.org/2254343003
2016-08-19 13:29:27 -07:00
csmartdalton
28341fad84
Implement difference clip rects with window rectangles
...
Plumbs the pipeline for window rectangles and uses them for a very
basic implementation of difference clip rects. This puts a common
Blink pattern on fast path, but we will still eventually need to make
more comprehensive use of window rectangles during clipping.
GTX 960 perf result:
gpu glinst4 glinst16
desk_jsfiddlebigcar.skp 0.254 -> 0.177 [70%] 0.279 -> 0.197 [71%] 0.577 -> 0.196 [34%]
keymobi_sfgate_com_.skp 0.697 -> 0.513 [74%] 0.766 -> 0.451 [59%] 0.769 -> 0.597 [78%]
keymobi_blogger.skp 0.406 -> 0.314 [77%] 0.436 -> 0.292 [67%] 0.696 -> 0.319 [46%]
desk_pokemonwiki.skp 0.121 -> 0.098 [81%] 0.13 -> 0.105 [81%] 0.216 -> 0.097 [45%]
desk_wikipedia.skp 0.121 -> 0.098 [81%] 0.13 -> 0.104 [80%] 0.199 -> 0.104 [52%]
keymobi_androidpolice_co... 0.443 -> 0.382 [86%] 0.447 -> 0.398 [89%] 0.444 -> 0.396 [89%]
keymobi_booking_com_sear... 1 .15 -> 1.03 [90%] 1.17 -> 1.06 [91%] 1.17 -> 1.05 [90%]
keymobi_theverge_com.skp 0.417 -> 0.396 [95%] 0.426 -> 0.405 [95%] 0.429 -> 0.4 [93%]
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251573002
Review-Url: https://codereview.chromium.org/2251573002
2016-08-17 10:00:22 -07:00
bsalomon
7f0d9f3920
Attempt to throw away rrect clips of rrects.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241273003
Review-Url: https://codereview.chromium.org/2241273003
2016-08-15 14:49:10 -07:00
csmartdalton
d211e7875d
Convert GrAppliedClip interface to builder style
...
GrAppliedClip was about at its limit for how many "make" functions it
could have. Window rectangles would push it over the edge. This change
makes it so GrDrawTarget supplies the original draw bounds to the
constructor, and then GrClip adds the various required clipping
techniques.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246113002
Review-Url: https://codereview.chromium.org/2246113002
2016-08-15 11:17:19 -07:00
csmartdalton
77f2fae49e
Encapsulate GrReducedClip result in class members
...
Updates GrReducedClip to store its result in class members instead of
various pointer arguments. This helps clean up calling code and will
make it easier to reduce the clip higher in the stack.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222873002
Review-Url: https://codereview.chromium.org/2222873002
2016-08-08 09:55:06 -07:00
csmartdalton
c6f411e72b
Merge GrClipMaskManager into GrClipStackClip
...
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196393007
Review-Url: https://codereview.chromium.org/2196393007
2016-08-05 22:32:12 -07:00
caryclark
d6562000ef
require semi at the end of SkASSERT and friends
...
R=bungeman@google.com
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185063002
Review-Url: https://codereview.chromium.org/2185063002
2016-07-27 12:02:07 -07:00
csmartdalton
cbecb082d1
Allow GrReducedClip to take non-integer query bounds
...
Fixes places where AA bloat was being conflated with geometric
boundaries and updates GrReducedClip to work with non-integer query
bounds. This allows for better clip reduction with AA shared edges.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2160093002
Review-Url: https://codereview.chromium.org/2160093002
2016-07-22 08:59:08 -07:00
csmartdalton
97f6cd5d0f
Pre-crop filled rects to avoid scissor
...
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.
In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
Review-Url: https://codereview.chromium.org/2132073002
2016-07-13 13:37:08 -07:00
robertphillips
59cf61ab03
Retract PipelineBuilder from GrClip::apply
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147443004
Review-Url: https://codereview.chromium.org/2147443004
2016-07-13 09:18:21 -07:00
msarett
ba3880fa6d
Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
...
Reason for revert:
I think this is still causing a test failure on Chrome windows bots.
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/243928/steps/cc_unittests%20%28with%20patch%29%20on%20Windows-7-SP1/logs/stdio
Original issue's description:
> Pre-crop filled rects to avoid scissor
>
> Updates GrDrawContext to crop filled rects to the clip bounds before
> creating batches for them. Also adds clipping logic to ignore scissor
> when the draw falls completely inside. These two changes combined
> reduce API traffic and improve batching.
>
> In the future this can and should be improved by switching to floating
> point clip boundaries, thus allowing us to throw out non pixel aligned
> rectangle clips as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
>
> Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
> Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
TBR=bsalomon@google.com ,robertphillips@google.com,csmartdalton@google.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/2140253004
2016-07-12 18:48:21 -07:00
csmartdalton
86de59f4a9
Pre-crop filled rects to avoid scissor
...
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.
In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
Review-Url: https://codereview.chromium.org/2132073002
2016-07-12 14:45:23 -07:00
msarett
aeadcdfbf2
Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
...
Reason for revert:
I believe that this is breaking the roll.
https://codereview.chromium.org/2141923002
https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/258434/steps/cc_unittests%20%28with%20patch%29%20on%20Mac-10.9/logs/stdio
Original issue's description:
> Pre-crop filled rects to avoid scissor
>
> Updates GrDrawContext to crop filled rects to the clip bounds before
> creating batches for them. Also adds clipping logic to ignore scissor
> when the draw falls completely inside. These two changes combined
> reduce API traffic and improve batching.
>
> In the future this can and should be improved by switching to floating
> point clip boundaries, thus allowing us to throw out non pixel aligned
> rectangle clips as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
>
> Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
TBR=bsalomon@google.com ,robertphillips@google.com,csmartdalton@google.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/2145573002
2016-07-12 05:40:39 -07:00
csmartdalton
7969838702
Pre-crop filled rects to avoid scissor
...
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.
In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
Review-Url: https://codereview.chromium.org/2132073002
2016-07-11 14:34:12 -07:00
bsalomon
6cc9006a90
Use clipped bounds for reordering decisions
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137543002
NOTREECHECKS=true
NOPRESUBMIT=true
Review-Url: https://codereview.chromium.org/2137543002
2016-07-08 11:31:23 -07:00
bsalomon
bd2bbe4a17
Don't scissor draws overlapping the render target's edges
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2135673002
Review-Url: https://codereview.chromium.org/2135673002
2016-07-08 07:36:42 -07:00
bungeman
06ca8ec87c
sk_sp for Ganesh.
...
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004
Review-Url: https://codereview.chromium.org/2041113004
2016-06-09 08:01:03 -07:00
robertphillips
976f5f0dc5
Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack
...
This will be followed up with a CL to remove the GrRenderTarget from the GrPipelineBuilder.
Split out of:
https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035823002
Review-Url: https://codereview.chromium.org/2035823002
2016-06-03 10:59:20 -07:00
robertphillips
5f2fa47a6e
Make GrAppliedClip friendless
...
GrAppliedClip is a pretty amiable class but not so good about setting boundaries. It is probably for the best that it breaks things off with GrClipMaskManager before the drama of https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) begins.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1993263002
Review-Url: https://codereview.chromium.org/1993263002
2016-05-19 11:36:25 -07:00
cdalton
846c051a48
Convert GrClip to an abstract base class
...
Converts GrClip to an abstract base class and adds a "GrFixedClip"
implementation. GrFixedClip denotes a clip implemented with fixed-
function hardware. GrFixedClip allows us to remove the stateful
"fClipMode" member from GrClipMaskManager, and in the future will
be able to nicely encapsulate window rectangles.
After this change GrClipMaskManager is just a wrapper around
GrDrawTarget. We may want to consider removing it altogether.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971343002
Review-Url: https://codereview.chromium.org/1971343002
2016-05-13 10:25:00 -07:00
robertphillips
391395dcfb
Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
Committed: https://skia.googlesource.com/skia/+/86c60758e9e4f9e203d7462cb22b2a245a0f51bd
Review URL: https://codereview.chromium.org/1754563003
2016-03-02 09:26:36 -08:00
robertphillips
8b8f36fc49
Revert of Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (patchset #7 id:120001 of https://codereview.chromium.org/1754563003/ )
...
Reason for revert:
fAuditTrail
Original issue's description:
> Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
>
> Committed: https://skia.googlesource.com/skia/+/86c60758e9e4f9e203d7462cb22b2a245a0f51bd
TBR=joshualitt@chromium.org ,bsalomon@google.com,joshualitt@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/1754353002
2016-03-02 08:53:12 -08:00
robertphillips
86c60758e9
Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
Review URL: https://codereview.chromium.org/1754563003
2016-03-02 08:43:13 -08:00
joshualitt
91d0620586
fix mozilla bug
...
TBR=bsalomon@google.com
BUG=skia:4621
Review URL: https://codereview.chromium.org/1500023002
2015-12-04 08:51:11 -08:00
robertphillips
7bceedc550
Retract GrRenderTarget a bit
...
These sites don't necessarily need the full power of a GrRenderTarget object. This is a clean up for switching over to GrRenderTargetProxys.
Review URL: https://codereview.chromium.org/1486923004
2015-12-01 12:51:26 -08:00
bsalomon
bb3be25a86
Remove rect clip type from grclip.
...
R=joshualitt@google.com
BUG=skia:
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/989443003
2015-03-06 08:21:39 -08:00
joshualitt
570d2f81a6
I'd really like to land this before the branch so speedy reviews are appreciated.
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336
Review URL: https://codereview.chromium.org/936943002
2015-02-25 13:19:48 -08:00
joshualitt
2907059d0e
Revert of Pass clip to context (patchset #8 id:180001 of https://codereview.chromium.org/936943002/ )
...
Reason for revert:
Strange blur problems on nexus 5
Original issue's description:
> I'd really like to land this before the branch so speedy reviews are appreciated.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336
TBR=jvanverth@google.com ,senorblanco@google.com,bsalomon@google.com,senorblanco@chromium.org,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/956083002
2015-02-25 13:04:44 -08:00
joshualitt
586d5d640b
I'd really like to land this before the branch so speedy reviews are appreciated.
...
BUG=skia:
Review URL: https://codereview.chromium.org/936943002
2015-02-25 11:21:21 -08:00
joshualitt
ab2f44cbfa
probable fix for asan bot
...
NOTREECHECKS=True
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/956583002
2015-02-24 06:47:14 -08:00
joshualitt
0413d43e1b
Enable rect clips
...
BUG=skia:
Review URL: https://codereview.chromium.org/951653002
2015-02-23 17:52:51 -08:00
joshualitt
9ece6a9548
move static init to cpp file to fix linux builder
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/947933004
2015-02-23 17:03:33 -08:00
joshualitt
128def3900
Revert of fix for linux builder warn on exit destructor (patchset #1 id:1 of https://codereview.chromium.org/951103002/ )
...
Reason for revert:
still breaks
Original issue's description:
> fix for linux builder warn on exit destructor
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/51fdb4f8f63b6bb13e719000381e225503a2d4a0
TBR=joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/955493003
2015-02-23 16:19:22 -08:00
joshualitt
51fdb4f8f6
fix for linux builder warn on exit destructor
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/951103002
2015-02-23 15:57:23 -08:00
joshualitt
44701df5ce
Move clip off of draw target
...
BUG=skia:
Review URL: https://codereview.chromium.org/947443003
2015-02-23 14:44:58 -08:00
robertphillips@google.com
a2d71482db
Removed GrClip & related classes
...
http://codereview.appspot.com/6450071/
git-svn-id: http://skia.googlecode.com/svn/trunk@4899 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-01 20:08:47 +00:00
robertphillips@google.com
641f8b19a6
Replace GrClip with SkClipStack
...
http://codereview.appspot.com/6449070/
git-svn-id: http://skia.googlecode.com/svn/trunk@4865 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 19:15:58 +00:00
robertphillips@google.com
7b11289b4e
Added dev- & canv- prefixes to Ganesh bounding boxes to indicate coordinate space
...
http://codereview.appspot.com/6457061/
git-svn-id: http://skia.googlecode.com/svn/trunk@4856 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 15:18:21 +00:00
robertphillips@google.com
f8d904a7ee
GrClip no longer translates its clips (to better mimic SkClipStack's behavior)
...
http://codereview.appspot.com/6445052/
git-svn-id: http://skia.googlecode.com/svn/trunk@4848 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 12:18:16 +00:00
robertphillips@google.com
e4d69c0e46
Added getConservativeBound helper function to GrClipData
...
http://codereview.appspot.com/6454054/
git-svn-id: http://skia.googlecode.com/svn/trunk@4798 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 21:37:40 +00:00
robertphillips@google.com
beb1af78d0
Altered Ganesh's clip stack plumbing to pass down new GrClipData class
...
http://codereview.appspot.com/6454047/
git-svn-id: http://skia.googlecode.com/svn/trunk@4788 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 18:52:16 +00:00
robertphillips@google.com
a6f11c4f71
Gave GrClip an SkClipStack-style iterator
...
http://codereview.appspot.com/6434046/
git-svn-id: http://skia.googlecode.com/svn/trunk@4723 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 17:39:44 +00:00
robertphillips@google.com
3e11c0bd92
Forced GrClip to always have conservative bounds
...
http://codereview.appspot.com/6353089/
git-svn-id: http://skia.googlecode.com/svn/trunk@4545 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:20:35 +00:00
bsalomon@google.com
a320194e42
Make GrClipMaskManager configure the stencil and scissor on GrGpu
...
Review URL: http://codereview.appspot.com/6308096/
git-svn-id: http://skia.googlecode.com/svn/trunk@4288 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 19:58:20 +00:00
bsalomon@google.com
8d033a1b12
Remove GrPath typedef
...
Review URL: http://codereview.appspot.com/6128045/
git-svn-id: http://skia.googlecode.com/svn/trunk@3780 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-27 15:52:53 +00:00
robertphillips@google.com
0f191f30af
Minor refactoring to remove duplicate enum from Ganesh (_SetOp -> SkRegion::Op)
...
http://codereview.appspot.com/6116047/
git-svn-id: http://skia.googlecode.com/svn/trunk@3763 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-25 15:23:36 +00:00