aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContextPriv.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-11-01 11:40:58 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-01 18:27:42 +0000
commitd29e0da3523e390eeb77b5a823d7ff86569ac1d3 (patch)
treef057fcd757f28c941c9866d4c143232af1dcfa77 /src/gpu/GrRenderTargetContextPriv.h
parent407750ffd84fac63d70793b0d485a84facd2987b (diff)
Fold analytic clip FPs into GrReducedClip
Perf result on Pixel phone (sorted by impact): GEOMEAN 6.73 -> 6.49 ms [96% ] top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] ... keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] Cleaner code, improved skps, slightly better geometric mean time. Pixel C is mostly unaffected, presumably because it uses window rectangles. Bug: skia:7190 Change-Id: I9c7f3512ca57e1d1afcd42865357b63ffcc192ce Reviewed-on: https://skia-review.googlesource.com/66280 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetContextPriv.h')
-rw-r--r--src/gpu/GrRenderTargetContextPriv.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gpu/GrRenderTargetContextPriv.h b/src/gpu/GrRenderTargetContextPriv.h
index 2cfd5c8679..4b3ceefac5 100644
--- a/src/gpu/GrRenderTargetContextPriv.h
+++ b/src/gpu/GrRenderTargetContextPriv.h
@@ -28,18 +28,22 @@ public:
// called to note the last clip drawn to the stencil buffer.
// TODO: remove after clipping overhaul.
- void setLastClip(uint32_t clipStackGenID, const SkIRect& devClipBounds) {
+ void setLastClip(uint32_t clipStackGenID, const SkIRect& devClipBounds,
+ int numClipAnalyticFPs) {
GrRenderTargetOpList* opList = fRenderTargetContext->getRTOpList();
opList->fLastClipStackGenID = clipStackGenID;
opList->fLastDevClipBounds = devClipBounds;
+ opList->fLastClipNumAnalyticFPs = numClipAnalyticFPs;
}
// called to determine if we have to render the clip into SB.
// TODO: remove after clipping overhaul.
- bool mustRenderClip(uint32_t clipStackGenID, const SkIRect& devClipBounds) const {
+ bool mustRenderClip(uint32_t clipStackGenID, const SkIRect& devClipBounds,
+ int numClipAnalyticFPs) const {
GrRenderTargetOpList* opList = fRenderTargetContext->getRTOpList();
return opList->fLastClipStackGenID != clipStackGenID ||
- !opList->fLastDevClipBounds.contains(devClipBounds);
+ !opList->fLastDevClipBounds.contains(devClipBounds) ||
+ opList->fLastClipNumAnalyticFPs != numClipAnalyticFPs;
}
void clear(const GrFixedClip&, const GrColor, bool canIgnoreClip);