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

Issue 2251573002: Implement difference clip rects with window rectangles (Closed)

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

Description

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

Patch Set 1 #

Total comments: 9

Patch Set 2 : rebase #

Patch Set 3 : Implement difference clip rects with window rectangles #

Patch Set 4 : Implement difference clip rects with window rectangles #

Patch Set 5 : Implement difference clip rects with window rectangles #

Patch Set 6 : rebase #

Patch Set 7 : Implement difference clip rects with window rectangles #

Total comments: 1

Patch Set 8 : include file pickiness #

Patch Set 9 : return type #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -49 lines) Patch
M gyp/gpu.gypi View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M include/gpu/GrClip.h View 1 2 3 1 chunk +1 line, -46 lines 0 comments Download
A src/gpu/GrAppliedClip.h View 1 2 3 4 5 6 7 1 chunk +72 lines, -0 lines 0 comments Download
M src/gpu/GrCaps.cpp View 1 2 3 chunks +5 lines, -1 line 1 comment Download
M src/gpu/GrClip.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrClipStackClip.cpp View 1 2 3 4 5 2 chunks +19 lines, -0 lines 0 comments Download
M src/gpu/GrDrawTarget.cpp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M src/gpu/GrNonAtomicRef.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrPipeline.h View 1 2 4 chunks +5 lines, -0 lines 0 comments Download
M src/gpu/GrPipeline.cpp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
A src/gpu/GrWindowRectangles.h View 1 2 3 4 5 6 7 8 1 chunk +110 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLGpu.h View 1 2 3 4 5 6 2 chunks +39 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 3 4 5 6 14 chunks +44 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLIRect.h View 2 chunks +19 lines, -0 lines 0 comments Download
A tests/WindowRectanglesTest.cpp View 1 2 1 chunk +92 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 27 (9 generated)
csmartdalton
We don't have any bots that can test this functionality. Will it be released soon ...
4 years, 4 months ago (2016-08-15 23:50:10 UTC) #3
csmartdalton
https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h File src/gpu/GrWindowRectangles.h (right): https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h#newcode33 src/gpu/GrWindowRectangles.h:33: SkIRect& addWindow(const GrCaps& caps); I'm thinking I'll replace this ...
4 years, 4 months ago (2016-08-16 05:20:18 UTC) #5
dogben
On 2016/08/15 at 23:50:10, csmartdalton wrote: > We don't have any bots that can test ...
4 years, 4 months ago (2016-08-16 12:34:51 UTC) #6
csmartdalton
On 2016/08/16 12:34:51, Ben Wagner wrote: > (I assume the reason you're testing with GTX960 ...
4 years, 4 months ago (2016-08-16 13:34:16 UTC) #7
csmartdalton
https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrClipStackClip.cpp File src/gpu/GrClipStackClip.cpp (right): https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrClipStackClip.cpp#newcode294 src/gpu/GrClipStackClip.cpp:294: element->getRect().round(&window); Needs to be offset to screen space from ...
4 years, 4 months ago (2016-08-16 18:38:47 UTC) #8
bsalomon
https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h File src/gpu/GrWindowRectangles.h (right): https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h#newcode39 src/gpu/GrWindowRectangles.h:39: constexpr static int kNumLocalWindows = 1; What in practice ...
4 years, 4 months ago (2016-08-16 19:03:55 UTC) #9
csmartdalton
https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h File src/gpu/GrWindowRectangles.h (right): https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h#newcode39 src/gpu/GrWindowRectangles.h:39: constexpr static int kNumLocalWindows = 1; On 2016/08/16 19:03:55, ...
4 years, 4 months ago (2016-08-16 19:49:46 UTC) #10
bsalomon
On 2016/08/16 19:49:46, csmartdalton wrote: > https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h > File src/gpu/GrWindowRectangles.h (right): > > https://codereview.chromium.org/2251573002/diff/1/src/gpu/GrWindowRectangles.h#newcode39 > ...
4 years, 4 months ago (2016-08-16 20:05:52 UTC) #11
csmartdalton
Much happier with it now. I'll have to redo the benchmark now that the window ...
4 years, 4 months ago (2016-08-16 23:38:34 UTC) #14
Mark Kilgard
On 2016/08/16 13:34:16, csmartdalton wrote: > On 2016/08/16 12:34:51, Ben Wagner wrote: > > (I ...
4 years, 4 months ago (2016-08-17 04:24:24 UTC) #15
bsalomon
lgtm
4 years, 4 months ago (2016-08-17 13:28:18 UTC) #16
csmartdalton
Just a bit of bikeshedding
4 years, 4 months ago (2016-08-17 14:45:55 UTC) #17
bsalomon
On 2016/08/17 14:45:55, csmartdalton wrote: > Just a bit of bikeshedding still lgtm
4 years, 4 months ago (2016-08-17 14:49:33 UTC) #18
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/2251573002/200001
4 years, 4 months ago (2016-08-17 16:41:44 UTC) #21
commit-bot: I haz the power
Committed patchset #9 (id:200001) as https://skia.googlesource.com/skia/+/28341fad8438b294ed7311edbc68d8cb34a990ab
4 years, 4 months ago (2016-08-17 17:00:30 UTC) #23
Mark Kilgard
LGTM mild concern about capping fMaxWindowRectangles to avoid future performance pitfalls if large number of ...
4 years, 4 months ago (2016-08-17 17:59:17 UTC) #25
csmartdalton
On 2016/08/17 17:59:17, Mark Kilgard wrote: > LGTM > > mild concern about capping fMaxWindowRectangles ...
4 years, 4 months ago (2016-08-17 18:23:55 UTC) #26
csmartdalton
4 years, 4 months ago (2016-08-17 18:24:06 UTC) #27
Message was sent while issue was closed.
https://codereview.chromium.org/2251573002/diff/200001/src/gpu/GrCaps.cpp
File src/gpu/GrCaps.cpp (right):

https://codereview.chromium.org/2251573002/diff/200001/src/gpu/GrCaps.cpp#new...
src/gpu/GrCaps.cpp:144: fMaxWindowRectangles = GrWindowRectangles::kMaxWindows;
We still cap. The cap just got moved here instead. (To the platform-independent
part. i.e. this will cap vulkan too)

kMaxWindows is 16. But I agree your suggestion of 8 makes more sense. Lets drop
to 8 and always increase later if needed.

Powered by Google App Engine
This is Rietveld 408576698