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

Issue 1936153002: Modify LineBench for drawing straight line (Closed)

Created:
4 years, 7 months ago by xidachen
Modified:
4 years, 7 months ago
CC:
reviews_skia.org
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Modify LineBench for drawing Currently we only have benchmark for lines that contains randomly generated points. This CL modifies the benchmark which adds cases of drawing straight lines. Also, this CL changes the call from drawPoints() to drawLines() which measures the performance of line drawing. BUG=skia:5243 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936153002 Committed: https://skia.googlesource.com/skia/+/6b27a5e7292d9a18e376f0c229ec62f7b801305a

Patch Set 1 #

Total comments: 2

Patch Set 2 : change to straightline, and fix compilation error #

Patch Set 3 : add change to lineBench #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -12 lines) Patch
M bench/LineBench.cpp View 1 2 3 chunks +39 lines, -12 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
xidachen
PTAL
4 years, 7 months ago (2016-05-02 15:31:53 UTC) #3
robertphillips
https://codereview.chromium.org/1936153002/diff/1/bench/StraightLineBench.cpp File bench/StraightLineBench.cpp (right): https://codereview.chromium.org/1936153002/diff/1/bench/StraightLineBench.cpp#newcode32 bench/StraightLineBench.cpp:32: fDoAA = doAA; I think you want this to ...
4 years, 7 months ago (2016-05-02 15:33:41 UTC) #5
xidachen
https://codereview.chromium.org/1936153002/diff/1/bench/StraightLineBench.cpp File bench/StraightLineBench.cpp (right): https://codereview.chromium.org/1936153002/diff/1/bench/StraightLineBench.cpp#newcode32 bench/StraightLineBench.cpp:32: fDoAA = doAA; On 2016/05/02 15:33:40, robertphillips wrote: > ...
4 years, 7 months ago (2016-05-02 15:54:10 UTC) #6
reed1
Is there a way to share code with LineBench.cpp, maybe just pass a bool/enum to ...
4 years, 7 months ago (2016-05-02 15:55:56 UTC) #7
xidachen
I have made the change so that this CL now change the LineBench.cpp only. I ...
4 years, 7 months ago (2016-05-02 17:25:29 UTC) #9
reed1
What was the speed diff you saw between a horizontal line and a rect?
4 years, 7 months ago (2016-05-02 17:31:16 UTC) #10
xidachen
On 2016/05/02 17:31:16, reed1 wrote: > What was the speed diff you saw between a ...
4 years, 7 months ago (2016-05-02 17:51:43 UTC) #11
xidachen
> 1. call drawLine() to draw a vertically straight line with line_width=10, AA, > config=8888, ...
4 years, 7 months ago (2016-05-02 17:52:16 UTC) #12
xidachen
Gentle ping. Could we land this patch? I have some code that specifically optimize the ...
4 years, 7 months ago (2016-05-05 19:26:50 UTC) #13
reed1
lgtm
4 years, 7 months ago (2016-05-05 20:11:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1936153002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1936153002/40001
4 years, 7 months ago (2016-05-05 20:12:09 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://skia.googlesource.com/skia/+/6b27a5e7292d9a18e376f0c229ec62f7b801305a
4 years, 7 months ago (2016-05-05 20:24:08 UTC) #18
reed1
4 years, 7 months ago (2016-05-05 21:02:23 UTC) #19
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/1952063005/ by reed@google.com.

The reason for reverting is:          for (int i = 0; i < loops; i++) {
 54             canvas->drawPoints(SkCanvas::kLines_PointMode, PTS, fPts,
paint);	 68             canvas->drawLine(fStartPts[i].x(), fStartPts[i].y(),
fEndPts[i].x(), fEndPts[i].y(), pai
    nt);

This change means we index arbitrarily far into fStartPts (if loops gets big
enough)..

Powered by Google App Engine
This is Rietveld 408576698