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 03:57:25 +0000
commit4355b26b359d5f2597a10012e7eb11fb3a1f025b (patch)
tree4783e867efb25a76e10c6a02c15c8cecb29ad446 /src/gpu/GrRenderTargetContextPriv.h
parente42180022720f2fcfd3c634cad855506a7940591 (diff)
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>
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);