Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(109)

Issue 7323046: Skip unnecessary quick reject testing during playback when using a BBoxHierarchy

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by junov1
Modified:
12 years, 6 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Skip unnecessary quick reject testing during playback when using a BBoxHierarchy TEST=bench_pictures

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -34 lines) Patch
M include/core/SkCanvas.h View 3 chunks +18 lines, -6 lines 0 comments Download
M src/core/SkCanvas.cpp View 11 chunks +32 lines, -28 lines 0 comments Download
M src/core/SkPicturePlayback.cpp View 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 3
junov1
PTAL Note: This patch should not be landed until after this one lands: https://codereview.appspot.com/7311075/ See ...
12 years, 6 months ago (2013-02-11 21:21:23 UTC) #1
reed1
I think this is an interesting change, as we have talked about making quick-reject optional ...
12 years, 6 months ago (2013-02-11 21:52:41 UTC) #2
junov1
12 years, 6 months ago (2013-02-11 22:09:47 UTC) #3
On 2013/02/11 21:52:41, reed1 wrote:
> I think this is an interesting change, as we have talked about making
> quick-reject optional for a while. However, I'd like to evaluate and measure
it
> on its own, and not just in conjunction w/ the other proposed CL.

Not sure that is such a good idea. Without the other CL, quickReject is not 100%
redundant when playing back to a clipped destination canvas.  For non-tiled
playback however, it would be fine.
> 
> 1. Not sure I agree that we should complicate quickReject(rect) by adding a
> paint parameter. This makes that code now perform at least one extra test and
a
> rect-copy before landing where the old code was (i.e. isFinite). What
motivated
> this change? 
I wanted to skip the call to paint->computeFastBounds without adding complexity
to the call site.
>Could it make sense to just add a new entry-point that took a const
> SkPaint&? That version could call into the current one, and would not need to
> check for null.
Yeah that would work.
> 
> 2. What is the perf cost (if any) for checking this new bool? Can we try just
> making that change, and then timing a bunch of calls to quickReject? Hopefully
> its very small, but we need to know if we are adding a cost in the case where
we
> *do* perform the reject test.
Already did. With bench_pictures --mode record.  The recording canvas calls
quickReject in SkBBoxRecord::transformBounds:  No measurable impact.

> 
> 3. Nit: I think I'd rather have the API and field not have a negative in its
> name. Can we call it enableQuickReject or something like that? Not critical,
but
> I always have to think harder when I read predicates that are sort of
negative.
sgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b