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

Issue 648483002: Attempt at fixing color cube bench (Closed)

Created:
6 years, 2 months ago by sugoi1
Modified:
6 years, 2 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Attempt at fixing color cube bench The original bench was hitting the cache since it was using the same color filter for all loops. By creating a new color filter within the loop, at least this part of it is solved. I'm not 100% sure this is the right way, but at least the numbers are a bit more reasonable and are affected by the output resolution. BUG=skia: Committed: https://skia.googlesource.com/skia/+/12b1831ea49f3d88e93b7d2793d94852d03813e8

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -4 lines) Patch
M bench/ColorCubeBench.cpp View 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
sugoi1
It's better this way. I'm not sure if it's perfect, but at least I get ...
6 years, 2 months ago (2014-10-09 18:18:21 UTC) #2
sugoi1
6 years, 2 months ago (2014-10-09 18:20:16 UTC) #4
Stephen White
LGTM because it fixes a bot. I'd like to dig deeper to figure out why ...
6 years, 2 months ago (2014-10-09 18:24:30 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/648483002/1
6 years, 2 months ago (2014-10-09 18:28:10 UTC) #8
reed1
is the bench interested in profiling the cost of building the internal-cube-representation, or drawing a ...
6 years, 2 months ago (2014-10-09 18:30:17 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as 12b1831ea49f3d88e93b7d2793d94852d03813e8
6 years, 2 months ago (2014-10-09 18:35:15 UTC) #10
sugoi1
6 years, 2 months ago (2014-10-09 18:40:56 UTC) #11
Message was sent while issue was closed.
On 2014/10/09 18:30:17, reed1 wrote:
> is the bench interested in profiling the cost of building the
> internal-cube-representation, or drawing a bitmap w/ the filter applied.
> 
> The current fix seems like might spend a fair amount of time profiling the
cost
> of new/delete.

Agreed. The issue I have is that the current bench only seems records gl
commands and stops the timer before actually drawing (glFlush() and
glSwpabuffers() being asynchronous calls, they don't wait for the drawing to
end, so the timer ends before the drawing does). Normally, I guess SkImageFilter
rendering causes a blit or something that forces it to wait on a glFlush, which
doesn't happen if all you have is a color filter (this needs more
investigation).

What happens currently is that the AutoTune phase of nanobench will clock this
effect at about 1 microsecond for an effect that renders at 2880x1800 and then
attempt to render it thousands of times, but even if the timer doesn't stop, the
drawing still has to happen at some point.

This cl merely increases the time it will take to render multiple colorcubes,
since no caching occurs, which will take hundreds of microsecs instead of only a
few nanosecs, which will prevent the bench from trying to render thousands of
times. I looked at ColorFilterBench, and it wraps the color filter inside an
image filter, but that seems like a lot of overhead. I'm not certain at the
moment what the proper solution is for this case...

Powered by Google App Engine
This is Rietveld 408576698