Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Issue 2132073002: Pre-crop filled rects to avoid scissor (Closed)

Created:
4 years, 5 months ago by csmartdalton
Modified:
4 years, 5 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

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 Committed: https://skia.googlesource.com/skia/+/97f6cd5d0fc84dbed7cd8770b79695df83c69444

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 8

Patch Set 3 : Pre-crop filled rects to avoid scissor #

Total comments: 5

Patch Set 4 : addressed comments #

Patch Set 5 : rebaes #

Patch Set 6 : nearest filtering for the gm #

Unified diffs Side-by-side diffs Delta from patch set Stats (+219 lines, -21 lines) Patch
A gm/croppedrects.cpp View 1 2 3 4 5 1 chunk +108 lines, -0 lines 0 comments Download
M include/gpu/GrClip.h View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M src/gpu/GrClip.cpp View 1 2 1 chunk +7 lines, -5 lines 0 comments Download
M src/gpu/GrClipMaskManager.cpp View 1 2 3 chunks +9 lines, -5 lines 0 comments Download
M src/gpu/GrDrawContext.cpp View 1 2 3 7 chunks +75 lines, -11 lines 0 comments Download

Messages

Total messages: 41 (14 generated)
csmartdalton
4 years, 5 months ago (2016-07-08 17:28:53 UTC) #3
csmartdalton
What would you think of adding a "fuzzyContains" method to SkIRect?
4 years, 5 months ago (2016-07-08 18:50:57 UTC) #4
csmartdalton
https://codereview.chromium.org/2132073002/diff/20001/include/gpu/GrDrawContext.h File include/gpu/GrDrawContext.h (right): https://codereview.chromium.org/2132073002/diff/20001/include/gpu/GrDrawContext.h#newcode330 include/gpu/GrDrawContext.h:330: SkAutoTUnref<GrDrawBatch>* batch, I'm not sure I like this approach. ...
4 years, 5 months ago (2016-07-08 21:20:45 UTC) #5
robertphillips
https://codereview.chromium.org/2132073002/diff/20001/include/gpu/GrDrawContext.h File include/gpu/GrDrawContext.h (right): https://codereview.chromium.org/2132073002/diff/20001/include/gpu/GrDrawContext.h#newcode330 include/gpu/GrDrawContext.h:330: SkAutoTUnref<GrDrawBatch>* batch, On 2016/07/08 21:20:45, csmartdalton wrote: > I'm ...
4 years, 5 months ago (2016-07-08 22:39:49 UTC) #6
bsalomon
I'd be in favor of landing the fuzzy contains stuff separately from the rect trimming. ...
4 years, 5 months ago (2016-07-08 22:49:00 UTC) #7
csmartdalton
This is ready to go now. https://codereview.chromium.org/2132073002/diff/20001/include/gpu/GrDrawContext.h File include/gpu/GrDrawContext.h (right): https://codereview.chromium.org/2132073002/diff/20001/include/gpu/GrDrawContext.h#newcode330 include/gpu/GrDrawContext.h:330: SkAutoTUnref<GrDrawBatch>* batch, On ...
4 years, 5 months ago (2016-07-11 03:17:56 UTC) #9
bsalomon
https://codereview.chromium.org/2132073002/diff/40001/gm/croppedrects.cpp File gm/croppedrects.cpp (right): https://codereview.chromium.org/2132073002/diff/40001/gm/croppedrects.cpp#newcode93 gm/croppedrects.cpp:93: // TODO: assert the draw target only has one ...
4 years, 5 months ago (2016-07-11 13:52:23 UTC) #10
csmartdalton
https://codereview.chromium.org/2132073002/diff/40001/gm/croppedrects.cpp File gm/croppedrects.cpp (right): https://codereview.chromium.org/2132073002/diff/40001/gm/croppedrects.cpp#newcode93 gm/croppedrects.cpp:93: // TODO: assert the draw target only has one ...
4 years, 5 months ago (2016-07-11 16:37:11 UTC) #11
bsalomon
lgtm
4 years, 5 months ago (2016-07-11 17:38:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132073002/100001
4 years, 5 months ago (2016-07-11 20:50:44 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Mips-Debug-Android-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Mips-Debug-Android-Trybot/builds/8827)
4 years, 5 months ago (2016-07-11 20:57:34 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132073002/100001
4 years, 5 months ago (2016-07-11 21:15:05 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
4 years, 5 months ago (2016-07-11 21:34:15 UTC) #21
msarett
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2145573002/ by msarett@google.com. ...
4 years, 5 months ago (2016-07-12 12:40:32 UTC) #22
bsalomon
On 2016/07/12 12:40:32, msarett wrote: > A revert of this CL (patchset #6 id:100001) has ...
4 years, 5 months ago (2016-07-12 14:02:10 UTC) #23
bsalomon
On 2016/07/12 14:02:10, bsalomon wrote: > On 2016/07/12 12:40:32, msarett wrote: > > A revert ...
4 years, 5 months ago (2016-07-12 15:36:03 UTC) #24
bsalomon
On 2016/07/12 15:36:03, bsalomon wrote: > On 2016/07/12 14:02:10, bsalomon wrote: > > On 2016/07/12 ...
4 years, 5 months ago (2016-07-12 15:41:53 UTC) #25
csmartdalton
On 2016/07/12 15:41:53, bsalomon wrote: > On 2016/07/12 15:36:03, bsalomon wrote: > > On 2016/07/12 ...
4 years, 5 months ago (2016-07-12 16:03:40 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132073002/100001
4 years, 5 months ago (2016-07-12 20:27:31 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
4 years, 5 months ago (2016-07-12 21:45:29 UTC) #31
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-12 21:45:38 UTC) #32
msarett
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2140253004/ by msarett@google.com. ...
4 years, 5 months ago (2016-07-13 01:48:05 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132073002/100001
4 years, 5 months ago (2016-07-13 20:24:42 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/97f6cd5d0fc84dbed7cd8770b79695df83c69444
4 years, 5 months ago (2016-07-13 20:37:12 UTC) #38
jcgregorio
On 2016/07/13 at 20:37:12, commit-bot wrote: > Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/97f6cd5d0fc84dbed7cd8770b79695df83c69444 Was this ...
4 years, 5 months ago (2016-07-19 19:58:26 UTC) #39
csmartdalton
On 2016/07/19 19:58:26, jcgregorio wrote: > On 2016/07/13 at 20:37:12, commit-bot wrote: > > Committed ...
4 years, 5 months ago (2016-07-19 20:09:16 UTC) #40
jcgregorio
4 years, 5 months ago (2016-07-19 20:19:49 UTC) #41
Message was sent while issue was closed.
On 2016/07/19 at 20:09:16, csmartdalton wrote:
> On 2016/07/19 19:58:26, jcgregorio wrote:
> > On 2016/07/13 at 20:37:12, commit-bot wrote:
> > > Committed patchset #6 (id:100001) as
> >
https://skia.googlesource.com/skia/+/97f6cd5d0fc84dbed7cd8770b79695df83c69444
> > 
> > Was this expected to cause a slight perf decrease, in particular on Nexus
10?
> > 
> >    https://perf.skia.org/#5338
> > 
> >    https://perf.skia.org/cl/1224
> 
> No, this comes as a surprise. I'm having a hard time understanding what the
graph means that I'm looking at. is this a particular test or is it some sort of
aggregate performance?

This graph will be better, it's a selected set of traces that show the
regression, with each line being an individual test.

  https://perf.skia.org/#5339

Powered by Google App Engine
This is Rietveld 408576698