aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContextPriv.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-11-15 13:14:01 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-16 19:32:55 +0000
commit584a79a1d5396cccd159ec6b8660be8fe128334f (patch)
tree7b1370c745daf1138e30d37d33c66402207324dd /src/gpu/GrRenderTargetContextPriv.h
parent47c8ed3c064f5176750f370b88119735163c0e8a (diff)
Reland "Fold analytic clip FPs into GrReducedClip"
This is a reland of 4355b26b359d5f2597a10012e7eb11fb3a1f025b Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 7.44 -> 6.92 ms [ 93%] > > keymobi_cnn_com.skp 3.55 -> 3.59 ms [101%] > keymobi_theverge_com.skp 4.08 -> 4.13 ms [101%] > desk_skbug6850autoscroll.skp 1.21 -> 1.22 ms [101%] > ... > top25desk_weather_com.skp 14.2 -> 11.5 ms [ 81%] > keymobi_androidpolice_com_2012_.skp 3.84 -> 2.95 ms [ 77%] > keymobi_shop_mobileweb_ebay_com.skp 2.94 -> 2.26 ms [ 77%] > keymobi_boingboing_net.skp 3.08 -> 2.24 ms [ 73%] > desk_jsfiddlebigcar.skp 1.90 -> 1.25 ms [ 66%] > keymobi_m_youtube_com_watch_v_9.skp 13.5 -> 8.84 ms [ 65%] > keymobi_sfgate_com_.skp 8.55 -> 5.55 ms [ 65%] > keymobi_blogger.skp 4.01 -> 2.60 ms [ 65%] > > 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: Ia93f68b2f971ea66b3ab19dc73557ea602932a92 > Reviewed-on: https://skia-review.googlesource.com/67424 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com Bug: skia:7190 Change-Id: I92f1ed21b6292feb3209fcbd1725487784d420da Reviewed-on: https://skia-review.googlesource.com/72562 Reviewed-by: Chris Dalton <csmartdalton@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 874e9c9f00..0d73793c9d 100644
--- a/src/gpu/GrRenderTargetContextPriv.h
+++ b/src/gpu/GrRenderTargetContextPriv.h
@@ -29,18 +29,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);